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 |
---|---|---|---|---|---|---|
REST API CALL TO UPDATE A REVIEW // | @PutMapping(value = "/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Object> updateReview(@PathVariable("id") int id, Review review, HttpServletResponse response) {
Review updatedReview = reviewService.updateReview(id, review);
response.addHeader("Date", new Date().toString());
response.setHeader("Cache-Control","no-cache,no-store,must-revalidate");
response.setHeader("Pragma","no-cache");
response.setHeader("Version","Mechanic API V-2.0");
response.setDateHeader("Expires", 0);
return new ResponseEntity<>(updatedReview, HttpStatus.CREATED);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int update(ReviewVO review_memberVO);",
"@org.junit.Test\r\n public void testUpdateReview7() throws Exception {\r\n System.out.println(\"updateReview7\");\r\n Long id = new Long(0);\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n service.insertReview(review);\r\n Review review2 = new Review(new Long(0), \"Jack\", 2, \"\");\r\n try{\r\n Review result = service.updateReview(review2, id);\r\n }catch(BusinessException ex){\r\n return;\r\n }\r\n fail(\"Accepted empty review text\");\r\n }",
"@Test\n public void edit() throws RazorpayException{\n JSONObject request = new JSONObject(\"\" +\n \"{\\\"notes\\\":\" +\n \"{\\\"notes_key_1\\\":\\\"BeammeupScotty.\\\",\" +\n \"\\\"notes_key_2\\\":\\\"Engage\\\"}}\");\n\n String mockedResponseJson = \"{\\n\" +\n \" \\\"id\\\": \"+REFUND_ID+\",\\n\" +\n \" \\\"entity\\\": \\\"refund\\\",\\n\" +\n \" \\\"amount\\\": 300100,\\n\" +\n \" \\\"currency\\\": \\\"INR\\\",\\n\" +\n \" \\\"payment_id\\\": \\\"pay_FIKOnlyii5QGNx\\\",\\n\" +\n \" \\\"notes\\\": {\\n\" +\n \" \\\"notes_key_1\\\": \\\"Beam me up Scotty.\\\",\\n\" +\n \" \\\"notes_key_2\\\": \\\"Engage\\\"\\n\" +\n \" },\\n\" +\n \" \\\"receipt\\\": null,\\n\" +\n \" \\\"acquirer_data\\\": {\\n\" +\n \" \\\"arn\\\": \\\"10000000000000\\\"\\n\" +\n \" },\\n\" +\n \" \\\"created_at\\\": 1597078124,\\n\" +\n \" \\\"batch_id\\\": null,\\n\" +\n \" \\\"status\\\": \\\"processed\\\",\\n\" +\n \" \\\"speed_processed\\\": \\\"normal\\\",\\n\" +\n \" \\\"speed_requested\\\": \\\"optimum\\\"\\n\" +\n \"}\";\n\n try {\n mockResponseFromExternalClient(mockedResponseJson);\n mockResponseHTTPCodeFromExternalClient(200);\n Refund fetch = refundClient.edit(REFUND_ID, request);\n assertNotNull(fetch);\n assertEquals(REFUND_ID,fetch.get(\"id\"));\n assertEquals(\"refund\",fetch.get(\"entity\"));\n assertEquals(300100,(int)fetch.get(\"amount\"));\n assertEquals(\"INR\",fetch.get(\"currency\"));\n String editRequest = getHost(String.format(Constants.REFUND,REFUND_ID));\n verifySentRequest(true, request.toString(), editRequest);\n } catch (IOException e) {\n assertTrue(false);\n }\n }",
"private void updateReviews(){\r\n FetchReviewsTask reviewsTask = new FetchReviewsTask();\r\n reviewsTask.execute(MovieId);\r\n }",
"@Test\n\tpublic void testUpdateTicketOk() {\n\t}",
"public String update(String id, String datetime, String description, String request, String status);",
"@org.junit.Test\r\n public void testUpdateReview1() throws Exception {\r\n System.out.println(\"updateReview1\");\r\n Long id = new Long(0);\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n service.insertReview(review);\r\n Review review2 = new Review(new Long(0), \"Jack\", 2, \"Disappointing\");\r\n Review result = service.updateReview(review2, id);\r\n assertEquals(review2, result);\r\n }",
"@ResponseStatus(code=HttpStatus.OK)\r\n\t@RequestMapping(value=\"/update\", method=RequestMethod.GET)\r\n\tpublic void update() {\r\n\t\tSystem.out.println(\"StudentRestController.Update()_________\");\r\n\t}",
"public void updateReview() throws ServletException, IOException {\r\n\t\tInteger reviewId = Integer.parseInt(request.getParameter(\"reviewId\"));\r\n\t\tString headline = request.getParameter(\"headline\");\r\n\t\tString comment = request.getParameter(\"comment\");\r\n\t\t\r\n\t\tReview review = reviewDAO.get(reviewId);\r\n\t\treview.setHeadline(headline);\r\n\t\treview.setComment(comment);\r\n\t\t\r\n\t\treviewDAO.update(review);\r\n\t\t\r\n\t\tString message = \"The review has been updated successfully.\";\r\n\t\t\r\n\t\tlistAllReview(message);\r\n\t\t\r\n\t}",
"@org.junit.Test\r\n public void testUpdateReview6() throws Exception {\r\n System.out.println(\"updateReview6\");\r\n Long id = new Long(0);\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n service.insertReview(review);\r\n Review review2 = new Review(new Long(0), \"Jack\", 2, null);\r\n try{\r\n Review result = service.updateReview(review2, id);\r\n }catch(BusinessException ex){\r\n return;\r\n }\r\n fail(\"Accepted null review text\");\r\n }",
"@Test\n public void oTAUpdateGETTest() throws ApiException {\n //UUID id = null;\n //OTAUpdateResponse response = api.oTAUpdateGET(id);\n // TODO: test validations\n }",
"@Override\r\n\tpublic void updateReview(ReviewVO rvo) {\n\t\tss.update(\"updateReview\", rvo);\r\n\t}",
"@Override\r\n\tpublic void update(ReviewDTO dto) throws Exception {\n\r\n\t}",
"@org.junit.Test\r\n public void testUpdateReview4() throws Exception {\r\n System.out.println(\"updateReview4\");\r\n Long id = new Long(0);\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n service.insertReview(review);\r\n Review review2 = new Review(new Long(0), \"\", 2, \"Disappointing\");\r\n try{\r\n Review result = service.updateReview(review2, id);\r\n }catch(BusinessException ex){\r\n return;\r\n }\r\n fail(\"Accepted empty author name\");\r\n }",
"public abstract void update(@Nonnull Response response);",
"@org.junit.Test\r\n public void testUpdateReview2() throws Exception {\r\n System.out.println(\"updateReview2\");\r\n Long id = null;\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n service.insertReview(review);\r\n Review review2 = new Review(new Long(0), \"Jack\", 2, \"Disappointing\");\r\n try{\r\n Review result = service.updateReview(review2, id);\r\n }catch(BusinessException ex){\r\n return;\r\n }\r\n fail(\"Accepted null id\");\r\n }",
"@org.junit.Test\r\n public void testUpdateReview3() throws Exception {\r\n System.out.println(\"updateReview3\");\r\n Long id = new Long(0);\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n service.insertReview(review);\r\n Review review2 = new Review(new Long(0), null, 2, \"Disappointing\");\r\n try{\r\n Review result = service.updateReview(review2, id);\r\n }catch(BusinessException ex){\r\n return;\r\n }\r\n fail(\"Accepted null author name\");\r\n }",
"public abstract Response update(Request request, Response response);",
"@PUT\n@Produces(\"application/json\")\n@Path(\"/updateResult/{jobApplicationID}/{reviewerID}/{result}\")\npublic Response updateReviewerResult(@PathParam(\"jobApplicationID\")String jobApplicationID,@PathParam(\"reviewerID\")String reviewerID,@PathParam(\"result\")String result)\n{\n\tsecurityKey=headers.getRequestHeaders().getFirst(\"SecurityKey\");\n\tshortKey=headers.getRequestHeaders().getFirst(\"ShortKey\");\n\tif(securityKey==null)\n\t{\n\t\tsecurityKey=\"default\";\n\t}\n\tif(shortKey==null)\n\t{\n\t\tshortKey=\"default\";\n\t}\n\tif(securityKey.equalsIgnoreCase(\"i-am-foundit\")&& shortKey.equalsIgnoreCase(\"app-reviewer\"))\n\t{\n\t\ttry{\n\t\t\tReviewerUtil.updateReviewerJobApplication(jobApplicationID, reviewerID, result, con);\n\t\t\tstatus=204;\n\t\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Error Occured in Reviewer updateReviewerResult\");\n\t\t\tstatus=500;\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\telse\n\t{\n\t\tstatus=403;\n\t\tSystem.out.println(\"Access Forbidden\");\n\t}\n\t\n\treturn Response.status(status).build();\n}",
"@org.junit.Test\r\n public void testUpdateReview5() throws Exception {\r\n System.out.println(\"updateReview5\");\r\n Long id = new Long(0);\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n service.insertReview(review);\r\n Review review2 = new Review(new Long(0), \"Jack\", null, \"Disappointing\");\r\n try{\r\n Review result = service.updateReview(review2, id);\r\n }catch(BusinessException ex){\r\n return;\r\n }\r\n fail(\"Accepted null rating\");\r\n }",
"@Test\r\n\tpublic void updateProductDetails() {\r\n\r\n\t\tRestAssured.baseURI = \"http://localhost:9000/products\";\r\n\t\tRequestSpecification request = RestAssured.given();\r\n\t\tJSONObject requestParams = new JSONObject();\r\n\t\trequestParams.put(\"name\", \"Banana\");\r\n\t\trequest.header(\"Content-Type\", \"application/json\");\r\n\t\trequest.body(requestParams.toString());\r\n\t\tResponse response = request.put(\"/5\");\r\n\t\tSystem.out.println(\"Update Responce Body ----->\" + response.asString());\r\n\t\tint statusCode = response.getStatusCode();\r\n\t\tAssert.assertEquals(statusCode, 200);\r\n\r\n\t}",
"@Test\npublic void tickerUpdateExample() throws Exception {\n\n\tMap<String, Object> tickers = new HashMap<String, Object>();\n\ttickers.put(\"name\",\"maxxa\");\n \n\tString tickerLocation = this.mockMvc\n\t\t\t.perform(\n\t\t\t\t\tpost(\"/api/tickers\").contentType(MediaTypes.HAL_JSON).content(\n\t\t\t\t\t\t\tthis.objectMapper.writeValueAsString(tickers)))\n\t\t\t.andExpect(status().isCreated()).andReturn().getResponse()\n\t\t\t.getHeader(\"Location\");\n\n\tthis.mockMvc.perform(get(tickerLocation)).andExpect(status().isOk())\n\t\t\t.andExpect(jsonPath(\"name\", is(tickers.get(\"name\"))))\n\t\t\t.andExpect(jsonPath(\"_links.self.href\", is(tickerLocation)));\n\n\t\t\t\n\tthis.mockMvc.perform(\n\t\t\tpatch(tickerLocation).contentType(MediaTypes.HAL_JSON).content(\n\t\t\t\t\tthis.objectMapper.writeValueAsString(tickers)))\n\t\t\t.andExpect(status().isNoContent())\n\t\t\t.andDo(document(\"tickers-update-example\",\n\t\t\t\t\trequestFields(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfieldWithPath(\"name\").description(\"The name of the ticker\").type(JsonFieldType.STRING).optional())));\n\t\t\t\t\t\t\t\n}",
"public interface EditMatchInfoView extends RestView {\n\n void onUpdatedMatch(Match match);\n}",
"public int update(StoreFeedBack storeFeedBack);",
"public void updateData(restaurantRes res){\r\n \r\n }",
"@Override\n\tpublic void update(Review object) {\n\t\t\n\t}",
"public Promise<SphereResult<Review>> updateReviewAsync(VersionedId reviewId, ReviewUpdate update);",
"public interface UpdateQuestionService {\n public static final String BASE_URL= \"https://private-anon-74261c4c7e-blissrecruitmentapi.apiary-mock.com/\";\n @PUT(\"questions/{id}\")\n Call<Question> updateQuestion(@Path(\"id\") int bookId, @Body Question question);\n\n}",
"public void updateRebill(HashMap<String, String> params) {\n\t\tTRANSACTION_TYPE = \"SET\";\n\t\tREBILL_ID = params.get(\"rebillID\");\n\t\tTEMPLATE_ID = params.get(\"templateID\");\n\t\tNEXT_DATE = params.get(\"nextDate\");\n\t\tREB_EXPR = params.get(\"expr\");\n\t\tREB_CYCLES = params.get(\"cycles\");\n\t\tREB_AMOUNT = params.get(\"rebillAmount\");\n\t\tNEXT_AMOUNT = params.get(\"nextAmount\");\n\t\tAPI = \"bp20rebadmin\";\n\t}",
"@Test\n public void updateComment() throws Exception{\n JSONParser parser = new JSONParser();\n Object obj = parser.parse(new FileReader(JSON_FILE_4));\n JSONObject jsonObject = (JSONObject) obj;\n\n Response res =\n given().\n header(\"cookie\",\"JSESSIONID=\"+createSession()).and().\n header(\"Content-Type\",\"application/json\").\n body(jsonObject.toJSONString()).\n when().\n put(\"/rest/api/2/issue/10008/comment/10004\").\n then().\n statusCode(200).log().all().extract().response();\n }",
"public int updateUser(Candidat c) {\n String url = StaticVars.baseURL + \"/updateuser\";\n System.out.println(url);\n ConnectionRequest req = new ConnectionRequest();\n\n req.setUrl(url);\n req.setPost(true);\n\nreq.setHttpMethod(\"PUT\"); \n\n\n String can = String.valueOf(currentCandidat.getId());\n req.addArgument(\"id\", can);\n String login =String .valueOf(currentCandidat.getLogin());\n req.addArgument(\"login\",login);\n req.addArgument(\"email\", String .valueOf(currentCandidat.getEmail()));\n req.addArgument(\"pays\", String .valueOf(currentCandidat.getPays()));\n req.addArgument(\"ville\", String .valueOf(currentCandidat.getVille()));\n req.addArgument(\"tel\", Integer.toString(currentCandidat.getTel()));\n req.addArgument(\"domaine\", String .valueOf(currentCandidat.getDomaine()));\n\n req.addResponseListener(new ActionListener<NetworkEvent>() {\n @Override\n public void actionPerformed(NetworkEvent evt) {\n result = req.getResponseCode();\n \n System.out.println(result);\n }\n });\n NetworkManager.getInstance().addToQueueAndWait(req);\n\n return result;\n }",
"private void update() {\n ambianceModel.ambiance.uniq_id = ambianceModel._id.$oid;\n\n RestAdapter restAdapter = new RestAdapter.Builder().setLogLevel(RestAdapter.LogLevel.FULL).setEndpoint(getResources().getString(R.string.api)).build();\n final GsonBuilder builder = new GsonBuilder();\n builder.excludeFieldsWithoutExposeAnnotation();\n builder.disableHtmlEscaping();\n final Gson gson = builder.create();\n Request r = new Request(Singleton.token, ambianceModel._id.$oid, ambianceModel);\n String json = gson.toJson(r);\n Log.v(\"Ambiance activity\", json);\n\n final Lumhueapi lumhueapi = restAdapter.create(Lumhueapi.class);\n lumhueapi.updateAmbiance(r, new Callback<AmbianceApplyResponse>() {\n @Override\n public void success(AmbianceApplyResponse ambianceApplyResponse, Response response) {\n Log.v(\"Ambiance activity\", \"It worked\");\n }\n\n @Override\n public void failure(RetrofitError error) {\n String tv = error.getMessage();\n Log.v(\"Ambiance activity\", tv + \"\");\n }\n });\n }",
"@PostMapping(value = \"/updateInterview\")\n\tpublic String updateInterview(@RequestBody String request) throws JSONException {\n\t\tJSONObject responseJSON = new JSONObject();\n\t\t\n\t\tlog.info(\"Inside updateInterview.\");\n\t\ttry {\n\t\t\tJSONObject inputJSON = new JSONObject(request);\n\t\t\tlog.info(\"InputData : {} \", inputJSON);\n\t\t\tinterviewsService.updateCandidateInterview(inputJSON);\n\t\t\tcandidateProfile.updateStatus(request);\n\t\t\tresponseJSON.put(\"status\", 200);\n\t\t\tresponseJSON.put(\"message\", \"success\");\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Exception updateInterview : \", e);\n\t\t\tresponseJSON.put(\"status\",500);\n\t\t\tresponseJSON.put(\"message\", \"failure\");\n\t\t}\n\t\treturn responseJSON.toString();\n\t}",
"@Test\n public void updateWorkflow_200() throws Exception {\n\n // PREPARE THE DATABASE\n // Fill in the workflow db\n addMOToDb(1);\n Integer id = addMOToDb(2).getId();\n addMOToDb(3);\n\n // PREPARE THE TEST\n Workflow mo = new Workflow();\n mo.setName(\"New My_Workflow\");\n mo.setDescription(\"New Description of my new workflow\");\n mo.setRaw(\"New Workflow new content\");\n\n // DO THE TEST\n Response response = callAPI(VERB.PUT, \"/mo/\" + id.toString(), mo);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(200, status);\n\n String body = response.readEntity(String.class);\n assertEquals(\"\", body);\n }",
"public abstract void onUpdatePatchset(TicketModel ticket);",
"@Override\r\n\tpublic boolean update(ReviewVO vo) {\n\t\tsqlSession.update(namespace + \".update\", vo);\r\n\t\treturn true;\r\n\t}",
"public void updateView() {\n// LocalDate startDate = LocalDate.of(2017, Month.SEPTEMBER, 1);\n// LocalDate endDate = LocalDate.of(2017, Month.SEPTEMBER, 6);\n// getRecords(startDate, endDate);\n }",
"@RequestMapping(value = \"api-status\", method = RequestMethod.POST)\n public @ResponseBody String statusQuiz(@ModelAttribute Quiz quiz)\n {\n Quiz quizs = quizService.findQuizById(quiz.getIdQuiz());\n quizs.setStatus(\"published\");\n quizs.setPublished_date(dateFormat.format(date));\n // System.out.println(quizs.getStatus());\n quizService.updateQuiz(quizs);\n return \"Quiz publish\";\n }",
"private void updatePostPatch() {\n PostModel model = new PostModel(12, null, \"This is the newest one.\");\n Call<PostModel> call = jsonPlaceHolderAPI.patchPosts(5, model);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getTitle() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }",
"public int updateById(WeChatPublic wp);",
"@PUT\n @Path(\"/update\")\n public void put() {\n System.out.println(\"PUT invoked\");\n }",
"JobResponse.Update update();",
"private static String editUrlMonitor(HttpServletRequest request, HttpServletResponse response)\n/* */ throws Exception\n/* */ {\n/* 90 */ String xmlString = \"\";\n/* 91 */ String monType = \"UrlMonitor\";\n/* 92 */ int pollInterval = 5;\n/* 93 */ int timeOut = 5;\n/* 94 */ String query1 = \"\";\n/* 95 */ String query2 = \"\";\n/* 96 */ String resID = \"\";\n/* 97 */ String reqParams = \"\";\n/* 98 */ String displayname = \"\";\n/* 99 */ String httpCondition = \"\";\n/* 100 */ String httpValue = \"\";\n/* 101 */ String strUrl = \"\";\n/* 102 */ MockHttpServletRequest MSreq = new MockHttpServletRequest();\n/* 103 */ MSreq.setContentType(\"text/xml; charset=UTF-8\");\n/* 104 */ AMActionForm amform = new AMActionForm();\n/* 105 */ MSreq.addParameter(\"actionmethod\", \"updateUrlMonitor\");\n/* 106 */ AMConnectionPool cp = AMConnectionPool.getInstance();\n/* 107 */ ResultSet rs1 = null;\n/* 108 */ ResultSet rs2 = null;\n/* */ try {\n/* 110 */ AMLog.debug(\"REST API : inside editUrlMonitor\");\n/* 111 */ if (request.getParameter(\"resourceid\") != null) {\n/* 112 */ query1 = \"select AM_ManagedObject.DISPLAYNAME as displayname,AM_URL.URLID as resourceid, AM_URL.URL as url, AM_URL.USERID as userName, \" + DBQueryUtil.decodeBytes(\"password\") + \" as password, AM_URL.QUERYSTRING as reqParams, AM_URL.METHOD as urlMethod,AM_URL.AVAILABILITYSTRING as checkForContent,AM_URL.PollInterval as pollInterval, AM_URL.UNAVAILABILITYSTRING as errorIfMatch, AM_URL.VERIFY as verifyError,AM_URL.TIMEOUT as timeout from AM_ManagedObject, AM_URL where AM_ManagedObject.RESOURCEID=AM_URL.URLID and AM_ManagedObject.TYPE='UrlMonitor' and AM_URL.URLID='\" + request.getParameter(\"resourceid\") + \"'\";\n/* */ }\n/* 114 */ else if (request.getParameter(\"url\") != null) {\n/* 115 */ query1 = \"select AM_ManagedObject.DISPLAYNAME as displayname,AM_URL.URLID as resourceid, AM_URL.URL as url, AM_URL.USERID as userName, \" + DBQueryUtil.decodeBytes(\"password\") + \" as password, AM_URL.QUERYSTRING as reqParams, AM_URL.METHOD as urlMethod,AM_URL.AVAILABILITYSTRING as checkForContent,AM_URL.PollInterval as pollInterval, AM_URL.UNAVAILABILITYSTRING as errorIfMatch, AM_URL.VERIFY as verifyError,AM_URL.TIMEOUT as timeout from AM_ManagedObject, AM_URL where AM_ManagedObject.RESOURCEID=AM_URL.URLID and AM_ManagedObject.TYPE='UrlMonitor' and AM_URL.URL like '\" + request.getParameter(\"url\") + \"'\";\n/* */ }\n/* 117 */ else if (request.getParameter(\"displayname\") != null) {\n/* 118 */ query1 = \"select AM_ManagedObject.DISPLAYNAME as displayname,AM_URL.URLID as resourceid, AM_URL.URL as url, AM_URL.USERID as userName, \" + DBQueryUtil.decodeBytes(\"password\") + \" as password, AM_URL.QUERYSTRING as reqParams, AM_URL.METHOD as urlMethod,AM_URL.AVAILABILITYSTRING as checkForContent,AM_URL.PollInterval as pollInterval, AM_URL.UNAVAILABILITYSTRING as errorIfMatch, AM_URL.VERIFY as verifyError,AM_URL.TIMEOUT as timeout from AM_ManagedObject, AM_URL where AM_ManagedObject.RESOURCEID=AM_URL.URLID and AM_ManagedObject.TYPE='UrlMonitor' and AM_ManagedObject.DISPLAYNAME='\" + request.getParameter(\"displayname\") + \"'\";\n/* */ }\n/* */ else {\n/* 121 */ AMLog.debug(\"REST API : Some parameter missing for edit URL.For editing URL monitor either one of the following 'type with resourceid' or 'type with url' or 'type with displayname' is needed.\");\n/* 122 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.api.editURL.paramMissing\"), \"4314\");\n/* 123 */ return xmlString;\n/* */ }\n/* */ \n/* 126 */ rs1 = AMConnectionPool.executeQueryStmt(query1);\n/* 127 */ String verifyError; if (rs1.next()) {\n/* 128 */ resID = rs1.getString(\"resourceid\");\n/* 129 */ reqParams = rs1.getString(\"reqParams\") != null ? rs1.getString(\"reqParams\") : \"\";\n/* 130 */ displayname = rs1.getString(\"displayname\");\n/* 131 */ query2 = \"select NAME, CRITICALTHRESHOLDCONDITION as httpCondition, CRITICALTHRESHOLDVALUE as httpValue from AM_THRESHOLDCONFIG where DESCRIPTION='##Threshod for URL##' and NAME='Threshold\" + resID + \"' order by ID desc\";\n/* */ \n/* 133 */ MSreq.addParameter(\"urlid\", rs1.getString(\"resourceid\"));\n/* 134 */ strUrl = rs1.getString(\"url\");\n/* 135 */ if (request.getParameter(\"timeout\") != null) {\n/* */ try {\n/* 137 */ timeOut = Integer.parseInt(request.getParameter(\"timeout\"));\n/* 138 */ MSreq.addParameter(\"timeout\", \"\" + timeOut);\n/* */ } catch (Exception exc) {\n/* 140 */ AMLog.debug(\"REST API : The timeout should be a valid one.\");\n/* 141 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.api.timeout.notvalidmessage\"), \"4216\");\n/* 142 */ return xmlString;\n/* */ }\n/* */ } else {\n/* 145 */ timeOut = Integer.parseInt(rs1.getString(\"timeout\"));\n/* 146 */ timeOut /= 1000;\n/* 147 */ MSreq.addParameter(\"timeout\", \"\" + timeOut);\n/* */ }\n/* 149 */ amform.setTimeout(timeOut);\n/* 150 */ if (request.getParameter(\"pollInterval\") != null) {\n/* */ try {\n/* 152 */ pollInterval = Integer.parseInt(request.getParameter(\"pollInterval\"));\n/* */ \n/* 154 */ MSreq.addParameter(\"pollInterval\", \"\" + pollInterval);\n/* */ } catch (Exception ex) {\n/* 156 */ AMLog.debug(\"REST API : The pollInterval should be a valid whole number.\");\n/* 157 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.api.pollinter.notvalidmessage\"), \"4201\");\n/* 158 */ return xmlString;\n/* */ }\n/* */ } else {\n/* 161 */ pollInterval = Integer.parseInt(rs1.getString(\"pollInterval\"));\n/* 162 */ pollInterval /= 60000;\n/* */ \n/* 164 */ MSreq.addParameter(\"pollInterval\", \"\" + pollInterval);\n/* */ }\n/* 166 */ amform.setPollInterval(pollInterval);\n/* 167 */ if (request.getParameter(\"urlMethod\") != null) {\n/* 168 */ if ((request.getParameter(\"urlMethod\").equals(\"P\")) || (request.getParameter(\"urlMethod\").equals(\"G\"))) {\n/* 169 */ MSreq.addParameter(\"method\", request.getParameter(\"urlMethod\"));\n/* */ } else {\n/* 171 */ AMLog.debug(\"REST API : The urlMethod should be P or G.\");\n/* 172 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.api.urlmethodempty.msg\"), \"4311\");\n/* 173 */ return xmlString;\n/* */ }\n/* */ } else {\n/* 176 */ MSreq.addParameter(\"method\", rs1.getString(\"urlMethod\"));\n/* */ }\n/* 178 */ if (request.getParameter(\"verifyError\") != null) {\n/* 179 */ if (request.getParameter(\"verifyError\").equals(\"true\")) {\n/* 180 */ MSreq.addParameter(\"verifyerror\", \"true\");\n/* 181 */ } else if (request.getParameter(\"verifyError\").equals(\"false\")) {\n/* 182 */ MSreq.addParameter(\"verifyerror\", \"\");\n/* */ } else {\n/* 184 */ AMLog.debug(\"REST API : The verifyError should be true or false.\");\n/* 185 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.api.editURL.verifyErrorMsg\"), \"4315\");\n/* 186 */ return xmlString;\n/* */ }\n/* */ } else {\n/* 189 */ verifyError = \"1\".equals(rs1.getString(\"verifyError\")) ? \"true\" : \"\";\n/* 190 */ MSreq.addParameter(\"verifyerror\", verifyError);\n/* */ }\n/* 192 */ MSreq.addParameter(\"userid\", request.getParameter(\"userName\") != null ? request.getParameter(\"userName\") : rs1.getString(\"userName\"));\n/* 193 */ MSreq.addParameter(\"errorcontent\", request.getParameter(\"errorIfMatch\") != null ? request.getParameter(\"errorIfMatch\") : rs1.getString(\"errorIfMatch\"));\n/* 194 */ MSreq.addParameter(\"checkfor\", request.getParameter(\"checkForContent\") != null ? request.getParameter(\"checkForContent\") : rs1.getString(\"checkForContent\"));\n/* 195 */ MSreq.addParameter(\"password\", request.getParameter(\"password\") != null ? request.getParameter(\"password\") : rs1.getString(\"password\"));\n/* 196 */ MSreq.addParameter(\"requestparams\", request.getParameter(\"requestParams\") != null ? request.getParameter(\"requestParams\") : reqParams);\n/* */ } else {\n/* 198 */ AMLog.debug(\"REST API : The url is not created before.\");\n/* 199 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.api.editURL.errorMsg\"), \"4316\");\n/* 200 */ return xmlString;\n/* */ }\n/* 202 */ if (request.getParameter(\"displayname\") != null) {\n/* 203 */ displayname = request.getParameter(\"displayname\");\n/* */ }\n/* 205 */ if (request.getParameter(\"url\") != null) {\n/* 206 */ strUrl = request.getParameter(\"url\");\n/* */ }\n/* 208 */ MSreq.addParameter(\"monitorname\", displayname);\n/* 209 */ MSreq.addParameter(\"url\", strUrl);\n/* 210 */ int httpvalueInt = 200;\n/* 211 */ httpCondition = \"GT\";\n/* 212 */ rs2 = AMConnectionPool.executeQueryStmt(query2);\n/* 213 */ if (rs2.next())\n/* */ {\n/* 215 */ httpCondition = rs2.getString(\"httpCondition\");\n/* 216 */ httpvalueInt = Integer.parseInt(rs2.getString(\"httpValue\"));\n/* */ }\n/* */ \n/* 219 */ if (request.getParameter(\"httpCondition\") != null) {\n/* 220 */ if ((request.getParameter(\"httpCondition\").equals(\"LT\")) || (request.getParameter(\"httpCondition\").equals(\"GT\")) || (request.getParameter(\"httpCondition\").equals(\"EQ\")) || (request.getParameter(\"httpCondition\").equals(\"NE\")) || (request.getParameter(\"httpCondition\").equals(\"LE\")) || (request.getParameter(\"httpCondition\").equals(\"GE\")))\n/* */ {\n/* 222 */ httpCondition = request.getParameter(\"httpCondition\");\n/* */ } else {\n/* 224 */ AMLog.debug(\"REST API : The httpCondition should be LT or GT or EQ or NE or LE or GE.\");\n/* 225 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.api.httpcondition.msg\"), \"4313\");\n/* 226 */ return xmlString;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 231 */ if (request.getParameter(\"httpValue\") != null) {\n/* */ try {\n/* 233 */ httpvalueInt = Integer.parseInt(request.getParameter(\"httpValue\"));\n/* */ } catch (Exception ex) {\n/* 235 */ AMLog.debug(\"REST API : The httpValue should be a valid Integer.\");\n/* 236 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.api.httpvalue.integermessage\"), \"4312\");\n/* 237 */ return xmlString;\n/* */ }\n/* */ }\n/* */ \n/* 241 */ MSreq.addParameter(\"httpcondition\", httpCondition);\n/* 242 */ MSreq.addParameter(\"httpvalue\", \"\" + httpvalueInt);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ try\n/* */ {\n/* 250 */ if (rs1 != null) {\n/* 251 */ rs1.close();\n/* */ }\n/* 253 */ if (rs2 != null) {\n/* 254 */ rs2.close();\n/* */ }\n/* */ } catch (Exception ex1) {\n/* 257 */ ex1.printStackTrace();\n/* */ }\n/* */ try\n/* */ {\n/* 261 */ MSreq.addParameter(\"type\", monType);\n/* 262 */ MSreq.addParameter(\"montype\", monType);\n/* 263 */ MSreq.addParameter(\"isAPI\", \"true\");\n/* 264 */ amform.setType(monType);\n/* 265 */ amform.setDisplayname(displayname);\n/* */ \n/* 267 */ CreateUrlMonitor creUrlMon = new CreateUrlMonitor();\n/* 268 */ creUrlMon.updateUrlMonitor(null, null, MSreq, response);\n/* 269 */ return AddMonitorAPIUtil.MessageXML(request, response, \"editUrlMonitor\", FormatUtil.getString(\"URL Monitor edited successfully.\"));\n/* */ }\n/* */ catch (Exception ex3) {\n/* 272 */ ex3.printStackTrace();\n/* 273 */ String errorMsg = ex3.getMessage();\n/* 274 */ AMLog.debug(\"REST API : Error: \" + errorMsg);\n/* 275 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"Error\") + \": \" + errorMsg, \"4444\");\n/* 276 */ AMLog.debug(\"REST API : Error in editing monitor by API\" + errorMsg);\n/* */ }\n/* */ }\n/* */ catch (Exception ex2)\n/* */ {\n/* 244 */ ex2.printStackTrace();\n/* 245 */ AMLog.debug(\"REST API : Server error.\");\n/* 246 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.apikey.wrongserver.message\"), \"4128\");\n/* 247 */ return xmlString;\n/* */ } finally {\n/* */ try {\n/* 250 */ if (rs1 != null) {\n/* 251 */ rs1.close();\n/* */ }\n/* 253 */ if (rs2 != null) {\n/* 254 */ rs2.close();\n/* */ }\n/* */ } catch (Exception ex1) {\n/* 257 */ ex1.printStackTrace();\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 277 */ return xmlString;\n/* */ }",
"@Test\n public void testExposesUpdate() throws Exception {\n Link customer = findCustomersLinks().iterator().next();\n byte[] bytes = Files.readAllBytes(Paths.get(\"src/test/resources/customer-update.txt\"));\n\n mockMvc\n .perform(put(customer.getHref())\n .contentType(MediaType.APPLICATION_JSON)\n .content(bytes))\n .andExpect(status().isNoContent());\n\n MockHttpServletResponse response2 = request(customer.getHref());\n\n assertThat(\"Firstname field was updated correctly\",\n JsonPath.read(response2.getContentAsString(), \"firstname\").toString(),\n is(\"Ralph\"));\n }",
"@retrofit2.http.FormUrlEncoded\n @PATCH(\"api/v2/sub_organizations/{id}.json_api\")\n Call<SubOrganization> update(\n @retrofit2.http.Path(\"id\") Integer id, @retrofit2.http.Query(\"include\") String include, @retrofit2.http.Field(\"name\") String name\n );",
"@Test\n public void updateConversationRest() {\n Conversation original = new Conversation();\n\n Conversation modified = restTemplate.postForObject(\n String.format(\"%s/api/conversations/%s\", baseUri(), MAIN_BLOG_NAME), original, Conversation.class);\n assertThat(modified).isNotNull();\n\n modified.setNumMessages(5);\n modified.setParticipant(\"new participant\");\n modified.setParticipantAvatarUrl(\"avatar URL\");\n modified.setParticipantId(\"pid123\");\n modified.setHideConversation(true);\n\n restTemplate.put(String.format(\"%s/api/conversations/%s/%d\", baseUri(), MAIN_BLOG_NAME, modified.getId()),\n modified);\n\n Conversation finalFromServer = restTemplate.getForObject(\n String.format(\"%s/api/conversations/%s/byParticipant/%s\", baseUri(), MAIN_BLOG_NAME, \"new participant\"),\n Conversation.class);\n\n assertThat(finalFromServer).isNotNull();\n assertThat(finalFromServer).isEqualToComparingFieldByField(modified);\n }",
"@POST\r\n @Consumes\r\n @Path(\"/updatedoc\")\r\n public String updatedoc(Doc doc) throws JSONException {\r\n JSONObject result = new JSONObject();\r\n\r\n try {\r\n Doc d = dDao.getById(doc.getId());\r\n\r\n if (doc.getFinancetarget() != null) {\r\n d.setFinancetarget(doc.getFinancetarget());\r\n }\r\n\r\n if (doc.getCashbackup() != null) {\r\n d.setCashbackup(doc.getCashbackup());\r\n }\r\n\r\n if (doc.getProtectproduct() != null) {\r\n d.setProtectproduct(doc.getProtectproduct());\r\n }\r\n\r\n if (doc.getInvestgoods() != null) {\r\n d.setInvestgoods(doc.getInvestgoods());\r\n }\r\n\r\n if (doc.getHousing() != null) {\r\n d.setHousing(doc.getHousing());\r\n }\r\n\r\n if (doc.getBalance() != null) {\r\n d.setBalance(doc.getBalance());\r\n }\r\n\r\n if (doc.getCashplanning() != null) {\r\n d.setCashplanning(doc.getCashplanning());\r\n }\r\n\r\n if (doc.getRiskmanage() != null) {\r\n d.setRiskmanage(doc.getRiskmanage());\r\n }\r\n\r\n if (doc.getRiskstate() != null) {\r\n d.setRiskstate(doc.getRiskstate());\r\n\r\n }\r\n\r\n if (doc.getInvestplanning() != null) {\r\n d.setInvestplanning(doc.getInvestplanning());\r\n }\r\n\r\n if (doc.getEducationplanning() != null) {\r\n d.setEducationplanning(doc.getEducationplanning());\r\n }\r\n d.setUpdatetime(new Timestamp(System.currentTimeMillis()));\r\n dDao.save(d);\r\n\r\n result.put(\"msg\", \"修改成功\");\r\n result.put(\"status\", 0);\r\n } catch (Exception e) {\r\n result.put(\"msg\", \"发生错误\");\r\n result.put(\"status\", 1);\r\n }\r\n\r\n return result.toString();\r\n }",
"@ApiOperation(value = \"/search_for_update_TestNO/{TestNO_id}\", httpMethod = \"GET\",notes = \"updates a noun of TestNO\",response = TestNO.class)\n\t@ApiResponses(value = {\n\t\t@ApiResponse(code = 200, message = TestSwaggerUIConstants.SUCCESS),\n\t @ApiResponse(code = 404, message = TestSwaggerUIConstants.NOT_FOUND),\n\t @ApiResponse(code = 500, message = TestSwaggerUIConstants.INTERNAL_SERVER_ERROR),\n\t @ApiResponse(code = 400, message = TestSwaggerUIConstants.BAD_REQUEST),\n\t @ApiResponse(code = 412, message = TestSwaggerUIConstants.PRE_CONDITION_FAILED) })\n\n\n\t@RequestMapping(method = RequestMethod.GET,value = \"/search_for_update_TestNO/{TestNO_id}\" ,headers=\"Accept=application/json\")\n @ResponseBody\n\tpublic TestNO search_for_update_TestNO(@PathVariable(\"TestNO_id\")long TestNO_id) throws Exception {\n\n\t\tlog.setLevel(Level.INFO);\n\t log.info(\"search_for_update_TestNO controller started operation!\");\n\n\t\tTestNO the_TestNO = new TestNO();\n\n\t\tthe_TestNO = TestNO_Default_Activity_service.testno_search_for_update(TestNO_id, super.getUser());\n\n\t\tlog.info(\"Object returned from search_for_update_TestNO method !\");\n\n\t\treturn the_TestNO;\n\n\n\t}",
"@Test(groups = { \"wso2.esb\" }, description = \"agilezen {updateTask} integration test with optional parameters.\", dependsOnMethods = { \"testCreateTaskWithOptionalParameters\" })\n public void testUpdateTaskWithOptionalParameters() throws IOException, JSONException {\n esbRequestHeadersMap.put(\"Action\", \"urn:updateTask\");\n \n final String apiEndPoint =\n apiRequestUrl + \"/projects/\" + connectorProperties.getProperty(\"projectId\") + \"/stories/\"\n + connectorProperties.getProperty(\"storyId\") + \"/tasks/\"\n + connectorProperties.getProperty(\"taskIdOptional\");\n RestResponse<JSONObject> apiRestResponseBefore = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_updateTask_optional.json\");\n \n RestResponse<JSONObject> apiRestResponseAfter = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n Assert.assertNotEquals(apiRestResponseBefore.getBody().getString(\"text\"), apiRestResponseAfter.getBody()\n .getString(\"text\"));\n Assert.assertNotEquals(apiRestResponseBefore.getBody().getString(\"status\"), apiRestResponseAfter.getBody()\n .getString(\"status\"));\n \n Assert.assertEquals(connectorProperties.getProperty(\"textTaskUpdated\"), apiRestResponseAfter.getBody()\n .getString(\"text\"));\n Assert.assertEquals(connectorProperties.getProperty(\"statusUpdated\"), apiRestResponseAfter.getBody().getString(\n \"status\"));\n }",
"void editMyPost(Post post);",
"private void add_ratereview(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tint hotel_userid;\n\t\tString name_user = (String) request.getSession().getAttribute(\"username\");\n\t\tServletContext servletContext = getServletContext();\n\t\tWebApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);\n\t\tuserDaoImplementation userDaoImplementation = (userDaoImplementation) appContext\n\t\t\t\t.getBean(\"userDaoImplementation\");\n\t\tUser user1 = null;\n\t\tuser1 = userDaoImplementation.getuserbyid(name_user);\n\t\thotel_userid = user1.getUserId();\n\t\tString hotel_id = request.getParameter(\"key\");\n\t\tString hotel_name = request.getParameter(\"key_Name\");\n\t\tString hotel_loc = request.getParameter(\"key_loc\");\n\t\tString rrate = request.getParameter(\"review_rate\");\n\t\tString rreview = request.getParameter(\"rate_review\");\n\t\tRateReview rateReview = new RateReview();\n\t\trateReview.setRest_id(Integer.parseInt(hotel_id));\n\t\tSystem.out.println(\"sddede\"+hotel_id);\n\t\trateReview.setUser_id(hotel_userid);\n\t\trateReview.setRate(Integer.parseInt(rrate));\n\t\trateReview.setReview(rreview);\n\t\trestDaoImplementation restDaoImplementation = (restDaoImplementation) appContext\n\t\t\t\t.getBean(\"restDaoImplementation\");\n\t\tRest rest1 = null;\n\t\trest1 = restDaoImplementation.getrestbyid(Integer.parseInt(hotel_id));\n\t\tint count = rest1.getCount();\n\t\tfloat ratefrmrest = rest1.getRate_avg();\n\t\tfloat totalrating = (count * ratefrmrest) + (Integer.parseInt(rrate));\n\t\tint updated_count = count + 1;\n\t\tfloat final_rate = totalrating / updated_count;\n\t\tRest rest = new Rest();\n\t\trest.setCount(updated_count);\n\t\trest.setRate_avg(final_rate);\n\t\trest.setLocation(hotel_loc);\n\t\trest.setRestId(Integer.parseInt(hotel_id));\n\t\trest.setRestName(hotel_name);\n\t\trestDaoImplementation.updateRest_info(rest);\n\t\trrDaoImplementation rrDaoImplementation = (rrDaoImplementation) appContext.getBean(\"rrDaoImplementation\");\n\t\trrDaoImplementation.insert(rateReview);\n\t\tresponse.sendRedirect(\"restaurant\");\n\n\t}",
"@Override\r\n\tpublic String update() {\n\t\tSystem.out.println(\"updateView.\");\r\n\t\t\r\n\t\t//javax.servlet.http.HttpSession session=request.getSession();\r\n\t\t//javax.servlet.ServletContext application=request.getServletContext();\r\n\t\t\r\n\t\t//String vId=request.getParameter(\"id\");\r\n\t\tif(!SysFun.isNullOrEmpty(id)) {\r\n\t\t\tLong iId=SysFun.parseLong(id);\r\n\t\t\tHeadLine bean=headLineService.load(iId);\r\n\t\t\t\r\n\t\t\tif(bean!=null) {\r\n\t\t\t\t\r\n\t\t\t\trequest.put(\"Id\", bean.getId());\r\n\t\t\t\trequest.put(\"lineName\", bean.getLineName());\r\n\t\t\t\trequest.put(\"lineLink\", bean.getLineLink());\r\n\t\t\t\t//request.put(\"lineImg\", bean.getLineImg());\r\n\t\t\t\treturn \"update\";\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn \"go_preload\";\r\n\t}",
"@RequestMapping(value = \"/upworkUpdateURL/\", method = RequestMethod.POST)\n\tpublic String upworkUpdateURL(HttpServletRequest req,\n\t\t\t@RequestParam(value = \"u_publicUrl\", defaultValue = \"null\") String u_publicUrl) {\n\t\tSystem.out.println(\">>> Start Upwork crawling...\");\n\t\tSystem.out.println(\"Updating Upwork Data!\");\n\t\tHttpSession session = req.getSession();\n\t\tString username = (String) session.getAttribute(\"username\");\n\t\tSystem.out.println(\"Here upWorkUpdateURL: \" + username);\n\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n\t\tDate date = new Date();\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\trestTemplate.setErrorHandler(new DefaultResponseErrorHandler() {\n\t\t\tprotected boolean hasError(HttpStatus statusCode) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\tSocialMediaAccess smaNewCreate = new SocialMediaAccess(username, \"upWork\", \"upWorkUrl\", u_publicUrl,\n\t\t\t\t\"long_live\", dateFormat.format(date));\n\t\tResponseEntity<SocialMediaAccess> smaUpWork = restTemplate.getForEntity(uriReadSM + username + \"/upWork/\",\n\t\t\t\tSocialMediaAccess.class);\n\n\t\tSystem.out.println(\"--------------------------START check in smaUpWork. username: \" + username);\n\t\tif (smaUpWork.getStatusCode().equals(HttpStatus.OK)) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------***START. There is smaUpWork in database. need to UPDATE. smaFB.id: \"\n\t\t\t\t\t\t\t+ smaUpWork.getBody().getSma_id());\n\t\t\tsmaNewCreate.setSma_id(smaUpWork.getBody().getSma_id());\n\t\t\trestTemplate.put(uriUpdateSMA, smaNewCreate);\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------***END. There is smaUpWork in database. need to UPDATE. smaFB.id: \"\n\t\t\t\t\t\t\t+ smaUpWork.getBody().getSma_id());\n\t\t} else {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------******START. There is NO smaUpWork in database. need to CREATE.\");\n\t\t\tResponseEntity<SocialMediaAccess> resmaCreated = restTemplate.postForEntity(uriCreateSMA, smaNewCreate,\n\t\t\t\t\tSocialMediaAccess.class);\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"--------------------------******END. There is NO smaUpWork in database. need to CREATE.\");\n\t\t}\n\t\tSystem.out.println(\"--------------------------END check in smaUpWork\");\n\n\t\t// START getting upWork data skills\n\t\tResponseEntity<String[]> allSkills = restTemplate.postForEntity(uriGetUpworkSkillsWeb + \"/\" + username + \"/\",\n\t\t\t\tu_publicUrl, String[].class);\n\t\tSystem.out.println(\"upwork allskills.getbody length = \" + allSkills.getBody().length);\n\n\t\t/*\n\t\t * ResponseEntity<TestDTO[]> allTests =\n\t\t * restTemplate.postForEntity(uriGetUpworkTests, u_publicUrl,\n\t\t * TestDTO[].class); System.out.println(\n\t\t * \"upwork alltests.getbody length = \" + allTests.getBody().length);\n\t\t */\n\t\t// START storing of upWork data to database\n\t\tLinkedList<String> seekerSkills = new LinkedList<>();\n\t\tJobSeekerSkills jss = new JobSeekerSkills();\n\t\tboolean proceed = false;\n\t\tfor (String skill : allSkills.getBody()) {\n\t\t\tjss.setUsername(username);\n\t\t\tjss.setSkill_name(skill);\n\t\t\tseekerSkills.add(skill);\n\t\t\tSystem.out.println(\"In JobSeeker Controller. UpworkSkills are:: \" + skill);\n\t\t\tResponseEntity<JobSeekerSkills> rejsk = restTemplate.postForEntity(uriCreateJobSeekerSkills, jss,\n\t\t\t\t\tJobSeekerSkills.class);\n\t\t\tif (rejsk.getStatusCode().equals(HttpStatus.OK)) {\n\t\t\t\tSystem.out.println(\"Success create jobseeker skills!\");\n\t\t\t\tproceed = true;\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Failed to create jobseeker skill!\");\n\t\t\t}\n\t\t}\n\n\t\tif (proceed) {\n\t\t\t// start reading job postings and matched skills to alert jobseeker\n\t\t\tResponseEntity<JobPost[]> readAllJobPostings = restTemplate.getForEntity(uriGetListJobPosts,\n\t\t\t\t\tJobPost[].class);\n\t\t\tif (readAllJobPostings.getStatusCode().equals(HttpStatus.OK)) {\n\t\t\t\tSystem.out.println(\">>Retrieved posts\");\n\t\t\t\tfor (JobPost jp : readAllJobPostings.getBody()) {\n\t\t\t\t\tLinkedList<String> jobPostSkillsReq = new LinkedList<>();\n\t\t\t\t\tResponseEntity<JobPostSkills[]> getAllJobPostSkillsReq = restTemplate.getForEntity(\n\t\t\t\t\t\t\turiGetAllJobPostSkillsReqByID + jp.getJob_post_id() + \"/\", JobPostSkills[].class);\n\t\t\t\t\tif (getAllJobPostSkillsReq.getStatusCode().equals(HttpStatus.OK)) {\n\t\t\t\t\t\tSystem.out.println(\">>>Retrieved JobPostSkills\");\n\t\t\t\t\t\tfor (JobPostSkills s : getAllJobPostSkillsReq.getBody()) {\n\t\t\t\t\t\t\tjobPostSkillsReq.add(s.getSkill_name());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (jobPostSkillsReq.isEmpty()) {\n\t\t\t\t\t\t\tSystem.out.println(\"JOB POST ID has empty skills req.. skip..\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// check skills matching : jobseeker skills vs\n\t\t\t\t\t\t\t// jobPost\n\t\t\t\t\t\t\t// skills req\n\t\t\t\t\t\t\tSystem.out.println(\"seekerSkills size = \" + seekerSkills.size());\n\t\t\t\t\t\t\tSystem.out.println(\"jobPostSkillsReq size = \" + jobPostSkillsReq.size());\n\t\t\t\t\t\t\tSkillMonitor skillMonitor = new SkillMonitor(seekerSkills, jobPostSkillsReq);\n\t\t\t\t\t\t\tdouble skill_score = skillMonitor.computeSkillScore();\n\t\t\t\t\t\t\tLinkedList<String> matchedSkills = skillMonitor.getMatchedJsSkills();\n\t\t\t\t\t\t\tString keywords = \"\";\n\t\t\t\t\t\t\tfor (String str : matchedSkills) {\n\t\t\t\t\t\t\t\tkeywords = keywords.concat(str + \",\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (skill_score <= 0.0) {\n\t\t\t\t\t\t\t\t// skip not recommended //no skills match\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\">>>Relevant Skills Matched\");\n\t\t\t\t\t\t\t\tJobAlert j = new JobAlert();\n\t\t\t\t\t\t\t\tj.setAlertName(jp.getJob_title());\n\t\t\t\t\t\t\t\tj.setLocation(jp.getLocation());\n\t\t\t\t\t\t\t\tj.setJob_post_id(jp.getJob_post_id());\n\t\t\t\t\t\t\t\tj.setJsUsername(username);\n\t\t\t\t\t\t\t\tj.setStatus(\"Not yet Applied\");\n\t\t\t\t\t\t\t\tj.setDateCreated(jp.getDate_posted());\n\t\t\t\t\t\t\t\tj.setKeywords(keywords.substring(0, keywords.length() - 1));\n\t\t\t\t\t\t\t\tResponseEntity<JobAlert> readExisting = restTemplate.getForEntity(\n\t\t\t\t\t\t\t\t\t\turiCheckExistingAlert + \"/\" + username + \"/\" + jp.getJob_post_id() + \"/\",\n\t\t\t\t\t\t\t\t\t\tJobAlert.class);\n\t\t\t\t\t\t\t\tif (readExisting.getBody() != null) {\n\t\t\t\t\t\t\t\t\t// update alert\n\t\t\t\t\t\t\t\t\tj.setId(readExisting.getBody().getId());\n\t\t\t\t\t\t\t\t\tj.setJob_post_id(readExisting.getBody().getJob_post_id());\n\t\t\t\t\t\t\t\t\trestTemplate.put(uriUpdateAlert, j);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tResponseEntity<JobAlert> reCreateJobAlert = restTemplate\n\t\t\t\t\t\t\t\t\t\t\t.postForEntity(uriCreateJobAlert, j, JobAlert.class);\n\t\t\t\t\t\t\t\t\tif (reCreateJobAlert.getStatusCode().equals(HttpStatus.OK)) {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\">>>Success create job Alert!\");\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tSystem.err.println(\">>>Failed to create job alert!\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// no alerts created\n\t\t}\n\n\t\tSystem.out.println(\">>> END Upwork data crawling!\");\n\t\t// END storing of upWork data to database\n\t\t// END getting upWork data\n\t\treturn \"redirect:../home\";\n\t}",
"@FormUrlEncoded\n @POST(\"users/{id}/edit\")\n Call<User> updateUserWithForm(@Path(\"id\")int id, @Field(\"name\")String name,@Field(\"points\")int point);",
"public void update(RtnListVO rtnListVO);",
"public interface OrderStatusChangeApi {\n\n @FormUrlEncoded\n @POST(Urls.SUB_URL_ADMIN_CHANGE_STATUS)\n Call<ChangeStatusData> requestOrderStatusChange(@Field(\"access_token\") String access_token, @Field(\"order_id\") String order_id\n , @Field(\"cancel\") boolean type);\n\n @GET(Urls.SUB_URL_ADMIN_CHANGE_TOTAL)\n Call<ChangeTotalData> requestOrderChangeTotal(@Query(\"access_token\") String access_token, @Query(\"order_id\") String order_id\n , @Query(\"total_new\") String new_total);\n\n}",
"@Test(groups = { \"wso2.esb\" }, description = \"agilezen {updateStory} integration test with optional parameters.\", dependsOnMethods = { \"testCreateStoryWithOptionalParameters\" })\n public void testUpdateStoryWithOptionalParameters() throws IOException, JSONException {\n esbRequestHeadersMap.put(\"Action\", \"urn:updateStory\");\n final String apiEndPoint =\n apiRequestUrl + \"/projects/\" + connectorProperties.getProperty(\"projectId\") + \"/stories/\"\n + connectorProperties.getProperty(\"storyId\") + \"?with=\"\n + connectorProperties.getProperty(\"enrichments\");\n \n RestResponse<JSONObject> apiRestResponseBefore = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_updateStory_optional.json\");\n \n RestResponse<JSONObject> apiRestResponseAfter = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n Assert.assertNotEquals(apiRestResponseBefore.getBody().getString(\"text\"), apiRestResponseAfter.getBody()\n .getString(\"text\"));\n Assert.assertNotEquals(apiRestResponseBefore.getBody().getString(\"details\"), apiRestResponseAfter.getBody()\n .getString(\"details\"));\n Assert.assertNotEquals(apiRestResponseBefore.getBody().getString(\"size\"), apiRestResponseAfter.getBody()\n .getString(\"size\"));\n Assert.assertNotEquals(apiRestResponseBefore.getBody().getString(\"priority\"), apiRestResponseAfter.getBody()\n .getString(\"priority\"));\n Assert.assertNotEquals(apiRestResponseBefore.getBody().getString(\"color\"), apiRestResponseAfter.getBody()\n .getString(\"color\"));\n \n }",
"public boolean updateAppointment(Appointment app);",
"@Override\n public void updateView() throws Exception{\n Connection conn = null;\n PreparedStatement pr = null;\n ResultSet rs = null;\n try {\n String query = \"Update [view] set viewed = viewed + 1\";\n conn = getConnection();\n pr = conn.prepareStatement(query);\n pr.executeUpdate();\n } catch (Exception ex) {\n throw ex;\n } finally {\n closeResultSet(rs);\n closePreparedStatement(pr);\n closeConnection(conn);\n }\n }",
"public void test_02() {\n\n\t\tResponse reponse = given().\n\t\t\t\tbody(\"{\\\"first_name\\\": \\\"updated by PATCH Rahaman\\\"}\").\n\t\t\t\twhen().\n\t\t\t\tcontentType(ContentType.JSON).\n\t\t\t\tpatch(\"http://localhost:3000/posts/05\");\n\n\t\tSystem.out.println(\"updated response data \"+ reponse.asString());\t\t\t\n\t}",
"@Test(dependsOnMethods = { \"testAssignTaskWithNegativeCase\" },\n description = \"podio {updateTask} integration test with optonal parameters.\")\n public void testUpdateTaskWithOptionalParameters() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:updateTask\");\n \n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_updateTask_optional.json\");\n String taskId = esbRestResponse.getBody().getString(\"task_id\");\n \n String apiEndPoint = apiUrl + \"/task/\" + taskId;\n \n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n Assert.assertEquals(esbRestResponse.getBody().getJSONObject(\"created_by\").getString(\"name\"), apiRestResponse\n .getBody().getJSONObject(\"created_by\").getString(\"name\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"text\"), apiRestResponse.getBody().getString(\"text\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"external_id\"),\n apiRestResponse.getBody().getString(\"external_id\"));\n }",
"@Test\n public void gTestUpdatePlaylist() {\n MultiValueMap<String, String> body = new LinkedMultiValueMap<>();\n body.add(\"name\", \"Updated Test\");\n\n given()\n .header(\"X-Authorization\", token)\n .formParam(\"name\", \"Updated Playlist\")\n .put(\"/playlists/\" + playlistId)\n .then()\n .statusCode(200);\n }",
"private void hitEditProfileApi() {\n appUtils.showProgressDialog(getActivity(), false);\n HashMap<String, String> params = new HashMap<>();\n params.put(ApiKeys.NAME, etFirstName.getText().toString().trim());\n params.put(ApiKeys.PHONE_NO, etPhoneNo.getText().toString().trim());\n params.put(ApiKeys.ADDRESS, etAdress.getText().toString().trim());\n params.put(ApiKeys.POSTAL_CODE, etPostal.getText().toString().trim());\n\n if (countryId != null) {\n params.put(ApiKeys.COUNTRY, countryId);\n }\n if (stateId != null) {\n params.put(ApiKeys.STATE, stateId);\n }\n if (cityId != null) {\n params.put(ApiKeys.CITY, cityId);\n }\n\n ApiInterface service = RestApi.createService(ApiInterface.class);\n Call<ResponseBody> call = service.editProfile(AppSharedPrefs.getInstance(getActivity()).\n getString(AppSharedPrefs.PREF_KEY.ACCESS_TOKEN, \"\"), appUtils.encryptData(params));\n ApiCall.getInstance().hitService(getActivity(), call, new NetworkListener() {\n @Override\n public void onSuccess(int responseCode, String response) {\n try {\n JSONObject mainObject = new JSONObject(response);\n if (mainObject.getInt(ApiKeys.CODE) == 200) {\n JSONObject dataObject = mainObject.getJSONObject(\"DATA\");\n changeEditMode(false);\n isEditModeOn = false;\n ((EditMyAccountActivity) getActivity()).setEditButtonLabel(getString(R.string.edit));\n\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.USER_NAME, dataObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.USER_MOBILE, dataObject.getString(ApiKeys.MOBILE_NUMBER));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.ADDRESS, dataObject.getString(ApiKeys.ADDRESS));\n JSONObject countryObject = dataObject.getJSONObject(ApiKeys.COUNTRY_ID);\n JSONObject stateObject = dataObject.getJSONObject(ApiKeys.STATE_ID);\n JSONObject cityObject = dataObject.getJSONObject(ApiKeys.CITY_ID);\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.COUNTRY_NAME, countryObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.STATE_NAME, stateObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.CITY_NAME, cityObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.ISO_CODE, countryObject.getString(ApiKeys.ISO_CODE));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.COUNTRY_ID, countryObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.STATE_ID, stateObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.CITY_ID, cityObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.POSTAL_CODE, dataObject.optString(ApiKeys.POSTAL_CODE));\n\n } else if (mainObject.getInt(ApiKeys.CODE) == ApiKeys.UNAUTHORISED_CODE) {\n appUtils.logoutFromApp(getActivity(), mainObject.optString(ApiKeys.MESSAGE));\n } else {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), mainObject.optString(ApiKeys.MESSAGE));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onSuccessErrorBody(String response) {\n\n }\n\n @Override\n public void onFailure() {\n\n }\n });\n\n }",
"@Test\n public void testUpdateExample() throws Exception{\n MvcResult result = this.mockMvc.perform(get(\"/api/example/{id}\",50))\n .andExpect(status().is2xxSuccessful())\n .andReturn();\n\n // Parses it\n Example example = convertFromJson(result.getResponse().getContentAsString(), Example.class);\n \n // Change name value\n example.setName(\"Test 27\");\n\n // Updates it and checks if it was updated\n this.mockMvc.perform(put(\"/api/example\")\n .contentType(MediaType.APPLICATION_JSON)\n .content(convertToJson(example)))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.name\", equalTo(\"Test 27\")));\n }",
"CompletableFuture<PostResponse> updatePost(Post post);",
"@PUT \r\n @Path(\"/update\") \r\n @Consumes(MediaType.APPLICATION_JSON) \r\n @Produces(MediaType.TEXT_PLAIN) \r\n public String updateItem(String itemData) {\n \tJsonObject itemObject = new JsonParser().parse(itemData).getAsJsonObject(); \r\n \r\n \t//Read the values from the JSON object \r\n \tint appointmentID = itemObject.get(\"appointmentID\").getAsInt(); \r\n \tString patientID = itemObject.get(\"patientID\").getAsString(); \r\n \tString Date = itemObject.get(\"Date\").getAsString(); \r\n \tString docName = itemObject.get(\"docName\").getAsString(); \r\n \tString hosName = itemObject.get(\"hosName\").getAsString(); \r\n \tString appType = itemObject.get(\"appType\").getAsString(); \r\n \r\n String output = appObj.updateAppointment(appointmentID,patientID, Date, docName, hosName, appType); \r\n \r\n \treturn output; \r\n }",
"int updateByExample(@Param(\"record\") StatusReplies record, @Param(\"example\") StatusRepliesExample example);",
"@Test\n\t@Override\n\tpublic void testUpdateObjectOKJson() throws Exception {\n\t}",
"void updateViewFromModel();",
"@PUT\n\t@Consumes({\"text/turtle\",\"application/rdf+xml\"})\n\tResponse updateResource(String body, @HeaderParam(\"Accept\") String format);",
"@Test\n public void shouldPartiallyUpdateAPaymentViaPatch() throws Exception {\n ResponseEntity<String> response = postTestPaymentAndGetResponse();\n String location = getLocationHeader(response);\n\n //when: just the organisation_id is updated:\n HttpEntity entity = getHttpEntityForTestRequest(\"{\\\"organisation_id\\\":\\\"newOrganisationId\\\"}\");\n RestTemplate restTemplateForPatch = getRestTemplateForPatch();\n ResponseEntity<String> patchResponse = restTemplateForPatch.exchange(location, HttpMethod.PATCH, entity, String.class);\n //then: a 200 ok status code is returned:\n assertEquals(HttpStatus.OK, patchResponse.getStatusCode());\n\n //when: the payment is fetched again:\n Payment updatedPayment = restTemplate.getForEntity(location, Payment.class).getBody();\n //then: the data on the response should be correct, e.g. check the orgainsation_id field:\n assertEquals(\"newOrganisationId\", updatedPayment.getOrganisationId());\n }",
"public interface RankClient {\n @POST(\"api/givefeedback\")\n @FormUrlEncoded\n Call<Response> giverank (@Field(\"reviewer\") String reviewer,\n @Field(\"reviewee\") String reviewee,\n @Field(\"rank\") int rank);\n}",
"@Test\n\tpublic void updateTestPaperQuestion() throws Exception {\n\t}",
"@PUT\n\t@Path(\"/\")\n\t@Nonnull\n\t@Consumes(MediaType.APPLICATION_JSON)\n\t@Produces(MediaType.APPLICATION_JSON)\n\tExercise update(@Nonnull Exercise exercise);",
"@PatchMapping(\"{id}\")\n public Lesson updateLessonName(@RequestBody String name, @PathVariable long id) {\n //code\n return null;\n }",
"@Test\n\tpublic void testUpdateTask() {\n\t}",
"@Test\r\n\tpublic void UpdatebookingTest()\r\n\t{\n\t\t\r\n\t\tResponse responsecreate = createBooking(); \r\n\t\tresponsecreate.print();\r\n\t\t//get bookingid of booking\r\n\t\tint bookingid=responsecreate.jsonPath().getInt(\"bookingid\");\r\n\t\t\r\n\t\t//update \r\n\t\t//\r\n\t\t\r\n\t\tJSONObject body=new JSONObject();\r\n\t\tbody.put(\"firstname\", \"Devaaa\");\r\n\t\tbody.put(\"lastname\", \"Dadhavjadhav\");\r\n\t\tbody.put(\"totalprice\", 125);\r\n\t\tbody.put(\"depositpaid\", false);\r\n\r\n \r\n\t\tJSONObject bookingdates=new JSONObject();\r\n\t\tbookingdates.put(\"checkin\", \"2021-08-16\");\r\n\t\tbookingdates.put(\"checkout\", \"2021-09-17\");\r\n\t\t\r\n\t\tbody.put(\"bookingdates\", bookingdates);\r\n\t\tbody.put(\"additionalneeds\", \"Breakfast\");\r\n\t\t\r\n\t\t// update booking //username and password add\r\n\r\n\t\tResponse responseUpdate=RestAssured.given().auth().preemptive().basic(\"admin\", \"password123\").contentType(ContentType.JSON)\r\n\t\t\t\t.body(body.toString()).put(\"https://restful-booker.herokuapp.com/booking/\"+ bookingid);\r\n\t\t\r\n\t\tresponseUpdate.print();\r\n\t\tresponseUpdate.getStatusCode();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t// verify response 200\r\n\t\tAssert.assertEquals(responseUpdate.getStatusCode(), 200);\r\n//\t\t\t//verify all field\r\n//\t\t\tSoftAssert softassert=new SoftAssert();\r\n//\t\t\t\r\n//\t\t\tString actualfirstname=response.jsonPath().getString(\"firstname\");\r\n//\t\t\tsoftassert.assertEquals(actualfirstname, \"deva\");\r\n//\t\t\t\r\n//\t\t\tString actuallastname=response.jsonPath().getString(\"lastname\");\r\n//\t\t\tsoftassert.assertEquals(actuallastname, \"jadhav\");\r\n//\t\t\t\r\n//\t\t\tint actualtotalprice=response.jsonPath().getInt(\"totalprice\");\r\n//\t\t\tsoftassert.assertEquals(actualtotalprice, 255);\r\n//\t\t\t\r\n//\t\t\tboolean actualdepositpaid=response.jsonPath().getBoolean(\"depositpaid\");\r\n//\t\t\tsoftassert.assertFalse(actualdepositpaid, \"false\");\r\n//\t\t\t \r\n//\t\t\tString actualcheckin=response.jsonPath().getString(\"bookingdates.checkin\");\r\n//\t\t\tsoftassert.assertEquals(actualcheckin, \"2021-08-14\");\r\n//\t\t\t\r\n//\t\t\tString actualcheckout=response.jsonPath().getString(\"bookingdates.checkout\");\r\n//\t\t\tsoftassert.assertEquals(actualcheckout, \"2021-09-07\");\r\n//\t\t\t\r\n//\t\t\tString actualadditionalneeds=response.jsonPath().getString(\"additionalneeds\");\r\n//\t\t\tsoftassert.assertEquals(actualadditionalneeds, \"c\");\r\n//\t\t\tsoftassert.assertAll();\r\n//\t\r\n\r\n}",
"int updateByPrimaryKey(ExamineApproveResult record);",
"@Test(groups = { \"wso2.esb\" }, description = \"agilezen {updateComment} integration test with optional parameters.\", dependsOnMethods = { \"testCreateCommentWithMandatoryParameters\" })\n public void testUpdateCommentWithOptionalParameters() throws IOException, JSONException {\n esbRequestHeadersMap.put(\"Action\", \"urn:updateComment\");\n \n final String apiEndPoint =\n apiRequestUrl + \"/projects/\" + connectorProperties.getProperty(\"projectId\") + \"/stories/\"\n + connectorProperties.getProperty(\"storyId\") + \"/comments/\"\n + connectorProperties.getProperty(\"commentIdMandatory\");\n RestResponse<JSONObject> apiRestResponseBefore = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_updateComment_optional.json\");\n \n RestResponse<JSONObject> apiRestResponseAfter = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n Assert.assertNotEquals(apiRestResponseBefore.getBody().getString(\"text\"), apiRestResponseAfter.getBody()\n .getString(\"text\"));\n Assert.assertEquals(connectorProperties.getProperty(\"textCommentUpdated\"), apiRestResponseAfter.getBody()\n .getString(\"text\"));\n }",
"@Test\r\n public void testUpdate() {\r\n }",
"int updateByExample(@Param(\"record\") Tour record, @Param(\"example\") TourExample example);",
"int updateByPrimaryKey(EvaluationRecent record);",
"@Override\n public void onClick(View v) {\n\n HashMap <String, String> data = new LinkedHashMap<>();\n\n data.put(\"id\", idStory);\n data.put(\"name\", titulo_upd.getText().toString());\n data.put(\"synopsis\", synopsis_upd.getText().toString());\n data.put(\"genre_id\", String.valueOf(gl_genre_id));\n data.put(\"user_id\", channel);\n\n\n JSONObject jsonObject = new JSONObject (data);\n\n System.out.print(jsonObject.toString());\n\n VolleySingleton.getInstance(getContext()).addToRequestQueue(\n new JsonObjectRequest(\n Request.Method.POST,\n Constantes.UPDATE_STORY,\n jsonObject,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n //generarPersonaje(response);\n Toast.makeText(getActivity(), \"Story has been update\", Toast.LENGTH_SHORT).show();\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n //Toast.makeText(getActivity().getApplicationContext(), error.getMessage(), Toast.LENGTH_LONG).show();\n Toast.makeText(getActivity().getApplicationContext(), \"An error has occur. Please try again.\", Toast.LENGTH_LONG).show();\n }\n }\n ) {\n @Override\n public Map<String, String> getHeaders() {\n Map<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n headers.put(\"Accept\", \"application/json\");\n return headers;\n }\n\n @Override\n public String getBodyContentType() {\n return \"application/json; charset=utf-8\" + getParamsEncoding();\n }\n }\n );\n\n }",
"int updateByExample(TResearchTeach record, TResearchTeachExample example);",
"@RestAPI\n \t@PreAuthorize(\"hasAnyRole('A')\")\n \t@RequestMapping(value = \"/api/{id}\", params = \"action=update\", method = RequestMethod.PUT)\n \tpublic HttpEntity<String> update(@PathVariable(\"id\") Long id) {\n \t\tagentManagerService.update(id);\n \t\treturn successJsonHttpEntity();\n \t}",
"@Test\n public void testUpdate() {\n\n }",
"@RequestMapping(value = \"/recomend\", method = RequestMethod.POST, produces = \"application/json\")\n\t@ResponseBody\n\tpublic void recomendShow(\n\t\t\t@RequestParam(\"tmdb_id\") String tmdb_id,\n\t\t\t@RequestParam(\"title\") String title,\n\t\t\t@RequestParam(\"overview\") String overview, \n\t\t\t@RequestParam(\"poster_path\") String poster_path,\n\t\t\t@RequestParam(\"genres\") String genres,\n\t\t\tHttpServletRequest request, HttpServletResponse response) throws IOException{\n\t\tUser user = new User();\n\t\t\n\t\t//Getting user authentication token\n\t\tString authToken = checkToken(request, response);\n\t\t\t\t\n\t\t//Check validation of user token\n\t\ttry{\n\t\t\tuser = validateToken(authToken);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\n\t\t//If token isnt valid send Unauthorized error\n\t\tif (user == null)\n\t\t\tresponse.sendError(HttpServletResponse.SC_UNAUTHORIZED);\n\t\telse{\n\t\t\t\n\t\t\t//Get show ovject from show tmdb id\t\t\t\n\t\t\tList<Show> showWithId = service.findByTmdbId(tmdb_id);\n\t\t\t\n\t\t\t//If show is in database get it, else create object and put it in database\n\t\t\tShow show = null;\n\t\t\tif (showWithId.size() > 0){\n\t\t\t\tSystem.out.println(showWithId.get(0).getTitle());\n\t\t\t\tshow = showWithId.get(0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\n\t\t\tshow = createShow(tmdb_id, title, overview, poster_path, genres);\t\t\t\n\t\t\tservice.save(show);\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//Check if user has already recommended show\n\t\t\tboolean check = service.checkIfShowIsRecomendedByUser(show, user);\n\t\t\tSystem.out.println(\"GLASAL: \" + check);\n\t\t\t\n\t\t\tif (!check)\n\t\t\t{\n\t\t\t\tList<Show> shows = user.getShows();\n\t\t\t\tif(!shows.contains(show)){\n\t\t\t\t\tSystem.out.println(\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \" + show.getTitle());\n\t\t\t\t\tshows.add(show);\n\t\t\t\t\tuser.setShows(shows);\n\t\t\t \tuserService.save(user);\t\t\t \n\t\t\t\t}\n\t\t\t}\n\t }\t\n\t}",
"@RequestMapping(value = \"/enquirys\",\n method = RequestMethod.PUT,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> update(@Valid @RequestBody Enquiry enquiry) throws URISyntaxException {\n log.debug(\"REST request to update Enquiry : {}\", enquiry);\n if (enquiry.getId() == null) {\n return create(enquiry);\n }\n enquiryRepository.save(enquiry);\n return ResponseEntity.ok().build();\n }",
"@Test\r\n\tpublic void updateUpdate() throws InterruptedException, ExecutionException {\r\n\t\tLOGGER.debugf(\"BEGINN\");\r\n\t\t\r\n\t\t// Given\r\n\t\tfinal Long zahlId = ZAHLUNGSINFORMATION_ID_UPDATE;\r\n \tfinal String neuerKontoinhaber = NEUER_KONTOINHABER;\r\n \tfinal String neuerKontoinhaber2 = NEUER_KONTOINHABER_2;\r\n\t\tfinal String username = USERNAME_ADMIN;\r\n\t\tfinal String password = PASSWORD_ADMIN;\r\n\t\t\r\n\t\t// When\r\n\t\tResponse response = given().header(ACCEPT, APPLICATION_JSON)\r\n\t\t\t\t .pathParameter(ZAHLUNGSINFORMATIONEN_ID_PATH_PARAM, zahlId)\r\n .get(ZAHLUNGSINFORMATIONEN_ID_PATH);\r\n\t\tJsonObject jsonObject;\r\n\t\ttry (final JsonReader jsonReader =\r\n\t\t\t\t getJsonReaderFactory().createReader(new StringReader(response.asString()))) {\r\n\t\t\tjsonObject = jsonReader.readObject();\r\n\t\t}\r\n\r\n \t// Konkurrierendes Update\r\n\t\t// Aus den gelesenen JSON-Werten ein neues JSON-Objekt mit neuem Nachnamen bauen\r\n \tfinal JsonObjectBuilder job2 = getJsonBuilderFactory().createObjectBuilder();\r\n \tSet<String> keys = jsonObject.keySet();\r\n \tfor (String k : keys) {\r\n \t\tif (\"kontoinhaber\".equals(k)) {\r\n \t\t\tjob2.add(\"kontoinhaber\", neuerKontoinhaber2);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tjob2.add(k, jsonObject.get(k));\r\n \t\t}\r\n \t}\r\n \tfinal JsonObject jsonObject2 = job2.build();\r\n \tfinal ConcurrentUpdate concurrentUpdate = new ConcurrentUpdate(jsonObject2, ZAHLUNGSINFORMATIONEN_PATH,\r\n \t\t\t username, password);\r\n \tfinal ExecutorService executorService = Executors.newSingleThreadExecutor();\r\n\t\tfinal Future<Response> future = executorService.submit(concurrentUpdate);\r\n\t\tresponse = future.get(); // Warten bis der \"parallele\" Thread fertig ist\r\n\t\tassertThat(response.getStatusCode(), is(HTTP_NO_CONTENT));\r\n\t\t\r\n \t// Fehlschlagendes Update\r\n\t\t// Aus den gelesenen JSON-Werten ein neues JSON-Objekt mit neuem Nachnamen bauen\r\n\t\tfinal JsonObjectBuilder job1 = getJsonBuilderFactory().createObjectBuilder();\r\n \tkeys = jsonObject.keySet();\r\n \tfor (String k : keys) {\r\n \t\tif (\"kontoinhaber\".equals(k)) {\r\n \t\t\tjob1.add(\"kontoinhaber\", neuerKontoinhaber);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tjob1.add(k, jsonObject.get(k));\r\n \t\t}\r\n \t}\r\n \tjsonObject = job1.build();\r\n\t\tresponse = given().contentType(APPLICATION_JSON)\r\n\t\t\t\t .body(jsonObject.toString())\r\n\t\t .auth()\r\n\t\t .basic(username, password)\r\n\t\t .put(ZAHLUNGSINFORMATIONEN_PATH);\r\n \t\r\n\t\t// Then\r\n\t\tassertThat(response.getStatusCode(), is(HTTP_CONFLICT));\r\n\t\t\r\n\t\tLOGGER.debugf(\"ENDE\");\r\n\t}",
"void update( ExperimentDTO item );",
"@ApiOperation(value = \"/update_TestNO\", httpMethod = \"PUT\",notes = \"updates a noun of TestNO\",response = TestNO.class)\n\t@ApiResponses(value = {\n\t\t@ApiResponse(code = 200, message = TestSwaggerUIConstants.SUCCESS),\n\t @ApiResponse(code = 404, message = TestSwaggerUIConstants.NOT_FOUND),\n\t @ApiResponse(code = 500, message = TestSwaggerUIConstants.INTERNAL_SERVER_ERROR),\n\t @ApiResponse(code = 400, message = TestSwaggerUIConstants.BAD_REQUEST),\n\t @ApiResponse(code = 412, message = TestSwaggerUIConstants.PRE_CONDITION_FAILED) })\n\n\n\t@RequestMapping(method = RequestMethod.PUT,value = \"/update_TestNO\" ,headers=\"Accept=application/json\")\n @ResponseBody\n\tpublic TestNO update_TestNO(@RequestBody TestNO the_TestNO) throws Exception {\n\n\t\tlog.setLevel(Level.INFO);\n\t log.info(\"update_TestNO controller started operation!\");\n\n\t\tTestNO a_TestNO;\n\n\t\ta_TestNO = TestNO_Default_Activity_service.update_testno(the_TestNO, super.getUser());\n\n\t\tlog.info(\"Object returned from update_TestNO method !\");\n\n\t\treturn a_TestNO;\n\n\n\t}",
"@Override\n protected Response doUpdate(Long id, JSONObject data) {\n return null;\n }",
"@POST(\"/api/matches/setreferees\")\n Observable<Response<Matches>> editProtocolReferees(@Header(\"auth\") String authorization, @Body RefereeRequestList body);",
"@Test\n public void update() {\n }",
"public void UpdateAllControl(){\n try {\n AsyncHttpClient cliente = new AsyncHttpClient();\n cliente.setMaxRetriesAndTimeout(0, 10000);\n\n RequestParams parametros = new RequestParams();\n parametros.put(\"account\", UserName);\n parametros.put(\"apikey\", Apikey);\n parametros.put(\"date\", Date);\n parametros.put(\"hour\", Hour);\n parametros.put(\"minute\", Minute);\n\n cliente.put(this, GenConf.UpdateControlsURL, parametros, new JsonHttpResponseHandler() {\n @Override\n public void onStart() {\n mdialog.show();\n super.onStart();\n }\n\n @Override\n public void onFinish() {\n mdialog.cancel();\n super.onFinish();\n closed = true;\n CloseActivity();\n }\n });\n }\n catch (Exception e){\n\n }\n }",
"boolean adminUpdate(int userId, int statusId, int reimbId);",
"public void test_01() {\n\t\tpostobject jsonobjectdata = new postobject();\n\n\t\tjsonobjectdata.setID(\"5\");\n\t\tjsonobjectdata.settitle(\"updated Mr\");\n\t\tjsonobjectdata.setfirst_name(\"updated Rahaman\");\n\t\tjsonobjectdata.setauthor(\"updated Ata\");\n\n\t\tResponse reponse = given().\n\t\t\t\tbody(jsonobjectdata).\n\t\t\t\twhen().\n\t\t\t\tcontentType(ContentType.JSON).\n\t\t\t\tput(\"http://localhost:3000/posts/05\");\n\n\t\tSystem.out.println(\"updated response data \"+ reponse.asString());\t\t\n\t}",
"int updateByExample(JzAct record, JzActExample example);",
"int updateByPrimaryKey(ResumePractice record);",
"int updateByPrimaryKey(Tour record);"
]
| [
"0.62207514",
"0.5890603",
"0.5856667",
"0.5831389",
"0.58083564",
"0.57830036",
"0.57661736",
"0.57424814",
"0.5741694",
"0.5740162",
"0.56898123",
"0.56776667",
"0.56098175",
"0.5609507",
"0.5558269",
"0.55445445",
"0.5522381",
"0.5517587",
"0.547806",
"0.5470026",
"0.54209894",
"0.54065114",
"0.54063535",
"0.5388269",
"0.538074",
"0.5347692",
"0.5334818",
"0.53178364",
"0.5314311",
"0.52985555",
"0.52957356",
"0.5288248",
"0.52853525",
"0.52748525",
"0.5268105",
"0.526758",
"0.52638036",
"0.5257789",
"0.5245041",
"0.5244024",
"0.5205562",
"0.5205546",
"0.52040684",
"0.5169623",
"0.5161099",
"0.51377565",
"0.5129454",
"0.5128522",
"0.51242065",
"0.51050514",
"0.5094365",
"0.50815284",
"0.50788885",
"0.5067685",
"0.5067457",
"0.50656617",
"0.50646317",
"0.5052424",
"0.5050685",
"0.50394946",
"0.50375324",
"0.5029015",
"0.5027316",
"0.5018283",
"0.5017508",
"0.50157595",
"0.50114757",
"0.5005375",
"0.49955228",
"0.49945116",
"0.49919197",
"0.49902302",
"0.4984391",
"0.4983409",
"0.49829865",
"0.49737513",
"0.49582052",
"0.4957652",
"0.4956274",
"0.49558043",
"0.49547783",
"0.494201",
"0.49405247",
"0.49397242",
"0.49369848",
"0.4932438",
"0.49274096",
"0.49241912",
"0.4914352",
"0.49139053",
"0.4912373",
"0.49087027",
"0.49073702",
"0.49048975",
"0.49040934",
"0.49019617",
"0.49000272",
"0.48919147",
"0.48911706",
"0.4884611"
]
| 0.5061757 | 57 |
REST API CALL TO DELETE A REVIEW // | @DeleteMapping(value = "/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Object> deleteReview(@PathVariable("id") int id, HttpServletResponse response) {
Review deletedReview = reviewService.deleteReview(id);
response.addHeader("Date", new Date().toString());
response.setHeader("Cache-Control","no-cache,no-store,must-revalidate");
response.setHeader("Pragma","no-cache");
response.setHeader("Version","Mechanic API V-2.0");
response.setDateHeader("Expires", 0);
return new ResponseEntity<>(deletedReview, HttpStatus.CREATED);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@DELETE\n\tResponse delete();",
"void delete(URI url) throws RestClientException;",
"@Headers({\n \t\"Content-Type:application/vnd.api+json\" \n })\n @DELETE(\"api/v2/sub_organizations/{id}.json_api\")\n Call<Meta> delete(\n @retrofit2.http.Path(\"id\") Integer id\n );",
"HttpResponse httpDelete(URI uri, String id);",
"public ResponseTranslator delete() {\n setMethod(\"DELETE\");\n return doRequest();\n }",
"void delete(String url, Map<String, ?> uriVariables) throws RestClientException;",
"void delete(String url, Object... uriVariables) throws RestClientException;",
"@DELETE(\"/task/{title}.json\")\n Call<Task> deleteTask(@Path(\"title\") String title);",
"@Test\n void deleteTest() {\n URI uri = URI.create(endBody + \"/delete\");\n\n // get the response\n HttpResponse<String> response = HttpMethods.delete(uri);\n\n assertEquals(200, response.statusCode());\n }",
"public abstract Response delete(Request request, Response response);",
"@DELETE\n\t@Path(\"/{exerciseId}\")\n\t@Nonnull\n\tString deleteExerciseById(@Nonnull @PathParam(\"exerciseId\") Long exerciseId);",
"@RequestMapping(value = \"/{dataViewId}\", method = RequestMethod.DELETE)\n public void deleteDataView(@PathVariable String dataViewId) {\n System.exit(0);\n\n }",
"int deleteByExample(ReviewLevelSettingExample example);",
"@DELETE(\"posts/{id}/\")\n Call<Void> delete(@Path(\"id\") int id);",
"@DELETE\n\t@Path(\"/{exerciseId}\")\n\t@Nonnull\n\tResponse deleteExerciseById(@Nonnull @PathParam(\"exerciseId\") Long exerciseId);",
"public void test_03() {\n\n\t\tResponse reponse = given().\n\t\t\t\twhen().\n\t\t\t\tdelete(\"http://localhost:3000/posts/_3cYk0W\");\n\n\t\tSystem.out.println(\"updated response data \"+ reponse.asString());\t\t\n\t}",
"@Test\n\tpublic void deleteBook() {\n\t\tRestAssured.baseURI = \"http://216.10.245.166\";\n\t\t given().log().all().queryParam(\"ID\", \"321wergt\")\n\t\t\t\t.header(\"Content-Type\", \"application/json\").when()\n\t\t\t\t.delete(\"/Library/DeleteBook.php\").then().log().all()\n\t\t\t\t.assertThat().statusCode(200);\n\n\t\n\t /*JsonPath js = new JsonPath(response); \n\t String id = js.get(\"ID\");\n\t System.out.println(id);*/\n\t \n\t }",
"int deleteByExample(ResourceExample example);",
"@Test\n public void delete() {\n System.out.println(\"\\n--- delete Singer by id=2 ---\");\n\n restTemplate.delete(\"http://localhost:9082/restful-ws/singer/{id}\", 2);\n\n printAllSingers();\n }",
"@DELETE\r\n @Path(\"{id}\")\r\n public void remove(@PathParam(\"id\") Integer id) throws InternalServerErrorException {\r\n LOGGER.info(\"Peticion de borrado de documento\");\r\n Document document = new Document();\r\n document.setId(id);\r\n try {\r\n ejb.deleteDocument(document);\r\n } catch (DeleteException ex) {\r\n LOGGER.warning(\"ERROR a la hora de borrar un documento\");\r\n throw new InternalServerErrorException(\"Erro al borrar el documento\");\r\n }\r\n}",
"int deleteByExample(SrHotelRoomInfoExample example);",
"int deleteByExample(RepaymentPlanInfoUnExample example);",
"@Test\n public void deleteFlightTest() throws Exception {\n mockMvc.perform(delete(\"/v1/flight/deleteFlight?flightId=1\")\n .contentType(MediaType.APPLICATION_JSON))\n .andExpect(status().is(200));\n\n }",
"int deleteByExample(AutoAssessDetailExample example);",
"public int delete(String path)\n {\n\n Client client = Client.create();\n\n WebResource webResource = client.resource(getHostAddress() + \":\" + getPort() + \"/api/\" + path);\n ClientResponse response = webResource.type(\"application/json\").delete(ClientResponse.class);\n\n\n int responser = response.getStatus();\n\n return responser;\n }",
"public HttpStatus deleteById(Long postId);",
"ResponseEntity deleteById(UUID id);",
"int delete(String clientId);",
"public String deleteResearcher(int id);",
"int deleteByExample(CraftAdvReqExample example);",
"public void deletePost(int id){\n Retrofit retrofit = ApiClient.getApiClient();\n final SharedPreferences sharedPref = getSharedPreferences(\"TOKENSHARED\", Context.MODE_PRIVATE);\n final String token = sharedPref.getString(\"TOKEN\", null);\n ApiInterface apiInterface = retrofit.create(ApiInterface.class);\n Call<JsonResponseDeletePost> call = apiInterface.deletePost(id,\"Token \" + token);\n call.enqueue(new Callback<JsonResponseDeletePost>() {\n @Override\n public void onResponse(Call<JsonResponseDeletePost> call, Response<JsonResponseDeletePost> response) {\n finish();\n startActivity(new Intent(getApplicationContext(), MainActivity.class));\n\n }\n\n @Override\n public void onFailure(Call<JsonResponseDeletePost> call, Throwable t) {\n finish();\n startActivity(new Intent(getApplicationContext(), MainActivity.class));\n }\n });\n }",
"@DELETE\n public void delete(@PathParam(\"id\") String id) {\n }",
"@ApiOperation(value = \"/delete_TestNO/{TestNO_id}\", httpMethod = \"DELETE\",notes = \"deletes a noun of TestNO\",response = TestNO.class)\n\t@ApiResponses(value = {\n\t\t@ApiResponse(code = 200, message = TestSwaggerUIConstants.SUCCESS),\n\t @ApiResponse(code = 404, message = TestSwaggerUIConstants.NOT_FOUND),\n\t @ApiResponse(code = 500, message = TestSwaggerUIConstants.INTERNAL_SERVER_ERROR),\n\t @ApiResponse(code = 400, message = TestSwaggerUIConstants.BAD_REQUEST),\n\t @ApiResponse(code = 412, message = TestSwaggerUIConstants.PRE_CONDITION_FAILED) })\n\n\n\t@RequestMapping(method = RequestMethod.DELETE,value = \"/delete_TestNO/{TestNO_id}\" ,headers=\"Accept=application/json\")\n @ResponseBody\n\tpublic String delete_TestNO(@PathVariable(\"TestNO_id\")long TestNO_id) throws Exception {\n\n\t\tlog.setLevel(Level.INFO);\n\t log.info(\"delete_TestNO controller started operation!\");\n\n\t\tString service_return_msg = \"\";\n\n\t\tservice_return_msg = TestNO_Default_Activity_service.delete_testno(TestNO_id, super.getUser());\n\n\t\tlog.info(\"Object returned from delete_TestNO method !\");\n\n\t\treturn service_return_msg;\n\n\n\t}",
"@Override\r\n\tpublic void deleteReview(int r_no) {\n\t\tss.delete(\"deleteReview\", r_no);\r\n\t}",
"@Test\n public void deleteTest(){\n given().pathParam(\"id\",1)\n .when().delete(\"/posts/{id}\")\n .then().statusCode(200);\n }",
"@DELETE\n @Path(\"{id}\")\n Response removeCalendarById(@PathParam(\"id\") Long id);",
"int deleteByExample(StatusRepliesExample example);",
"@DeleteMapping(\"/person/{id}\")\r\n@ApiOperation( value = \"Delete Person by id\", notes = \"delete a specific person\")\r\nprivate void deletePerson(@PathVariable(\"id\") int id)\r\n{\r\n Person person = personService.getPersonById(id);\r\n if(person == null){\r\n throw new PersonNotFoundException(\"PersonNotFound\");\r\n }\r\n try {\r\n personService.delete(id);\r\n }\r\n catch(Exception e){\r\n logger.error(e.toString());\r\n }\r\n}",
"public void delete(int id) \n{ \n\ttvShowRepo.deleteById(id); \n}",
"@Override\n\tpublic int delete(JSONObject param) {\n\t\tMap<String, Object> data = new HashMap<String, Object>();\n\t\tString movieId = StringUtil.ToString(param.getString(\"id\"));\n\t\tdata.put(\"movieId\", movieId);\n\t\tint number = this.delete(\"MovieRecommand.deleteById\", data);\n\t\treturn number;\n\t}",
"@Test\r\n\tpublic void deleteProductDetails() {\r\n\t\tRestAssured.baseURI = \"http://localhost:9000/products\";\r\n\t\tRequestSpecification request = RestAssured.given();\r\n\t\tJSONObject requestParams = new JSONObject();\r\n\t\trequestParams.put(\"name\", \"Almond\");\r\n\t\trequest.header(\"Content-Type\", \"application/json\");\r\n\t\trequest.body(requestParams.toString());\r\n\t\tResponse response = request.delete(\"/7\");\r\n\t\tSystem.out.println(\"DELETE Responce Body ----->\" + response.asString());\r\n\t\tint statusCode = response.getStatusCode();\r\n\t\tAssert.assertEquals(statusCode, 200);\r\n\r\n\t}",
"int deleteByExample(trackcommentExample example);",
"int deleteByExample(FinMonthlySnapModelExample example);",
"@DELETE\n @Path(\"/{register_id}\")\n Response delete(@PathParam(\"register_id\") Long registerId);",
"int deleteByExample(ReEducationExample example);",
"@DELETE(\"pomodorotasks\")\n Call<PomodoroTask> pomodorotasksDelete(\n @Body PomodoroTask pomodoroTask\n );",
"void deleteByIdWithResponse(String id, String referer, Context context);",
"private void deletePost() {\n /*Retrofit will make a implementation for this method automatically\n * There for we simple call method make making API using retrofit instance*/\n Call<Void> call = jsonPlaceHolderAPI.deletePost(5);\n call.enqueue(new Callback<Void>() {\n @SuppressLint(\"SetTextI18n\")\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<Void> call, Response<Void> response) {\n textResult.setText(\"CODE: \" + response.code());\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<Void> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }",
"private void requestDeleteReport() throws ERTRestApiException, JSONException {\n final Cursor cursor = getReportStatusCursor(SyncStatus.DELETED_REPORT);\n\n if(cursor.getCount() != 0) {\n cursor.moveToFirst();\n\n\n do {\n final Long reportBaseId = cursor.getLong(\n cursor.getColumnIndex(ReportEntry._ID));\n ExpenseReport expenseReport = Utility.createExpenseReportFromCursor\n (cursor);\n final int reportId = expenseReport.getId();\n\n // update the status of delete to true in the mean time\n // if there is an error from the server, the delete\n // status should be changed to false\n ContentValues contentValues = new ContentValues();\n contentValues.put(ReportEntry.COLUMN_IS_DELETED, \"true\");\n getContext().getContentResolver().update(\n ReportEntry.buildReportUriNoNetworkSync(reportId),\n contentValues,\n null,\n null\n );\n\n ERTRestApi.apiDeleteReport(\n reportId,\n new ERTRestApi.ERTRestApiListener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n // delete all expense line items\n Cursor expenseLineItemCursor = getContext().getContentResolver().query(\n ReportContract.ReportEntry.buildReportExpense(reportBaseId),\n null, null, null, null\n );\n int expenseLineItemDeleteCount = 0;\n if(expenseLineItemCursor.getCount() > 0) {\n expenseLineItemCursor.moveToFirst();\n do {\n expenseLineItemDeleteCount += getContext().getContentResolver().delete(\n ExpenseEntry.buildExpenseUri(expenseLineItemCursor.getInt(expenseLineItemCursor.getColumnIndex(ExpenseEntry._ID))),\n null, null\n );\n } while (expenseLineItemCursor.moveToNext());\n }\n expenseLineItemCursor.close();\n Log.i(LOG_TAG, \"Deleted \" + expenseLineItemDeleteCount + \" expense line items\");\n\n getContext().getContentResolver().delete(\n ReportEntry.buildReportUriNoNetworkSync\n (reportBaseId),\n null,\n null\n );\n Log.d(LOG_TAG, \"Report \" + reportBaseId + \" \" +\n \"deleted\");\n }\n },\n new ERTRestApi.ERTRestApiErrorListener() {\n @Override\n public void onErrorResponse(ERTRestApi\n .ERTRestApiError error) {\n // try delete again\n /*updateReportSyncStatus(reportBaseId,\n SyncStatus.DELETED_REPORT);*/\n\n // the delete failed, put the report back in\n // the list\n ContentValues contentValues = new\n ContentValues();\n contentValues.put(ReportEntry\n .COLUMN_IS_DELETED, \"false\");\n getContext().getContentResolver().update(\n ReportEntry\n .buildReportUriNoNetworkSync\n (reportId),\n contentValues,\n null,\n null\n );\n\n Log.e(LOG_TAG, error.getMessage());\n }\n }\n );\n\n updateReportSyncStatus(reportBaseId,SyncStatus.SYNC_IN_PROGRESS);\n\n } while (cursor.moveToNext());\n\n }\n cursor.close();\n }",
"int deleteByExample(ActivityHongbaoPrizeExample example);",
"@Test\n public void removeWorkflow_204() throws Exception {\n\n // PREPARE THE DATABASE\n // Fill in the workflow db\n addMOToDb(1);\n Integer id = addMOToDb(2).getId();\n addMOToDb(3);\n\n // PREPARE THE TEST\n // Nothing to do\n\n // DO THE TEST\n Response response = callAPI(VERB.DELETE, \"/mo/\" + id.toString(), null);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(204, status);\n\n String body = response.readEntity(String.class);\n assertEquals(\"\", body);\n\n response = callAPI(VERB.GET, \"/mo/\", null);\n List<Workflow> readMacroOpList = response.readEntity(new GenericType<List<Workflow>>() {\n });\n assertEquals(2, readMacroOpList.size());\n }",
"public void deleteRest(String uri) {\n WebResource.Builder builder = getClientBuilder(uri);\n ClientResponse response = builder.delete(ClientResponse.class);\n\n if (response.getStatus() != HTTP_NO_CONTENT) {\n log.info(\"REST DELETE request returned error code {}\",\n response.getStatus());\n }\n }",
"@DeleteMapping(\"/person\")\r\n@ApiOperation( value = \"Delete Person by id\", notes = \"delete a specific person\")\r\nprivate String deletePersonByParamId(@RequestParam(required = true) int id)\r\n{\r\n Person person = personService.getPersonById(id);\r\n if(person == null){\r\n throw new PersonNotFoundException(\"PersonNotFound\");\r\n }\r\n try {\r\n personService.delete(id);\r\n return \"Sucess\";\r\n }\r\n catch(Exception e){\r\n logger.error(e.toString());\r\n return \"Error =\" + e.toString();\r\n }\r\n}",
"@RequestMapping(value = \"/enquirys/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public void delete(@PathVariable Long id) {\n log.debug(\"REST request to delete Enquiry : {}\", id);\n enquiryRepository.delete(id);\n }",
"int deleteByExample(PayLogInfoPoExample example);",
"int deleteByExample(ExamineApproveResultExample example);",
"int deleteByExample(PmPostExample example);",
"int deleteByExample(TVideoExample example);",
"int deleteByExample(TourExample example);",
"void deleteByIdWithResponse(String id, Context context);",
"void deleteByIdWithResponse(String id, Context context);",
"void deleteByIdWithResponse(String id, Context context);",
"void deleteByIdWithResponse(String id, Context context);",
"void deleteByIdWithResponse(String id, Context context);",
"@Nullable\n public AccessReviewHistoryDefinition delete() throws ClientException {\n return send(HttpMethod.DELETE, null);\n }",
"@GetMapping(path = \"/api/activity/delete/{id}\")\n public Response deleteActivity(@PathVariable long id){\n return activityService.deleteActivity(id);\n }",
"int deleteByExample(VisituserExample example);",
"String delete(String request) throws RemoteException;",
"@DeleteMapping(\"/{id}\")\n public HttpStatus deleteTrackById(@PathVariable(\"id\") String id, @RequestHeader Map<String, String> headers)\n throws RecordNotFoundException, RecordUnauthorizedException{\n if(Utils.apiKey(headers)){\n service.deleteTrackById(id);\n \n return HttpStatus.ACCEPTED;\n }else{\n throw new RecordUnauthorizedException(\"API Key ERROR\");\n }\n }",
"int deleteByExample(TestActivityEntityExample example);",
"@DeleteMapping(\"{id}\")\n public Lesson deleteLesson(@PathVariable long id) {\n //code\n return null;\n }",
"@DeleteMapping(\"/api/rents/{id}\")\r\n public ResponseEntity<?> deleteRent(@PathVariable(name = \"id\") Long id) {\r\n return rentService.find(id).map(rent -> {\r\n rentService.delete(rent);\r\n return ResponseEntity.ok().build();\r\n }).orElseThrow(() -> new IllegalArgumentException());\r\n }",
"@Test (groups = \"create_post\")\n public void LTest_Delete_Post_success(){\n\n System.out.println(\"Delete PostID# \"+ createdPost);\n System.out.println(\"Request to: \" + resourcePath + \"/\" + createdPost);\n\n given()\n .spec(RequestSpecs.generateToken())\n //.body(testPost)\n .when()\n .delete(resourcePath + \"/\" + createdPost)\n .then()\n .body(\"message\", equalTo(\"Post deleted\"))\n .and()\n .statusCode(200)\n .spec(ResponseSpecs.defaultSpec());\n }",
"int deleteByExample(LtsprojectpoExample example);",
"int deleteByExample(SelectUserRecruitExample example);",
"int deleteByExample(MVoucherDTOCriteria example);",
"int deleteByExample(CmsVoteTitleExample example);",
"private void deleteFun() throws IOException {\n String jsonObject = \"{\\\"age\\\":10,\\\"dateOfBirth\\\":1471455886564,\\\"fullName\\\":\\\"Johan Doe\\\"}\";\n IndexRequest indexRequest = new IndexRequest(\"people\");\n indexRequest.source(jsonObject, XContentType.JSON);\n\n IndexResponse response = client.index(indexRequest, RequestOptions.DEFAULT);\n String id = response.getId();\n\t System.out.println(\"id = \" + id);\n\n GetRequest getRequest = new GetRequest(\"people\");\n getRequest.id(id);\n\n GetResponse getResponse = client.get(getRequest, RequestOptions.DEFAULT);\n System.out.println(getResponse.getSourceAsString());\n\n DeleteRequest deleteRequest = new DeleteRequest(\"people\");\n deleteRequest.id(id);\n\n DeleteResponse deleteResponse = client.delete(deleteRequest, RequestOptions.DEFAULT);\n\t System.out.println(\"deleteResponse = \" + deleteResponse.toString());\n }",
"@DELETE\n @Path(\"/{requirementId}/votes\")\n @Produces(MediaType.APPLICATION_JSON)\n @ApiOperation(value = \"This method removes the vote of the given requirement made by the current user.\")\n @ApiResponses(value = {\n @ApiResponse(code = HttpURLConnection.HTTP_OK, message = \"Returns the requirement\", response = RequirementEx.class),\n @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = \"Unauthorized\"),\n @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = \"Not found\"),\n @ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = \"Internal server problems\")\n })\n public Response removeVote(@PathParam(\"requirementId\") int requirementId) {\n DALFacade dalFacade = null;\n try {\n UserAgent agent = (UserAgent) Context.getCurrent().getMainAgent();\n long userId = agent.getId();\n String registratorErrors = service.bazaarService.notifyRegistrators(EnumSet.of(BazaarFunction.VALIDATION, BazaarFunction.USER_FIRST_LOGIN_HANDLING));\n if (registratorErrors != null) {\n ExceptionHandler.getInstance().throwException(ExceptionLocation.BAZAARSERVICE, ErrorCode.UNKNOWN, registratorErrors);\n }\n dalFacade = service.bazaarService.getDBConnection();\n Integer internalUserId = dalFacade.getUserIdByLAS2PeerId(userId);\n boolean authorized = new AuthorizationManager().isAuthorized(internalUserId, PrivilegeEnum.Delete_VOTE, dalFacade);\n if (!authorized) {\n ExceptionHandler.getInstance().throwException(ExceptionLocation.BAZAARSERVICE, ErrorCode.AUTHORIZATION, Localization.getInstance().getResourceBundle().getString(\"error.authorization.vote.delete\"));\n }\n dalFacade.unVote(internalUserId, requirementId);\n Requirement requirement = dalFacade.getRequirementById(requirementId, internalUserId);\n Gson gson = new Gson();\n service.bazaarService.getNotificationDispatcher().dispatchNotification(service, new Date(), Activity.ActivityAction.UNVOTE, requirement.getId(),\n Activity.DataType.REQUIREMENT, requirement.getComponents().get(0).getId(), Activity.DataType.COMPONENT, internalUserId);\n return Response.ok(gson.toJson(requirement)).build();\n } catch (BazaarException bex) {\n if (bex.getErrorCode() == ErrorCode.AUTHORIZATION) {\n return Response.status(Response.Status.UNAUTHORIZED).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } else if (bex.getErrorCode() == ErrorCode.NOT_FOUND) {\n return Response.status(Response.Status.NOT_FOUND).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } else {\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n }\n } catch (Exception ex) {\n BazaarException bex = ExceptionHandler.getInstance().convert(ex, ExceptionLocation.BAZAARSERVICE, ErrorCode.UNKNOWN, \"\");\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } finally {\n service.bazaarService.closeDBConnection(dalFacade);\n }\n }",
"int deleteByExample(FactRoomLogExample example);",
"public static int doDelete(String id) {\n int status = 0;\n try {\n // pass the id on the URL line\n URL url = new URL(\"https://intense-lake-93564.herokuapp.com/menusection/\" + \"//\"+id);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"DELETE\");\n status = conn.getResponseCode();\n String output = \"\";\n String response = \"\";\n // things went well so let's read the response\n BufferedReader br = new BufferedReader(new InputStreamReader(\n (conn.getInputStream())));\n while ((output = br.readLine()) != null) {\n response += output; \n }\n conn.disconnect(); \n }\n catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return status;\n }",
"int deleteByExample(JzActExample example);",
"@Test\n public void delete() {\n auctionService.restTemplate = mockRestTemplate;\n auctionService.delete(1);\n verify(mockRestTemplate).delete(testOneUrl);\n }",
"public Response deleteWithoutPayload(String url) {\r\n\t\treturn RestAssured.given()\r\n\t\t\t\t.header(\"Authorization\", \"Bearer \" + accessToken)\r\n\t\t\t\t.header(\"Content-Type\", \"application/json\")\r\n\t\t\t\t.delete(url);\r\n\t}",
"int deleteByExample(CliStaffProjectExample example);",
"@Test(dataProvider = \"DataForDelete\")\n public void testDelete(int id) throws JsonProcessingException {\n\n JSONObject jsonResult = new JSONObject();\n jsonResult.put(\"id\", id);\n\n given()\n .header(\"Content-Type\", \"application/json\")\n .contentType(ContentType.JSON)\n .accept(ContentType.JSON)\n .body(jsonResult)\n .when()\n .delete(\"https://reqres.in/api/users/2\")\n .then()\n .statusCode(204);\n }",
"int deleteByExample(SysTeamExample example);",
"int deleteByExample(DiscussExample example);",
"int deleteByExample(SurveystatusPkeyExample example);",
"int deleteByExample(NewsInfoExample example);",
"int deleteByExample(UserCourseHistoryExample example);",
"int deleteByExample(TbSerdeParamsExample example);",
"@Test\n public void testUserDelete() {\n Response response = webTarget\n .path(\"user/1\")\n .request(APPLICATION_JSON)\n .delete();\n assertThat(response.getStatus(), anyOf(is(200), is(202), is(204)));\n }",
"@DELETE\n @Path(\"/remove\")\n public void delete() {\n System.out.println(\"DELETE invoked\");\n }",
"int deleteContent(@Param(\"id\") long id);",
"@org.junit.Test\r\n public void testRemoveReview1() throws Exception {\r\n System.out.println(\"removeReview1\");\r\n Long id = new Long(0);\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n review = service.insertReview(review);\r\n Review result = service.removeReview(id);\r\n assertEquals(review, result);\r\n }",
"@RequestMapping(value = \"/{id}\", method = RequestMethod.DELETE)\n public void delete(@PathVariable(\"id\") String id, HttpServletRequest req){\n throw new NotImplementedException(\"To be implemented\");\n }",
"@GetMapping(\"/delete/{id}\")\n public String deletegetRestaurant(@PathVariable String id) {\n restaurantServiceImpl.delete(id);\n return \"data deleted\";\n }",
"@DELETE\n @Path(\"/{requirementId}\")\n @Produces(MediaType.APPLICATION_JSON)\n @ApiOperation(value = \"This method deletes a specific requirement.\")\n @ApiResponses(value = {\n @ApiResponse(code = HttpURLConnection.HTTP_OK, message = \"Returns the deleted requirement\", response = RequirementEx.class),\n @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = \"Unauthorized\"),\n @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = \"Not found\"),\n @ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = \"Internal server problems\")\n })\n public Response deleteRequirement(@PathParam(\"requirementId\") int requirementId) {\n DALFacade dalFacade = null;\n try {\n UserAgent agent = (UserAgent) Context.getCurrent().getMainAgent();\n long userId = agent.getId();\n String registratorErrors = service.bazaarService.notifyRegistrators(EnumSet.of(BazaarFunction.VALIDATION, BazaarFunction.USER_FIRST_LOGIN_HANDLING));\n if (registratorErrors != null) {\n ExceptionHandler.getInstance().throwException(ExceptionLocation.BAZAARSERVICE, ErrorCode.UNKNOWN, registratorErrors);\n }\n dalFacade = service.bazaarService.getDBConnection();\n Integer internalUserId = dalFacade.getUserIdByLAS2PeerId(userId);\n RequirementEx requirementToDelete = dalFacade.getRequirementById(requirementId, internalUserId);\n Project project = dalFacade.getProjectById(requirementToDelete.getProjectId());\n boolean authorized = new AuthorizationManager().isAuthorized(internalUserId, PrivilegeEnum.Modify_REQUIREMENT, Arrays.asList(String.valueOf(project.getId()), String.valueOf(requirementId)), dalFacade);\n if (!authorized) {\n ExceptionHandler.getInstance().throwException(ExceptionLocation.BAZAARSERVICE, ErrorCode.AUTHORIZATION, Localization.getInstance().getResourceBundle().getString(\"error.authorization.requirement.delete\"));\n }\n Gson gson = new Gson();\n RequirementEx deletedRequirement = dalFacade.deleteRequirementById(requirementId, internalUserId);\n service.bazaarService.getNotificationDispatcher().dispatchNotification(service, deletedRequirement.getLastupdated_time(), Activity.ActivityAction.DELETE, deletedRequirement.getId(),\n Activity.DataType.REQUIREMENT, deletedRequirement.getComponents().get(0).getId(), Activity.DataType.COMPONENT, internalUserId);\n return Response.ok(gson.toJson(deletedRequirement)).build();\n } catch (BazaarException bex) {\n if (bex.getErrorCode() == ErrorCode.AUTHORIZATION) {\n return Response.status(Response.Status.UNAUTHORIZED).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } else if (bex.getErrorCode() == ErrorCode.NOT_FOUND) {\n return Response.status(Response.Status.NOT_FOUND).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } else {\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n }\n } catch (Exception ex) {\n BazaarException bex = ExceptionHandler.getInstance().convert(ex, ExceptionLocation.BAZAARSERVICE, ErrorCode.UNKNOWN, \"\");\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } finally {\n service.bazaarService.closeDBConnection(dalFacade);\n }\n }",
"int deleteByPrimaryKey(String licFlow);"
]
| [
"0.6482613",
"0.6459102",
"0.6327624",
"0.624365",
"0.6236678",
"0.62121063",
"0.6185578",
"0.6182622",
"0.61695045",
"0.6151886",
"0.6151288",
"0.61484426",
"0.6135907",
"0.6103501",
"0.6098319",
"0.6089938",
"0.60467434",
"0.602264",
"0.6006552",
"0.59990895",
"0.59983563",
"0.599476",
"0.5978749",
"0.5960599",
"0.59478015",
"0.5944225",
"0.5937566",
"0.5935027",
"0.5917209",
"0.590595",
"0.59039325",
"0.5902997",
"0.5898884",
"0.5898561",
"0.5891439",
"0.58859104",
"0.5881482",
"0.58697677",
"0.5855902",
"0.58554375",
"0.58515644",
"0.5850512",
"0.5843466",
"0.5837944",
"0.58373713",
"0.58320767",
"0.5829639",
"0.58277756",
"0.58189005",
"0.58176804",
"0.58027214",
"0.5800369",
"0.5793972",
"0.57883",
"0.5781865",
"0.57807124",
"0.5777832",
"0.5763952",
"0.5763595",
"0.57525384",
"0.57525384",
"0.57525384",
"0.57525384",
"0.57525384",
"0.5746094",
"0.57432413",
"0.5739281",
"0.5729509",
"0.5727404",
"0.5721037",
"0.5712418",
"0.5710828",
"0.5708701",
"0.570831",
"0.5704671",
"0.57003695",
"0.5699988",
"0.5699453",
"0.5699261",
"0.5692294",
"0.5688506",
"0.5683302",
"0.5681981",
"0.5680641",
"0.5680229",
"0.56786543",
"0.56725514",
"0.56633055",
"0.5662939",
"0.56599754",
"0.56574005",
"0.56571627",
"0.565493",
"0.5650047",
"0.56403387",
"0.56348556",
"0.5632628",
"0.5631975",
"0.56302625",
"0.5626499"
]
| 0.60682607 | 16 |
TODO Autogenerated method stub | public void execute(Tuple input, BasicOutputCollector collector) {
String word = (String)input.getValue(0);
System.out.println("out = fuck the " + word);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | public void declareOutputFields(OutputFieldsDeclarer declarer) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
one error > captcha expired | @Override
public boolean matches(Object list) {
return ((List<String>) list).size() == 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void msjereCaptcha(){\r\n click(esperarElementoPresenteEnPagina(locatorMsjeCaptcha));\r\n }",
"public Captcha() {\n value = generateCaptchaCode();\n id = generateCaptchaID();\n date = System.currentTimeMillis();\n }",
"@Test(dependsOnMethods = {\"register\"})\n void confirmEmailAddressByCaptcha() {\n common.findWebElementByXpath(\"//*[@id=\\\"content\\\"]/fieldset/label/div\").click();\n\n //Click on Send captcha button\n common.timeoutSeconds(2);\n common.findWebElementById(\"send-captcha-button\").click();\n\n //No magic code is set\n common.verifyStatusMessage(\"Det uppstod ett problem med verifieringen av att du är en människa. \" +\n \"Var god försök igen.\");\n }",
"@Override\n public void timerExpired() {\n //Inform the player they have failed\n if (isEnglish) {\n Toast.makeText(this, LOSS, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, LOSS_CHINESE, Toast.LENGTH_SHORT).show();\n }\n\n //Set visibility for replay button to visible\n replayButton.setVisibility(View.VISIBLE);\n retryButton.setVisibility(View.VISIBLE);\n scoreboardButton.setVisibility(View.VISIBLE);\n }",
"public static String captcha(){\n\t\tString captcha=\"\";\n\t\tfor(int i=0; i<8; i+=2){\n\t\t\tcaptcha+=(char)(65+Math.random()*26)+\" \";\n\t\t\tcaptcha+=(char)(97+Math.random()*26);\n\t\t}\n\t\treturn captcha;\n\n\t}",
"@Override\r\n public void onClick(View arg0) {\n if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n\r\n //Chaptcha dialog\r\n captchaDialog = new Dialog(CreateAccount.this);\r\n captchaDialog.setContentView(R.layout.captcha_dialog);\r\n captchaDialog.setTitle(\"Please enter captcha\");\r\n\r\n reCaptcha = (ReCaptcha) captchaDialog.findViewById(R.id.recaptcha);\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n\r\n chaptchaAnswer = (EditText) captchaDialog.findViewById(R.id.answer);\r\n\r\n Button captchaVerify = (Button) captchaDialog.findViewById(R.id.verify);\r\n captchaVerify.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n //dialog.dismiss();\r\n reCaptcha.verifyAnswerAsync(\"6LfhQwsTAAAAALJvjUqiurjAdzi4dztuUIGq-NyZ\", chaptchaAnswer.getText().toString(), CreateAccount.this);\r\n }\r\n });\r\n Button captchaReload = (Button) captchaDialog.findViewById(R.id.reload);\r\n captchaReload.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n }\r\n });\r\n captchaDialog.show();\r\n\r\n } else if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n email.setError(\"Invalid e-mail\");\r\n }\r\n }",
"@Override\n public boolean validDefaultTime(String code) {\n return kaptcha.validate(code);\n }",
"void setCaptcha(ICaptcha captcha);",
"public CaptchaIncorrectoException() {\n super(ERROR_KEY);\n }",
"public static\n void checkExpiringPassword()\n {\n User user = ResourcesMgr.getSessionManager().getUser();\n \n String sPassword = user.getPassword();\n \n // Controllo della scadenza della password al primo accesso\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n // Primo accesso\n boolean boExpiredFA = ResourcesMgr.getBooleanProperty(ResourcesMgr.sGUILOGIN_EXP_FIRSTA, false);\n if(boExpiredFA) {\n GUIMessage.showWarning(\"Questo \\350 il Suo primo accesso. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n \n // Controllo della scadenza della password rispetto a quando e' stata aggiornata l'ultima volta.\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n int iExpirationDays = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_DAYS, 0);\n if(iExpirationDays > 0) {\n int iDays = getDaysFrom(user.getDatePassword());\n if(iExpirationDays <= iDays) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n else {\n int iMonths = getMonthsFrom(user.getDatePassword());\n int iExpirationMonths = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_MONTHS, 0);\n if(iExpirationMonths > 0 && iExpirationMonths <= iMonths) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n }\n }",
"public String getCaptchaCode() {\n HttpGet httpget = new HttpGet(HttpURL.getCaptchaURL());\n try {\n HttpEntity entity = this.client.execute(httpget).getEntity();\n\n if (entity != null) {\n InputStream is = entity.getContent();\n File captchaImage = new File(CaptchaOCR.CAPTCHA_IMAGE_PATH);\n OutputStream os = new FileOutputStream(captchaImage);\n IOUtils.copy(is, os);\n IOUtils.closeQuietly(is);\n IOUtils.closeQuietly(os);\n }\n EntityUtils.consume(entity);\n return CaptchaOCR.doOcr();\n } catch (ClientProtocolException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return null;\n }",
"@Override\r\n\tpublic void validate(FacesContext fc, UIComponent arg1, Object arg2)\r\n\t\t\tthrows ValidatorException {\n HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\r\n Boolean isResponseCorrect = Boolean.FALSE;\r\n javax.servlet.http.HttpSession session = request.getSession();\r\n String parm = (String)arg2;\r\n String c = (String) session.getAttribute(MyCaptcha.CAPTCHA_KEY);\r\n if (!parm.equals(c)) {\r\n \tFacesMessage message = new FacesMessage();\r\n \tmessage.setSummary(\"You have entered invalid text for image.\");\r\n \tmessage.setSeverity(FacesMessage.SEVERITY_ERROR);\r\n \tthrow new ValidatorException(message);\r\n\r\n }\r\n\t}",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (Boolean.TRUE.equals(acc.getBooleanProperty(\"free\"))) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"void abortChallenge();",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (acc.getType() == AccountType.FREE) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"boolean expired();",
"private void timerExpired() {\r\n timer.stop();\r\n mainFrame.setEnabled(true);\r\n inputPanel.addKits(receivedKits);\r\n messageSent = false;\r\n setMessage(finishedReceivingMessage, Color.BLUE);\r\n receivedKits.clear();\r\n }",
"public interface CaptchaAlgorithm {\n\n Captcha generate();\n\n}",
"public static void main(String[] args) throws Exception {\r\n\t\tSystem.out.println(\"Does the captcha contain alphabets (yes or no) :\");\r\n\tScanner sc=new Scanner(System.in);\r\n\tString in=sc.nextLine(); // taking imput (yes or no)\r\n\tif(in.toLowerCase().equals(\"yes\") || in.toLowerCase().equals(\"y\")) // checking if the input is yes\r\n\t{\r\n\t\talpha=true; // if input is yes alpha flag is set to true\r\n\t\tfor (int i=0; i<35; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\")); // taking all the templates along with alphabets into consideration\r\n\t\t}\r\n\r\n\t}\r\n\telse\r\n\t{\r\n\t\talpha=false;// if input is not yes alpha flag is set to true\r\n\t\tfor (int i=0; i<10; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\"));// taking all the templates along with out alphabets into consideration\r\n\t\t}\r\n\t}\r\n\t\tint numTests = 100; // total number of trials\r\n\t\t\r\n\t\t// read in the templates for each character\r\n\t\tfor (int i=0; i<35; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\"));\r\n\t\t}\r\n\r\n\t\tint correct = 0;\r\n\t\tfor (int i=0; i<numTests; i++) {\r\n\t\t\t\r\n\t\t\t// generate a random string\r\n\t\t\tString rightAnswer = randomString(6,alpha);\r\n\t\t\t\r\n\t\t\t// make a captcha from it\r\n\t\t\tBufferedImage captchaImage = generateCaptcha(rightAnswer);\r\n\t\t\t\r\n\t\t\tif (show) {\r\n\t\t\t\tImageIO.write(captchaImage, \"jpeg\", new File(\"see.jpg\"));\r\n\t\t\t\tshow = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// guess the captcha\r\n\t\t\t\r\n\t\t\tString guess = guessCaptcha(captchaImage);\r\n\t\t\t// see if we got it right\r\n\t\t\tif (guess.equals(rightAnswer)) correct++;\r\n\t\t}\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"accuracy: \" + (correct / (double) numTests));\r\n\t}",
"@Override\n public void onSuccess(SafetyNetApi.RecaptchaTokenResponse response) {\n userResponseToken = response.getTokenResult();\n if (!userResponseToken.isEmpty()) {\n // Validate the user response token using the\n // reCAPTCHA siteverify API.\n // new SendPostRequest().execute();\n sendRequest();\n }\n }",
"public Bitmap getCaptcha(String devKey) throws CaptchaException {\n\t\tBitmap image = null;\n\t\ttry {\n\t\t\tString getTokenURL = CAPTCHA_URL + \"/get?key=\" + devKey;\n\n\t\t\tURL getUrl = new URL(getTokenURL);\n\n\t\t\tHttpURLConnection httpURLConnection = (HttpURLConnection) getUrl.openConnection();\n\n\t\t\thttpURLConnection.connect();\n\n\t\t\tint code = httpURLConnection.getResponseCode();\n\t\t\tSystem.out.println(code);\n\t\t\tif (code == 200) {\n\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));\n\t\t\t\tString jsonString = reader.readLine();\n\n\t\t\t\tJSONObject jsonObject = new JSONObject(jsonString);\n\t\t\t\tString imageURL = jsonObject.getString(\"image\");\n\t\t\t\tthis.token = jsonObject.getString(\"token\");\n\t\t\t\tthis.verifyURL = jsonObject.getString(\"verify\");\n\t\t\t\tthis.adid = jsonObject.getString(\"adid\");\n\t\t\t\tthis.adurl = jsonObject.getString(\"adurl\");\n\t\t\t\tthis.audioURL = jsonObject.getString(\"audio\");\n\n\t\t\t\treader.close();\n\n\n\t\t\t\t//ini cara defaultnya\n\t\t\t\t/*URL getImageURL = new URL(imageURL);\n\t\t\t\thttpURLConnection = (HttpURLConnection) getImageURL.openConnection();\n\t\t\t\tInputStream imageStream = httpURLConnection.getInputStream();\n\t\t\t\tcode = httpURLConnection.getResponseCode();\n\t\t\t\tif(code == 200){\n\t\t\t\t\timage = BitmapFactory.decodeStream(imageStream);\n\t\t\t\t\timageStream.close();\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"img response http status code is:\" + code);\n\t\t\t\t}\n\t\t\t\thttpURLConnection.disconnect(); */\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//ini pake method bantu\n\t\t\t\timage = loadImageFromUrl(imageURL);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"get response http status code is:\" + code);\n\t\t\t}\t\t\t\n\n\t\t\thttpURLConnection.disconnect();\n\n\t\t} catch(MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch(JSONException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t}\n\n\t\treturn image;\n\t}",
"void sessionExpired();",
"public void failedChallenge() {\n addGameRound(false);\n playedRounds++;\n updateActivePlayer();\n updateActiveChallenge();\n }",
"@Override\r\n public boolean isCredentialsNonExpired() {\r\n return true;\r\n }",
"@Override\n public void onFailure(Call<String> call, Throwable t) {\n dismissProgress();\n SecurityLayer.generateToken(getApplicationContext());\n com.ceva.ubmobile.core.ui.Log.debug(\"otpvalidation\", t.toString());\n //showToast(getString(R.string.error_500));\n // prog.dismiss();\n // startDashBoard();\n }",
"private void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int width = 250;\n int height = 100;\n //vectorul de captcha-uri\n// char data[][] = {\n// { 'm', 'a', 'n', 'c', 'a', 'r', 'e' },\n// { 'b', 'e', 't', 'o', 'n' },\n// { 'f', 'r', 'i', 'g', 'i', 'd', 'e', 'r' },\n// { 's', 'u', 'p', 'e', 'r', 'm', 'a', 'n' },\n// { 'j', 'e', 't' }\n// };\n\n //folosim o imagine buffer pentru a desena captcha-ul\n BufferedImage bufImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n Graphics2D g2d = bufImg.createGraphics();\n Font font = new Font(\"Georgia\", Font.BOLD, 18);\n g2d.setFont(font);\n g2d.setColor(Color.WHITE);\n\n //folosim hint-uri ca sa crestam calitatea textului din poza\n RenderingHints rHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n rHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n g2d.setRenderingHints(rHints);\n\n //desenam gradientul, pentru fundalul imaginii\n GradientPaint gPaint = new GradientPaint(0, 0, Color.BLUE, 0, height/2, Color.black, true);\n g2d.setPaint(gPaint);\n g2d.fillRect(0, 0, width, height);\n g2d.setColor(new Color(255, 153, 0));\n\n //numar random pt vectorul de captcha-uri\n Random rand = new Random();\n char data[][] = {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}};\n for (int i = 0; i < 8; i++) {\n char r = rndChar();\n data[0][i] = r;\n }\n //int index = Math.abs(rand.nextInt()) % 5;\n int index = 0;\n //trimitem stringul la user sa stie sa compare input-ul de la user\n String captcha = String.copyValueOf(data[index]);\n request.getSession().setAttribute(\"captcha\", captcha);\n\n //desenam captcha-ul ales in imagine\n int x = 0, y = 0;\n for (int i = 0; i < data[index].length; i++) {\n x += 15 + Math.abs(rand.nextInt()) % 15;\n y = 45 + Math.abs(rand.nextInt()) % 20;\n g2d.drawChars(data[index], i, 1, x, y);\n }\n g2d.dispose();\n\n response.setContentType(\"image/png\");\n OutputStream os = response.getOutputStream();\n ImageIO.write(bufImg, \"png\", os);\n os.close();\n }",
"private void exemTimeOver() {\n\t\tuploadBtn.setVisible(false);\n\t\tapproveImage.setVisible(false);\n\t\tuploadExamTxt.setText(\"Exam time is over, you can not upload files anymore\");\n\t\ttimer.cancel();\n\t\t// sign the student as someone who start the exam but did not submitted\n\t\tflag1 = false;\n\t\tsummbitBlank();\n\t}",
"@Override\npublic boolean isCredentialsNonExpired() {\n\treturn true;\n}",
"@Override\n public boolean isCredentialsNonExpired() {\n return true;\n }",
"void clear()\n {\n captcha.reset();\n requestToken.setEnabled(false);\n username.setValue(\"\");\n greeting.setValue(\"\");\n token.setValue(\"\");\n newPassword.setValue(\"\");\n newPasswordRepeat.setValue(\"\");\n show(REQUEST_TOKEN);\n }",
"boolean isExpired();",
"private void expire()\n\t{\n\t\tif (m_expire != 0 && m_timeExp < System.currentTimeMillis())\n\t\t{\n\t\t//\tSystem.out.println (\"------------ Expired: \" + getName() + \" --------------------\");\n\t\t\treset();\n\t\t}\n\t}",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\npublic boolean isCredentialsNonExpired() {\n\treturn false;\n}",
"@Override\r\n\t\t\tpublic void done(Integer arg0, BmobException arg1) {\n\t\t\t\tif(arg1==null){//验证码发送成功\r\n\t\t \tmyHandler.sendEmptyMessageDelayed(30000, 0);\r\n\t\t }\r\n\t\t\t}",
"public interface CaptchaService {\n /**\n * 生成验证码图片\n *\n * @param captchaId\n * @return\n */\n BufferedImage buildImage(String captchaId);\n\n /**\n * 验证 验证码\n * @param captchaType\n * @param captchaId\n * @param captcha\n * @return\n */\n boolean isValid(Setting.CaptchaType captchaType, String captchaId, String captcha);\n}",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"@Override\n public boolean isCredentialsNonExpired() {\n return Boolean.TRUE;\n }",
"@Override\n\t\t\t\tpublic boolean isCredentialsNonExpired() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"private void signalInvalidPassword() {\r\n passText.setBackgroundColor(ContextCompat.getColor(this, R.color.errorBackground));\r\n Toast.makeText(this, \"The password was incorrect!\", Toast.LENGTH_SHORT).show();\r\n }",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\r\n\t}",
"boolean isCredentialsNonExpired();",
"boolean isCredentialsNonExpired();",
"@Override\n\tpublic boolean isCredentialsNonExpired()\n\t{\n\t\treturn true;\n\t}",
"long invalidations();",
"private void sendTrialExpiredEmail(String email) throws MessagingException{\r\n\t\temailService.send(email, trialExpiredSubject, null, trialExpiredEmailBody);\r\n\t}",
"@Test\n\tpublic void testUnmatchingPasswordNegative1() {\n\t\tfillSignUpForm(\"marius\",\"voda\",\"[email protected]\",\"Parola123\",\"parola123\",\"socialNetworks\");\n\t\tassertEquals(\"Passwords must match\", driver.findElement(By.cssSelector(\"#sign-up-confirm-password-div > app-form-control-error-message > em > span\")).getText());\n\t}",
"@Test\n\tpublic void checkconfirmpassword_characters()\n\t{\n\t\t\n\t\tPageFactory.initElements(driver, Resetpassword.class);\n\t\tResetpassword.confirm_password.sendKeys(\"co12!@\");\n\t\tString user_text=Resetpassword.error_message.getText();\n\t\tAssert.assertEquals(user_text,\"co12!@\");\n\t\t\n\t}",
"public String Login_by_entering_credentials_which_do_not_exsist() {\n\temailtextbox.sendKeys(\"User\"+random.nextInt(100000)+\"@gmail.com\");\n\tpasswordtextbox.sendKeys(\"password\"+random.nextInt(100000));\n\tLoginButton.click();\n\twait.TextToBe_Wait(\"//div[text()='Invalid Email or Password']\", \"Invalid Email or Password\");\n\tString text=ErrorMessage.getText();\n\treturn text;\n\t}",
"@Override\n public void run() {\n codeTime--;\n get_code_btn.setText(codeTime + \"s\");\n if (codeTime <= 0) {\n if (timer != null) {\n timer.cancel();\n }\n get_code_btn.setText(\"获取验证码\");\n isGetVerification=false;\n }\n }",
"public void setCaptchaResponse(final String captchaResponse) {\n mCaptchaResponse = captchaResponse;\n }",
"public static void Android_Invalid_otp() {\n try {\n\n AppiumDriver<MobileElement> driver = getAppiumDriver();\n Thread.sleep(2000);\n MobileElement el1 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[1]/android.widget.EditText\");\n el1.click();\n\n String userName = getData(\"UserName\");\n el1.sendKeys(userName);\n driver.hideKeyboard();\n MobileElement el2 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[3]/android.widget.EditText\");\n String password = getData(\"Password\");\n\n el2.sendKeys(password);\n driver.hideKeyboard();\n ReportHelper.logReportStatus(LogStatus.PASS, \"UserName and Password Given Successfully\");\n\n MobileElement loginBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Login']\");\n loginBtn.click();\n\n Thread.sleep(12000);\n\n driver.findElementByXPath(\"//android.widget.EditText[@text='Confirmation Code']\").sendKeys(\"5252\");\n Thread.sleep(2000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Invalid OTP Given Successfully\");\n driver.hideKeyboard();\n MobileElement continueBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Continue']\");\n continueBtn.click();\n Thread.sleep(15000);\n MobileElement Errormsg = driver.findElementByXPath(\"//android.widget.TextView[@text='Sorry the authentication code you entered is incorrect. Please try again.']\");\n\n if (Errormsg.isDisplayed()) {\n Thread.sleep(3000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Sorry the authentication code you entered is incorrect. Please try again.\");\n MobileElement e2 = driver.findElementByXPath(\"//android.widget.Button[@text='Go To Home']\");\n e2.click();\n Thread.sleep(2000);\n }\n\n\n } catch (Exception e) {\n ReportHelper.logReportStatus(LogStatus.FAIL, \"login into the application\");\n\n }\n }",
"public String getInvalidError()\n\t{\n\t\t @SuppressWarnings(\"deprecation\")\n\t\tFluentWait<WebDriver> wait = new FluentWait<WebDriver>(driver)\n\t\t\t .withTimeout(5000, TimeUnit.MILLISECONDS)\n\t\t\t .pollingEvery(250, TimeUnit.MILLISECONDS)\n\t\t\t .ignoring(NoSuchElementException.class);\n\t\t\t \n\t\t\t WebElement element = wait.until(new Function<WebDriver, WebElement>() \n\t\t\t {\n\t\t\t public WebElement apply(WebDriver driver) \n\t\t\t {\n\t\t\t\t String getTextOnPage = invaliderror.getText();\n\t\t\t\t \n\t\t\t\t if(getTextOnPage.contains(\"Invalid Username Or Password\"))\n\t\t\t\t \t{\n\t\t\t\t\t \treturn invaliderror;\n\t\t\t\t \t}\n\t\t\t\t else\n\t\t\t\t \t{\n\t\t\t\t\t \treturn null;\n\t\t\t\t \t}\n\t\t\t }\n\t\t\t }\n\t\t\t );\n\t\t\t\n\t\t\treturn element.getText();\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@SuppressWarnings(\"unused\")\n void expire();",
"private void invalidateVSacSession(){\n\t \tMatContext.get().getVsacapiServiceAsync().inValidateVsacUser(new AsyncCallback<Void>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Throwable caught) {\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Void result) {\n\n\t\t\t\t}\n\t\t\t});\n\n\t\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"public void resetForm() {\r\n\t\tfinal CTracked ctracked = UserSettings.ctracked == null ? new CTracked()\r\n\t\t\t\t: UserSettings.ctracked;\r\n\r\n\t\ttxtPassword.setValue(\"\");\r\n\t\ttxtPassword.clearInvalid();\r\n\r\n\t\ttxtPasswordConfirm.setValue(\"\");\r\n\t\ttxtPasswordConfirm.clearInvalid();\r\n\r\n\t\ttxtName.setValue(ctracked.getName() == null ? \"\" : ctracked.getName());\r\n\t\ttxtName.clearInvalid();\r\n\r\n\t\tif (ctracked.getBirthday() != null) {\r\n\t\t\tUserSettings.timerTask.getTaskList().add(new Task(2) {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void execute() {\r\n\t\t\t\t\tdateBirthday.setValue(ctracked.getBirthday());\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tdateBirthday.setValue(\"\");\r\n\t\t}\r\n\t\tdateBirthday.clearInvalid();\r\n\t\t\r\n\t\ttxtUsername.setValue(String.valueOf(ctracked.getUsername()));\r\n\r\n\r\n\t\ttxtMobilePhone.setValue(ctracked.getTel() == null ? \"\" : ctracked\r\n\t\t\t\t.getTel());\r\n\t\ttxtMobilePhone.clearInvalid();\r\n\r\n\t\ttxtEmail.setValue(ctracked.getEmail() == null ? \"\" : ctracked\r\n\t\t\t\t.getEmail());\r\n\t\ttxtEmail.clearInvalid();\r\n\r\n\t\ttxtEmailConfirm.setValue(ctracked.getEmail() == null ? \"\" : ctracked\r\n\t\t\t\t.getEmail());\r\n\t\ttxtEmailConfirm.clearInvalid();\r\n\r\n\t\tif (ctracked.getIntervalGps() != null) {\r\n\t\t\tUserSettings.timerTask.getTaskList().add(new Task(2) {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void execute() {\r\n\t\t\t\t\tcbIntervalGPS.setValue(ctracked.getIntervalGps()+\"\");\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tcbIntervalGPS.setValue(\"10\");\r\n\t\t}\r\n\t\tcbIntervalGPS.clearInvalid();\r\n\r\n\t\ttxtIconPath\r\n\t\t\t\t.setValue(ctracked.getIconPath() == null ? DEFFAULT_ICON_PATH\r\n\t\t\t\t\t\t: ctracked.getIconPath());\r\n\r\n\t\timgIcon.setUrl(txtIconPath.getText());\r\n\r\n\t\tcheckActive.setValue(ctracked.isActive() == null ? false : true);\r\n\r\n\t\tcheckEmbedded.setValue(ctracked.getEmbedded() == null ? false : true);\r\n\r\n\t\tcheckShowInMap.setValue(ctracked.getShowInMap() == null ? false : true);\r\n\r\n\t\tcbLanguage.setValue(ctracked.getLang() == null ? \"vi\" : ctracked\r\n\t\t\t\t.getLang());\r\n\t\tcbCountry.setValue(ctracked.getCountry() == null ? \"VN\" : ctracked\r\n\t\t\t\t.getCountry());\r\n\t\tcbTimeZone.setValue(ctracked.getGmt() == null ? \"7\" : ctracked.getGmt()\r\n\t\t\t\t+ \"\");\r\n\r\n\t\ttxtApiKey.setValue(ctracked.getApiKey() == null ? \"\" : ctracked\r\n\t\t\t\t.getApiKey());\r\n\r\n\t\tpostResetForm();\r\n\t}",
"@Test(suiteName = \"NowPlaying\", testName = \"DMCA Restricted\", description = \"Validating DMCA restricted\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-219\" })\n\tpublic void dmcaRestrictedChannelLogo() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"verifying DMCA restricted Channel Logo MOBANDEVER-219\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickonMusic();\n\t\t\tcommon.scrollUntilTextExists(\"Dance/Electronic\");\n\t\t\tgetPageFactory().getEvehome().clickMucisSubRock();\n\t\t\tgetPageFactory().getEvehome().popChannel1();\n\t\t\tgetPageFactory().getCategory().nplLogo();\n\t\t\tgetPageFactory().getEvehome().clickminimize();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"public boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"public boolean isCredentialsNonExpired() {\n\t\treturn false;\r\n\t}",
"@Test\n\tpublic void testUnmatchingPasswordNegative2() {\n\t\tfillSignUpForm(\"marius\",\"voda\",\"[email protected]\",\"Parola123\",\"PaR0la123\",\"socialNetworks\");\n\t\tassertEquals(\"Passwords must match\", driver.findElement(By.cssSelector(\"#sign-up-confirm-password-div > app-form-control-error-message > em > span\")).getText());\n\t}",
"boolean hasExpired();",
"@Override\n public void failure(DigitsException exception) {\n Toast.makeText(ForgotPassword.this, \"Couldn't verify phone number\", Toast.LENGTH_SHORT).show();\n finish();\n }",
"public void sessionTimeout() {\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(DeviceTrackerApplication.getContext());\n alertDialogBuilder.setTitle(getString(R.string.app_name));\n alertDialogBuilder\n .setMessage(R.string.session_expired)\n .setCancelable(false)\n .setPositiveButton(R.string.ok_msg, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n logout();\n }\n });\n alertDialog = alertDialogBuilder.create();\n alertDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);\n startSessionTimer(0);\n }",
"public void Verify(View view) {\n try {\n if (!appsingleton.isvalidateLength(et_username,6)) {\n tv_validationtext.setText(getResources().getString(R.string.st_errorOtplength));\n rl_validation.setVisibility(View.VISIBLE);\n tv_validationtext.startAnimation(appsingleton.shake_animation);\n return;\n }\n else\n {\n rl_validation.setVisibility(View.GONE);\n }\n\n if (AppUtils.isNetworkAvailable(this)) {\n new OTPVerification(et_username.getText().toString()).execute();\n\n }//end of network if\n else\n {\n appsingleton.SnackbarMessage(getResources().getString(R.string.st_internet_error),\"\",et_username);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"protected void sessionExpired(PrintWriter out, BrowserKind bk, boolean isExternalRequest)\n {\n IHTML htm = new HTML(bk);\n if (! isExternalRequest) {\n\t htm.addBody().setOnLoad(\"window.alert('Your Session Has Expired.\\\\n Please Login Again.');parent.location='/servlet/common.SvtLogoutHandler';\"); \t\n } else {\n\t htm.addBody().setOnLoad(\"window.alert('Your Session Has Expired.\\\\n Please Login Again.');parent.location='/pmc/servlet/extranetProxy?Servlet=common.SvtLogoutHandler';\"); \t \t\n }\n out.println(htm);\n }",
"@Test\r\n public void positiveRegistration() {\r\n driver.get(\"http://127.0.0.1:8888/wp-login.php?action=register\");\r\n StringBuilder sb = new StringBuilder(len);\r\n for (int i = 0; i < len; i++) {\r\n sb.append(AB.charAt(rnd.nextInt(AB.length())));\r\n }\r\n String charSequence = \"\";\r\n charSequence = sb.toString();\r\n WebElement loginField = driver.findElement(By.xpath(\"//input[@id='user_login']\"));\r\n loginField.sendKeys(charSequence);\r\n WebElement passwdField = driver.findElement(By.xpath(\"//input[@id='user_email']\"));\r\n passwdField.sendKeys(charSequence+\"@gmail.com\");\r\n\r\n WebElement registerButton = driver.findElement(By.xpath(\"//input[@name='wp-submit']\"));\r\n registerButton.click();\r\n\r\n WebElement registrationMessage = driver.findElement(By.xpath(\"//p[@class='message']\"));\r\n Assert.assertEquals(registrationMessage.getText(),\"Регистрация завершена. Проверьте вашу почту.\");\r\n }",
"@Test\n public void incorrectUsernameIncorrectPasswordTest(){\n WebElement userField = driver.findElement(By.name(\"user\"));\n WebElement passwordField = driver.findElement(By.name(\"passwd\"));\n WebElement submitbutton = driver.findElement(By.className(\"submit\"));\n\n userField.sendKeys(Constants.REDDIT_INVALID_ACCT);\n passwordField.sendKeys(Constants.REDDIT_INVALID_PASS);\n submitbutton.click();\n\n WebDriverWait w = new WebDriverWait(driver, 10);\n\n assertTrue(submitbutton.isDisplayed());\n }",
"public boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"public boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"public void verifyExpiration(RefreshToken token) {\n if (token.getExpiryDate().compareTo(Instant.now()) < 0) {\n throw new TokenRefreshException(token.getToken(), \"Expired token. Please issue a new request\");\n }\n }",
"public void user_lost() {\n\tresetExpComp();\r\n }",
"public boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"public boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Test(suiteName = \"NowPlaying\", testName = \"Now Playing - Live - Unrestricted - Channel Logo\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-206\" })\n\tpublic void validateHowardChannelLogo() {\n\t\tCommon common = new Common(driver);\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickOnTalk();\n\t\t\tgetPageFactory().getHoward().clickOnHowardStern();\n\t\t\tgetPageFactory().getHoward().verifyHowardChannelLogo();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"private URL resolveRecaptcha(CharSequence content) {\n\t\treturn null;\n\t}",
"public boolean verifyCaptcha(HttpServletRequest servletReq, Request req, Response res, PrintWriter out)\n\t{\n\t\tif ( null == captchaUrls) return true;\n\t\t\n\t\tUserProfile user = req.getUser();\n\t\t\n\t\tStringBuilder sb = new StringBuilder(24);\n\t\tsb.append(req.sensorId).append('.').append(req.action);\n\t\tif ( ! captchaUrls.contains(sb.toString())) return true;\n\t\t\n\t\tMap<String, String> params = req.mapData;\n\n\t\tString readcaptcha = null;\n\t\tString encodedCaptcha = null;\n\t\tif ( params.containsKey(\"readcaptcha\") ) \n\t\t\treadcaptcha = req.getString(\"readcaptcha\", true, true, false);\n\n\t\tif ( params.containsKey(\"encodedcaptcha\") ) \n\t\t\tencodedCaptcha = req.getString(\"encodedcaptcha\", true, true, false);\n\t\telse {\n\t\t\tif ( StringUtils.isEmpty(encodedCaptcha)) {\n\t\t\t\tCookie[] cookies = servletReq.getCookies();\n\t\t\t\tif (cookies != null && cookies.length > 0) {\n\t\t\t\t\tfor (Cookie cookie : cookies) {\n\t\t\t\t\t\tif ( cookie.getName().equals(\"encodedcaptcha\")) {\n\t\t\t\t\t\t\tencodedCaptcha = cookie.getValue(); \n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tString captchaTextEncoded = null;\n\t\tif ( null != readcaptcha && null != encodedCaptcha) {\n\t\t\tString secureCaptchaText = servletReq.getRemoteAddr() + readcaptcha;\n\t\t\tcaptchaTextEncoded = Hash.createHex(this.key, secureCaptchaText);\n\t\t\tif (captchaTextEncoded.equals(encodedCaptcha)) return true;\n\t\t}\n\n\t\tres.setErrorCode(\"CAPTCHA_ERROR\", ErrorCodes.CAPTCHA_MISMATCH, user.getLocale(), true);\n\t\treturn false;\n\t}",
"public void tryLoginAgain(){\n\t\tnameField.setText(\"\");\n\t\trollField.setText(\"\");\n\t\tseatField.setText(\"\");\n\t\tnameField.repaint();\n\t\tseatField.repaint();\n\t\trollField.repaint();\n\t\tclearErrors();\n\t\tmainDialog.dispose();\t\t\n\t}",
"@Test\n\t void testCredentialsNonExpired() {\n\t\tassertTrue(user.isCredentialsNonExpired());\n\t}",
"public abstract void expire();",
"public static void enterCaptcha(WebElement captchaField) {\n\t\tString captchaVal = JOptionPane.showInputDialog(\"Please enter the captcha value:\");\n\t\tSystem.out.println(captchaVal);\n\t\t// Type the entered captcha to the text box\n\t\tcaptchaField.sendKeys(captchaVal);\n\t}"
]
| [
"0.6260204",
"0.61593926",
"0.61492467",
"0.60656",
"0.602968",
"0.5916648",
"0.59099895",
"0.57993174",
"0.5574009",
"0.5533782",
"0.55138963",
"0.54938066",
"0.54901487",
"0.54551804",
"0.5453855",
"0.54486173",
"0.54433846",
"0.54416394",
"0.54122555",
"0.5367765",
"0.5315015",
"0.53024584",
"0.5261889",
"0.52244055",
"0.5187676",
"0.5186253",
"0.5154177",
"0.5136764",
"0.51258725",
"0.51235944",
"0.5079778",
"0.5076966",
"0.50588566",
"0.50588566",
"0.50588566",
"0.5051362",
"0.5041006",
"0.5037625",
"0.5023798",
"0.5023798",
"0.5021282",
"0.50212336",
"0.5009011",
"0.50009036",
"0.49969116",
"0.49969116",
"0.49805725",
"0.4971975",
"0.49715552",
"0.49677628",
"0.49634072",
"0.49567738",
"0.49563065",
"0.4954887",
"0.4946073",
"0.49422735",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.49315012",
"0.49298313",
"0.49214745",
"0.49214745",
"0.49214745",
"0.49050608",
"0.48925853",
"0.48900586",
"0.48803902",
"0.4870056",
"0.48574868",
"0.48413986",
"0.4836191",
"0.48307598",
"0.48280698",
"0.4818493",
"0.48160267",
"0.48114115",
"0.48114115",
"0.48040128",
"0.4796739",
"0.47912136",
"0.47912136",
"0.4790607",
"0.47857976",
"0.47734147",
"0.4771036",
"0.47707564",
"0.47705165",
"0.476798"
]
| 0.0 | -1 |
one error > captcha expired | @Override
public boolean matches(Object list) {
return ((List<String>) list).size() == 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void msjereCaptcha(){\r\n click(esperarElementoPresenteEnPagina(locatorMsjeCaptcha));\r\n }",
"public Captcha() {\n value = generateCaptchaCode();\n id = generateCaptchaID();\n date = System.currentTimeMillis();\n }",
"@Test(dependsOnMethods = {\"register\"})\n void confirmEmailAddressByCaptcha() {\n common.findWebElementByXpath(\"//*[@id=\\\"content\\\"]/fieldset/label/div\").click();\n\n //Click on Send captcha button\n common.timeoutSeconds(2);\n common.findWebElementById(\"send-captcha-button\").click();\n\n //No magic code is set\n common.verifyStatusMessage(\"Det uppstod ett problem med verifieringen av att du är en människa. \" +\n \"Var god försök igen.\");\n }",
"@Override\n public void timerExpired() {\n //Inform the player they have failed\n if (isEnglish) {\n Toast.makeText(this, LOSS, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, LOSS_CHINESE, Toast.LENGTH_SHORT).show();\n }\n\n //Set visibility for replay button to visible\n replayButton.setVisibility(View.VISIBLE);\n retryButton.setVisibility(View.VISIBLE);\n scoreboardButton.setVisibility(View.VISIBLE);\n }",
"public static String captcha(){\n\t\tString captcha=\"\";\n\t\tfor(int i=0; i<8; i+=2){\n\t\t\tcaptcha+=(char)(65+Math.random()*26)+\" \";\n\t\t\tcaptcha+=(char)(97+Math.random()*26);\n\t\t}\n\t\treturn captcha;\n\n\t}",
"@Override\r\n public void onClick(View arg0) {\n if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n\r\n //Chaptcha dialog\r\n captchaDialog = new Dialog(CreateAccount.this);\r\n captchaDialog.setContentView(R.layout.captcha_dialog);\r\n captchaDialog.setTitle(\"Please enter captcha\");\r\n\r\n reCaptcha = (ReCaptcha) captchaDialog.findViewById(R.id.recaptcha);\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n\r\n chaptchaAnswer = (EditText) captchaDialog.findViewById(R.id.answer);\r\n\r\n Button captchaVerify = (Button) captchaDialog.findViewById(R.id.verify);\r\n captchaVerify.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n //dialog.dismiss();\r\n reCaptcha.verifyAnswerAsync(\"6LfhQwsTAAAAALJvjUqiurjAdzi4dztuUIGq-NyZ\", chaptchaAnswer.getText().toString(), CreateAccount.this);\r\n }\r\n });\r\n Button captchaReload = (Button) captchaDialog.findViewById(R.id.reload);\r\n captchaReload.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n }\r\n });\r\n captchaDialog.show();\r\n\r\n } else if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n email.setError(\"Invalid e-mail\");\r\n }\r\n }",
"@Override\n public boolean validDefaultTime(String code) {\n return kaptcha.validate(code);\n }",
"void setCaptcha(ICaptcha captcha);",
"public CaptchaIncorrectoException() {\n super(ERROR_KEY);\n }",
"public static\n void checkExpiringPassword()\n {\n User user = ResourcesMgr.getSessionManager().getUser();\n \n String sPassword = user.getPassword();\n \n // Controllo della scadenza della password al primo accesso\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n // Primo accesso\n boolean boExpiredFA = ResourcesMgr.getBooleanProperty(ResourcesMgr.sGUILOGIN_EXP_FIRSTA, false);\n if(boExpiredFA) {\n GUIMessage.showWarning(\"Questo \\350 il Suo primo accesso. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n \n // Controllo della scadenza della password rispetto a quando e' stata aggiornata l'ultima volta.\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n int iExpirationDays = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_DAYS, 0);\n if(iExpirationDays > 0) {\n int iDays = getDaysFrom(user.getDatePassword());\n if(iExpirationDays <= iDays) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n else {\n int iMonths = getMonthsFrom(user.getDatePassword());\n int iExpirationMonths = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_MONTHS, 0);\n if(iExpirationMonths > 0 && iExpirationMonths <= iMonths) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n }\n }",
"public String getCaptchaCode() {\n HttpGet httpget = new HttpGet(HttpURL.getCaptchaURL());\n try {\n HttpEntity entity = this.client.execute(httpget).getEntity();\n\n if (entity != null) {\n InputStream is = entity.getContent();\n File captchaImage = new File(CaptchaOCR.CAPTCHA_IMAGE_PATH);\n OutputStream os = new FileOutputStream(captchaImage);\n IOUtils.copy(is, os);\n IOUtils.closeQuietly(is);\n IOUtils.closeQuietly(os);\n }\n EntityUtils.consume(entity);\n return CaptchaOCR.doOcr();\n } catch (ClientProtocolException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return null;\n }",
"@Override\r\n\tpublic void validate(FacesContext fc, UIComponent arg1, Object arg2)\r\n\t\t\tthrows ValidatorException {\n HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\r\n Boolean isResponseCorrect = Boolean.FALSE;\r\n javax.servlet.http.HttpSession session = request.getSession();\r\n String parm = (String)arg2;\r\n String c = (String) session.getAttribute(MyCaptcha.CAPTCHA_KEY);\r\n if (!parm.equals(c)) {\r\n \tFacesMessage message = new FacesMessage();\r\n \tmessage.setSummary(\"You have entered invalid text for image.\");\r\n \tmessage.setSeverity(FacesMessage.SEVERITY_ERROR);\r\n \tthrow new ValidatorException(message);\r\n\r\n }\r\n\t}",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (Boolean.TRUE.equals(acc.getBooleanProperty(\"free\"))) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"void abortChallenge();",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (acc.getType() == AccountType.FREE) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"boolean expired();",
"private void timerExpired() {\r\n timer.stop();\r\n mainFrame.setEnabled(true);\r\n inputPanel.addKits(receivedKits);\r\n messageSent = false;\r\n setMessage(finishedReceivingMessage, Color.BLUE);\r\n receivedKits.clear();\r\n }",
"public interface CaptchaAlgorithm {\n\n Captcha generate();\n\n}",
"public static void main(String[] args) throws Exception {\r\n\t\tSystem.out.println(\"Does the captcha contain alphabets (yes or no) :\");\r\n\tScanner sc=new Scanner(System.in);\r\n\tString in=sc.nextLine(); // taking imput (yes or no)\r\n\tif(in.toLowerCase().equals(\"yes\") || in.toLowerCase().equals(\"y\")) // checking if the input is yes\r\n\t{\r\n\t\talpha=true; // if input is yes alpha flag is set to true\r\n\t\tfor (int i=0; i<35; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\")); // taking all the templates along with alphabets into consideration\r\n\t\t}\r\n\r\n\t}\r\n\telse\r\n\t{\r\n\t\talpha=false;// if input is not yes alpha flag is set to true\r\n\t\tfor (int i=0; i<10; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\"));// taking all the templates along with out alphabets into consideration\r\n\t\t}\r\n\t}\r\n\t\tint numTests = 100; // total number of trials\r\n\t\t\r\n\t\t// read in the templates for each character\r\n\t\tfor (int i=0; i<35; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\"));\r\n\t\t}\r\n\r\n\t\tint correct = 0;\r\n\t\tfor (int i=0; i<numTests; i++) {\r\n\t\t\t\r\n\t\t\t// generate a random string\r\n\t\t\tString rightAnswer = randomString(6,alpha);\r\n\t\t\t\r\n\t\t\t// make a captcha from it\r\n\t\t\tBufferedImage captchaImage = generateCaptcha(rightAnswer);\r\n\t\t\t\r\n\t\t\tif (show) {\r\n\t\t\t\tImageIO.write(captchaImage, \"jpeg\", new File(\"see.jpg\"));\r\n\t\t\t\tshow = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// guess the captcha\r\n\t\t\t\r\n\t\t\tString guess = guessCaptcha(captchaImage);\r\n\t\t\t// see if we got it right\r\n\t\t\tif (guess.equals(rightAnswer)) correct++;\r\n\t\t}\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"accuracy: \" + (correct / (double) numTests));\r\n\t}",
"@Override\n public void onSuccess(SafetyNetApi.RecaptchaTokenResponse response) {\n userResponseToken = response.getTokenResult();\n if (!userResponseToken.isEmpty()) {\n // Validate the user response token using the\n // reCAPTCHA siteverify API.\n // new SendPostRequest().execute();\n sendRequest();\n }\n }",
"public Bitmap getCaptcha(String devKey) throws CaptchaException {\n\t\tBitmap image = null;\n\t\ttry {\n\t\t\tString getTokenURL = CAPTCHA_URL + \"/get?key=\" + devKey;\n\n\t\t\tURL getUrl = new URL(getTokenURL);\n\n\t\t\tHttpURLConnection httpURLConnection = (HttpURLConnection) getUrl.openConnection();\n\n\t\t\thttpURLConnection.connect();\n\n\t\t\tint code = httpURLConnection.getResponseCode();\n\t\t\tSystem.out.println(code);\n\t\t\tif (code == 200) {\n\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));\n\t\t\t\tString jsonString = reader.readLine();\n\n\t\t\t\tJSONObject jsonObject = new JSONObject(jsonString);\n\t\t\t\tString imageURL = jsonObject.getString(\"image\");\n\t\t\t\tthis.token = jsonObject.getString(\"token\");\n\t\t\t\tthis.verifyURL = jsonObject.getString(\"verify\");\n\t\t\t\tthis.adid = jsonObject.getString(\"adid\");\n\t\t\t\tthis.adurl = jsonObject.getString(\"adurl\");\n\t\t\t\tthis.audioURL = jsonObject.getString(\"audio\");\n\n\t\t\t\treader.close();\n\n\n\t\t\t\t//ini cara defaultnya\n\t\t\t\t/*URL getImageURL = new URL(imageURL);\n\t\t\t\thttpURLConnection = (HttpURLConnection) getImageURL.openConnection();\n\t\t\t\tInputStream imageStream = httpURLConnection.getInputStream();\n\t\t\t\tcode = httpURLConnection.getResponseCode();\n\t\t\t\tif(code == 200){\n\t\t\t\t\timage = BitmapFactory.decodeStream(imageStream);\n\t\t\t\t\timageStream.close();\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"img response http status code is:\" + code);\n\t\t\t\t}\n\t\t\t\thttpURLConnection.disconnect(); */\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//ini pake method bantu\n\t\t\t\timage = loadImageFromUrl(imageURL);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"get response http status code is:\" + code);\n\t\t\t}\t\t\t\n\n\t\t\thttpURLConnection.disconnect();\n\n\t\t} catch(MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch(JSONException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t}\n\n\t\treturn image;\n\t}",
"void sessionExpired();",
"public void failedChallenge() {\n addGameRound(false);\n playedRounds++;\n updateActivePlayer();\n updateActiveChallenge();\n }",
"@Override\r\n public boolean isCredentialsNonExpired() {\r\n return true;\r\n }",
"@Override\n public void onFailure(Call<String> call, Throwable t) {\n dismissProgress();\n SecurityLayer.generateToken(getApplicationContext());\n com.ceva.ubmobile.core.ui.Log.debug(\"otpvalidation\", t.toString());\n //showToast(getString(R.string.error_500));\n // prog.dismiss();\n // startDashBoard();\n }",
"private void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int width = 250;\n int height = 100;\n //vectorul de captcha-uri\n// char data[][] = {\n// { 'm', 'a', 'n', 'c', 'a', 'r', 'e' },\n// { 'b', 'e', 't', 'o', 'n' },\n// { 'f', 'r', 'i', 'g', 'i', 'd', 'e', 'r' },\n// { 's', 'u', 'p', 'e', 'r', 'm', 'a', 'n' },\n// { 'j', 'e', 't' }\n// };\n\n //folosim o imagine buffer pentru a desena captcha-ul\n BufferedImage bufImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n Graphics2D g2d = bufImg.createGraphics();\n Font font = new Font(\"Georgia\", Font.BOLD, 18);\n g2d.setFont(font);\n g2d.setColor(Color.WHITE);\n\n //folosim hint-uri ca sa crestam calitatea textului din poza\n RenderingHints rHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n rHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n g2d.setRenderingHints(rHints);\n\n //desenam gradientul, pentru fundalul imaginii\n GradientPaint gPaint = new GradientPaint(0, 0, Color.BLUE, 0, height/2, Color.black, true);\n g2d.setPaint(gPaint);\n g2d.fillRect(0, 0, width, height);\n g2d.setColor(new Color(255, 153, 0));\n\n //numar random pt vectorul de captcha-uri\n Random rand = new Random();\n char data[][] = {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}};\n for (int i = 0; i < 8; i++) {\n char r = rndChar();\n data[0][i] = r;\n }\n //int index = Math.abs(rand.nextInt()) % 5;\n int index = 0;\n //trimitem stringul la user sa stie sa compare input-ul de la user\n String captcha = String.copyValueOf(data[index]);\n request.getSession().setAttribute(\"captcha\", captcha);\n\n //desenam captcha-ul ales in imagine\n int x = 0, y = 0;\n for (int i = 0; i < data[index].length; i++) {\n x += 15 + Math.abs(rand.nextInt()) % 15;\n y = 45 + Math.abs(rand.nextInt()) % 20;\n g2d.drawChars(data[index], i, 1, x, y);\n }\n g2d.dispose();\n\n response.setContentType(\"image/png\");\n OutputStream os = response.getOutputStream();\n ImageIO.write(bufImg, \"png\", os);\n os.close();\n }",
"private void exemTimeOver() {\n\t\tuploadBtn.setVisible(false);\n\t\tapproveImage.setVisible(false);\n\t\tuploadExamTxt.setText(\"Exam time is over, you can not upload files anymore\");\n\t\ttimer.cancel();\n\t\t// sign the student as someone who start the exam but did not submitted\n\t\tflag1 = false;\n\t\tsummbitBlank();\n\t}",
"@Override\npublic boolean isCredentialsNonExpired() {\n\treturn true;\n}",
"@Override\n public boolean isCredentialsNonExpired() {\n return true;\n }",
"void clear()\n {\n captcha.reset();\n requestToken.setEnabled(false);\n username.setValue(\"\");\n greeting.setValue(\"\");\n token.setValue(\"\");\n newPassword.setValue(\"\");\n newPasswordRepeat.setValue(\"\");\n show(REQUEST_TOKEN);\n }",
"boolean isExpired();",
"private void expire()\n\t{\n\t\tif (m_expire != 0 && m_timeExp < System.currentTimeMillis())\n\t\t{\n\t\t//\tSystem.out.println (\"------------ Expired: \" + getName() + \" --------------------\");\n\t\t\treset();\n\t\t}\n\t}",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\npublic boolean isCredentialsNonExpired() {\n\treturn false;\n}",
"@Override\r\n\t\t\tpublic void done(Integer arg0, BmobException arg1) {\n\t\t\t\tif(arg1==null){//验证码发送成功\r\n\t\t \tmyHandler.sendEmptyMessageDelayed(30000, 0);\r\n\t\t }\r\n\t\t\t}",
"public interface CaptchaService {\n /**\n * 生成验证码图片\n *\n * @param captchaId\n * @return\n */\n BufferedImage buildImage(String captchaId);\n\n /**\n * 验证 验证码\n * @param captchaType\n * @param captchaId\n * @param captcha\n * @return\n */\n boolean isValid(Setting.CaptchaType captchaType, String captchaId, String captcha);\n}",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"@Override\n public boolean isCredentialsNonExpired() {\n return Boolean.TRUE;\n }",
"@Override\n\t\t\t\tpublic boolean isCredentialsNonExpired() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"private void signalInvalidPassword() {\r\n passText.setBackgroundColor(ContextCompat.getColor(this, R.color.errorBackground));\r\n Toast.makeText(this, \"The password was incorrect!\", Toast.LENGTH_SHORT).show();\r\n }",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\r\n\t}",
"boolean isCredentialsNonExpired();",
"boolean isCredentialsNonExpired();",
"@Override\n\tpublic boolean isCredentialsNonExpired()\n\t{\n\t\treturn true;\n\t}",
"long invalidations();",
"private void sendTrialExpiredEmail(String email) throws MessagingException{\r\n\t\temailService.send(email, trialExpiredSubject, null, trialExpiredEmailBody);\r\n\t}",
"@Test\n\tpublic void testUnmatchingPasswordNegative1() {\n\t\tfillSignUpForm(\"marius\",\"voda\",\"[email protected]\",\"Parola123\",\"parola123\",\"socialNetworks\");\n\t\tassertEquals(\"Passwords must match\", driver.findElement(By.cssSelector(\"#sign-up-confirm-password-div > app-form-control-error-message > em > span\")).getText());\n\t}",
"@Test\n\tpublic void checkconfirmpassword_characters()\n\t{\n\t\t\n\t\tPageFactory.initElements(driver, Resetpassword.class);\n\t\tResetpassword.confirm_password.sendKeys(\"co12!@\");\n\t\tString user_text=Resetpassword.error_message.getText();\n\t\tAssert.assertEquals(user_text,\"co12!@\");\n\t\t\n\t}",
"public String Login_by_entering_credentials_which_do_not_exsist() {\n\temailtextbox.sendKeys(\"User\"+random.nextInt(100000)+\"@gmail.com\");\n\tpasswordtextbox.sendKeys(\"password\"+random.nextInt(100000));\n\tLoginButton.click();\n\twait.TextToBe_Wait(\"//div[text()='Invalid Email or Password']\", \"Invalid Email or Password\");\n\tString text=ErrorMessage.getText();\n\treturn text;\n\t}",
"@Override\n public void run() {\n codeTime--;\n get_code_btn.setText(codeTime + \"s\");\n if (codeTime <= 0) {\n if (timer != null) {\n timer.cancel();\n }\n get_code_btn.setText(\"获取验证码\");\n isGetVerification=false;\n }\n }",
"public void setCaptchaResponse(final String captchaResponse) {\n mCaptchaResponse = captchaResponse;\n }",
"public static void Android_Invalid_otp() {\n try {\n\n AppiumDriver<MobileElement> driver = getAppiumDriver();\n Thread.sleep(2000);\n MobileElement el1 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[1]/android.widget.EditText\");\n el1.click();\n\n String userName = getData(\"UserName\");\n el1.sendKeys(userName);\n driver.hideKeyboard();\n MobileElement el2 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[3]/android.widget.EditText\");\n String password = getData(\"Password\");\n\n el2.sendKeys(password);\n driver.hideKeyboard();\n ReportHelper.logReportStatus(LogStatus.PASS, \"UserName and Password Given Successfully\");\n\n MobileElement loginBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Login']\");\n loginBtn.click();\n\n Thread.sleep(12000);\n\n driver.findElementByXPath(\"//android.widget.EditText[@text='Confirmation Code']\").sendKeys(\"5252\");\n Thread.sleep(2000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Invalid OTP Given Successfully\");\n driver.hideKeyboard();\n MobileElement continueBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Continue']\");\n continueBtn.click();\n Thread.sleep(15000);\n MobileElement Errormsg = driver.findElementByXPath(\"//android.widget.TextView[@text='Sorry the authentication code you entered is incorrect. Please try again.']\");\n\n if (Errormsg.isDisplayed()) {\n Thread.sleep(3000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Sorry the authentication code you entered is incorrect. Please try again.\");\n MobileElement e2 = driver.findElementByXPath(\"//android.widget.Button[@text='Go To Home']\");\n e2.click();\n Thread.sleep(2000);\n }\n\n\n } catch (Exception e) {\n ReportHelper.logReportStatus(LogStatus.FAIL, \"login into the application\");\n\n }\n }",
"public String getInvalidError()\n\t{\n\t\t @SuppressWarnings(\"deprecation\")\n\t\tFluentWait<WebDriver> wait = new FluentWait<WebDriver>(driver)\n\t\t\t .withTimeout(5000, TimeUnit.MILLISECONDS)\n\t\t\t .pollingEvery(250, TimeUnit.MILLISECONDS)\n\t\t\t .ignoring(NoSuchElementException.class);\n\t\t\t \n\t\t\t WebElement element = wait.until(new Function<WebDriver, WebElement>() \n\t\t\t {\n\t\t\t public WebElement apply(WebDriver driver) \n\t\t\t {\n\t\t\t\t String getTextOnPage = invaliderror.getText();\n\t\t\t\t \n\t\t\t\t if(getTextOnPage.contains(\"Invalid Username Or Password\"))\n\t\t\t\t \t{\n\t\t\t\t\t \treturn invaliderror;\n\t\t\t\t \t}\n\t\t\t\t else\n\t\t\t\t \t{\n\t\t\t\t\t \treturn null;\n\t\t\t\t \t}\n\t\t\t }\n\t\t\t }\n\t\t\t );\n\t\t\t\n\t\t\treturn element.getText();\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@SuppressWarnings(\"unused\")\n void expire();",
"private void invalidateVSacSession(){\n\t \tMatContext.get().getVsacapiServiceAsync().inValidateVsacUser(new AsyncCallback<Void>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Throwable caught) {\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Void result) {\n\n\t\t\t\t}\n\t\t\t});\n\n\t\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"public void resetForm() {\r\n\t\tfinal CTracked ctracked = UserSettings.ctracked == null ? new CTracked()\r\n\t\t\t\t: UserSettings.ctracked;\r\n\r\n\t\ttxtPassword.setValue(\"\");\r\n\t\ttxtPassword.clearInvalid();\r\n\r\n\t\ttxtPasswordConfirm.setValue(\"\");\r\n\t\ttxtPasswordConfirm.clearInvalid();\r\n\r\n\t\ttxtName.setValue(ctracked.getName() == null ? \"\" : ctracked.getName());\r\n\t\ttxtName.clearInvalid();\r\n\r\n\t\tif (ctracked.getBirthday() != null) {\r\n\t\t\tUserSettings.timerTask.getTaskList().add(new Task(2) {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void execute() {\r\n\t\t\t\t\tdateBirthday.setValue(ctracked.getBirthday());\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tdateBirthday.setValue(\"\");\r\n\t\t}\r\n\t\tdateBirthday.clearInvalid();\r\n\t\t\r\n\t\ttxtUsername.setValue(String.valueOf(ctracked.getUsername()));\r\n\r\n\r\n\t\ttxtMobilePhone.setValue(ctracked.getTel() == null ? \"\" : ctracked\r\n\t\t\t\t.getTel());\r\n\t\ttxtMobilePhone.clearInvalid();\r\n\r\n\t\ttxtEmail.setValue(ctracked.getEmail() == null ? \"\" : ctracked\r\n\t\t\t\t.getEmail());\r\n\t\ttxtEmail.clearInvalid();\r\n\r\n\t\ttxtEmailConfirm.setValue(ctracked.getEmail() == null ? \"\" : ctracked\r\n\t\t\t\t.getEmail());\r\n\t\ttxtEmailConfirm.clearInvalid();\r\n\r\n\t\tif (ctracked.getIntervalGps() != null) {\r\n\t\t\tUserSettings.timerTask.getTaskList().add(new Task(2) {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void execute() {\r\n\t\t\t\t\tcbIntervalGPS.setValue(ctracked.getIntervalGps()+\"\");\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tcbIntervalGPS.setValue(\"10\");\r\n\t\t}\r\n\t\tcbIntervalGPS.clearInvalid();\r\n\r\n\t\ttxtIconPath\r\n\t\t\t\t.setValue(ctracked.getIconPath() == null ? DEFFAULT_ICON_PATH\r\n\t\t\t\t\t\t: ctracked.getIconPath());\r\n\r\n\t\timgIcon.setUrl(txtIconPath.getText());\r\n\r\n\t\tcheckActive.setValue(ctracked.isActive() == null ? false : true);\r\n\r\n\t\tcheckEmbedded.setValue(ctracked.getEmbedded() == null ? false : true);\r\n\r\n\t\tcheckShowInMap.setValue(ctracked.getShowInMap() == null ? false : true);\r\n\r\n\t\tcbLanguage.setValue(ctracked.getLang() == null ? \"vi\" : ctracked\r\n\t\t\t\t.getLang());\r\n\t\tcbCountry.setValue(ctracked.getCountry() == null ? \"VN\" : ctracked\r\n\t\t\t\t.getCountry());\r\n\t\tcbTimeZone.setValue(ctracked.getGmt() == null ? \"7\" : ctracked.getGmt()\r\n\t\t\t\t+ \"\");\r\n\r\n\t\ttxtApiKey.setValue(ctracked.getApiKey() == null ? \"\" : ctracked\r\n\t\t\t\t.getApiKey());\r\n\r\n\t\tpostResetForm();\r\n\t}",
"@Test(suiteName = \"NowPlaying\", testName = \"DMCA Restricted\", description = \"Validating DMCA restricted\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-219\" })\n\tpublic void dmcaRestrictedChannelLogo() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"verifying DMCA restricted Channel Logo MOBANDEVER-219\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickonMusic();\n\t\t\tcommon.scrollUntilTextExists(\"Dance/Electronic\");\n\t\t\tgetPageFactory().getEvehome().clickMucisSubRock();\n\t\t\tgetPageFactory().getEvehome().popChannel1();\n\t\t\tgetPageFactory().getCategory().nplLogo();\n\t\t\tgetPageFactory().getEvehome().clickminimize();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"public boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"public boolean isCredentialsNonExpired() {\n\t\treturn false;\r\n\t}",
"@Test\n\tpublic void testUnmatchingPasswordNegative2() {\n\t\tfillSignUpForm(\"marius\",\"voda\",\"[email protected]\",\"Parola123\",\"PaR0la123\",\"socialNetworks\");\n\t\tassertEquals(\"Passwords must match\", driver.findElement(By.cssSelector(\"#sign-up-confirm-password-div > app-form-control-error-message > em > span\")).getText());\n\t}",
"boolean hasExpired();",
"@Override\n public void failure(DigitsException exception) {\n Toast.makeText(ForgotPassword.this, \"Couldn't verify phone number\", Toast.LENGTH_SHORT).show();\n finish();\n }",
"public void sessionTimeout() {\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(DeviceTrackerApplication.getContext());\n alertDialogBuilder.setTitle(getString(R.string.app_name));\n alertDialogBuilder\n .setMessage(R.string.session_expired)\n .setCancelable(false)\n .setPositiveButton(R.string.ok_msg, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n logout();\n }\n });\n alertDialog = alertDialogBuilder.create();\n alertDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);\n startSessionTimer(0);\n }",
"public void Verify(View view) {\n try {\n if (!appsingleton.isvalidateLength(et_username,6)) {\n tv_validationtext.setText(getResources().getString(R.string.st_errorOtplength));\n rl_validation.setVisibility(View.VISIBLE);\n tv_validationtext.startAnimation(appsingleton.shake_animation);\n return;\n }\n else\n {\n rl_validation.setVisibility(View.GONE);\n }\n\n if (AppUtils.isNetworkAvailable(this)) {\n new OTPVerification(et_username.getText().toString()).execute();\n\n }//end of network if\n else\n {\n appsingleton.SnackbarMessage(getResources().getString(R.string.st_internet_error),\"\",et_username);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"protected void sessionExpired(PrintWriter out, BrowserKind bk, boolean isExternalRequest)\n {\n IHTML htm = new HTML(bk);\n if (! isExternalRequest) {\n\t htm.addBody().setOnLoad(\"window.alert('Your Session Has Expired.\\\\n Please Login Again.');parent.location='/servlet/common.SvtLogoutHandler';\"); \t\n } else {\n\t htm.addBody().setOnLoad(\"window.alert('Your Session Has Expired.\\\\n Please Login Again.');parent.location='/pmc/servlet/extranetProxy?Servlet=common.SvtLogoutHandler';\"); \t \t\n }\n out.println(htm);\n }",
"@Test\r\n public void positiveRegistration() {\r\n driver.get(\"http://127.0.0.1:8888/wp-login.php?action=register\");\r\n StringBuilder sb = new StringBuilder(len);\r\n for (int i = 0; i < len; i++) {\r\n sb.append(AB.charAt(rnd.nextInt(AB.length())));\r\n }\r\n String charSequence = \"\";\r\n charSequence = sb.toString();\r\n WebElement loginField = driver.findElement(By.xpath(\"//input[@id='user_login']\"));\r\n loginField.sendKeys(charSequence);\r\n WebElement passwdField = driver.findElement(By.xpath(\"//input[@id='user_email']\"));\r\n passwdField.sendKeys(charSequence+\"@gmail.com\");\r\n\r\n WebElement registerButton = driver.findElement(By.xpath(\"//input[@name='wp-submit']\"));\r\n registerButton.click();\r\n\r\n WebElement registrationMessage = driver.findElement(By.xpath(\"//p[@class='message']\"));\r\n Assert.assertEquals(registrationMessage.getText(),\"Регистрация завершена. Проверьте вашу почту.\");\r\n }",
"@Test\n public void incorrectUsernameIncorrectPasswordTest(){\n WebElement userField = driver.findElement(By.name(\"user\"));\n WebElement passwordField = driver.findElement(By.name(\"passwd\"));\n WebElement submitbutton = driver.findElement(By.className(\"submit\"));\n\n userField.sendKeys(Constants.REDDIT_INVALID_ACCT);\n passwordField.sendKeys(Constants.REDDIT_INVALID_PASS);\n submitbutton.click();\n\n WebDriverWait w = new WebDriverWait(driver, 10);\n\n assertTrue(submitbutton.isDisplayed());\n }",
"public boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"public boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"public void verifyExpiration(RefreshToken token) {\n if (token.getExpiryDate().compareTo(Instant.now()) < 0) {\n throw new TokenRefreshException(token.getToken(), \"Expired token. Please issue a new request\");\n }\n }",
"public void user_lost() {\n\tresetExpComp();\r\n }",
"public boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"public boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Test(suiteName = \"NowPlaying\", testName = \"Now Playing - Live - Unrestricted - Channel Logo\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-206\" })\n\tpublic void validateHowardChannelLogo() {\n\t\tCommon common = new Common(driver);\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickOnTalk();\n\t\t\tgetPageFactory().getHoward().clickOnHowardStern();\n\t\t\tgetPageFactory().getHoward().verifyHowardChannelLogo();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"private URL resolveRecaptcha(CharSequence content) {\n\t\treturn null;\n\t}",
"public boolean verifyCaptcha(HttpServletRequest servletReq, Request req, Response res, PrintWriter out)\n\t{\n\t\tif ( null == captchaUrls) return true;\n\t\t\n\t\tUserProfile user = req.getUser();\n\t\t\n\t\tStringBuilder sb = new StringBuilder(24);\n\t\tsb.append(req.sensorId).append('.').append(req.action);\n\t\tif ( ! captchaUrls.contains(sb.toString())) return true;\n\t\t\n\t\tMap<String, String> params = req.mapData;\n\n\t\tString readcaptcha = null;\n\t\tString encodedCaptcha = null;\n\t\tif ( params.containsKey(\"readcaptcha\") ) \n\t\t\treadcaptcha = req.getString(\"readcaptcha\", true, true, false);\n\n\t\tif ( params.containsKey(\"encodedcaptcha\") ) \n\t\t\tencodedCaptcha = req.getString(\"encodedcaptcha\", true, true, false);\n\t\telse {\n\t\t\tif ( StringUtils.isEmpty(encodedCaptcha)) {\n\t\t\t\tCookie[] cookies = servletReq.getCookies();\n\t\t\t\tif (cookies != null && cookies.length > 0) {\n\t\t\t\t\tfor (Cookie cookie : cookies) {\n\t\t\t\t\t\tif ( cookie.getName().equals(\"encodedcaptcha\")) {\n\t\t\t\t\t\t\tencodedCaptcha = cookie.getValue(); \n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tString captchaTextEncoded = null;\n\t\tif ( null != readcaptcha && null != encodedCaptcha) {\n\t\t\tString secureCaptchaText = servletReq.getRemoteAddr() + readcaptcha;\n\t\t\tcaptchaTextEncoded = Hash.createHex(this.key, secureCaptchaText);\n\t\t\tif (captchaTextEncoded.equals(encodedCaptcha)) return true;\n\t\t}\n\n\t\tres.setErrorCode(\"CAPTCHA_ERROR\", ErrorCodes.CAPTCHA_MISMATCH, user.getLocale(), true);\n\t\treturn false;\n\t}",
"public void tryLoginAgain(){\n\t\tnameField.setText(\"\");\n\t\trollField.setText(\"\");\n\t\tseatField.setText(\"\");\n\t\tnameField.repaint();\n\t\tseatField.repaint();\n\t\trollField.repaint();\n\t\tclearErrors();\n\t\tmainDialog.dispose();\t\t\n\t}",
"@Test\n\t void testCredentialsNonExpired() {\n\t\tassertTrue(user.isCredentialsNonExpired());\n\t}",
"public abstract void expire();",
"public static void enterCaptcha(WebElement captchaField) {\n\t\tString captchaVal = JOptionPane.showInputDialog(\"Please enter the captcha value:\");\n\t\tSystem.out.println(captchaVal);\n\t\t// Type the entered captcha to the text box\n\t\tcaptchaField.sendKeys(captchaVal);\n\t}"
]
| [
"0.6260204",
"0.61593926",
"0.61492467",
"0.60656",
"0.602968",
"0.5916648",
"0.59099895",
"0.57993174",
"0.5574009",
"0.5533782",
"0.55138963",
"0.54938066",
"0.54901487",
"0.54551804",
"0.5453855",
"0.54486173",
"0.54433846",
"0.54416394",
"0.54122555",
"0.5367765",
"0.5315015",
"0.53024584",
"0.5261889",
"0.52244055",
"0.5187676",
"0.5186253",
"0.5154177",
"0.5136764",
"0.51258725",
"0.51235944",
"0.5079778",
"0.5076966",
"0.50588566",
"0.50588566",
"0.50588566",
"0.5051362",
"0.5041006",
"0.5037625",
"0.5023798",
"0.5023798",
"0.5021282",
"0.50212336",
"0.5009011",
"0.50009036",
"0.49969116",
"0.49969116",
"0.49805725",
"0.4971975",
"0.49715552",
"0.49677628",
"0.49634072",
"0.49567738",
"0.49563065",
"0.4954887",
"0.4946073",
"0.49422735",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.4938109",
"0.49315012",
"0.49298313",
"0.49214745",
"0.49214745",
"0.49214745",
"0.49050608",
"0.48925853",
"0.48900586",
"0.48803902",
"0.4870056",
"0.48574868",
"0.48413986",
"0.4836191",
"0.48307598",
"0.48280698",
"0.4818493",
"0.48160267",
"0.48114115",
"0.48114115",
"0.48040128",
"0.4796739",
"0.47912136",
"0.47912136",
"0.4790607",
"0.47857976",
"0.47734147",
"0.4771036",
"0.47707564",
"0.47705165",
"0.476798"
]
| 0.0 | -1 |
one error > check captcha | @Override
public boolean matches(Object list) {
return ((List<String>) list).size() == 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test(dependsOnMethods = {\"register\"})\n void confirmEmailAddressByCaptcha() {\n common.findWebElementByXpath(\"//*[@id=\\\"content\\\"]/fieldset/label/div\").click();\n\n //Click on Send captcha button\n common.timeoutSeconds(2);\n common.findWebElementById(\"send-captcha-button\").click();\n\n //No magic code is set\n common.verifyStatusMessage(\"Det uppstod ett problem med verifieringen av att du är en människa. \" +\n \"Var god försök igen.\");\n }",
"public static void main(String[] args) throws Exception {\r\n\t\tSystem.out.println(\"Does the captcha contain alphabets (yes or no) :\");\r\n\tScanner sc=new Scanner(System.in);\r\n\tString in=sc.nextLine(); // taking imput (yes or no)\r\n\tif(in.toLowerCase().equals(\"yes\") || in.toLowerCase().equals(\"y\")) // checking if the input is yes\r\n\t{\r\n\t\talpha=true; // if input is yes alpha flag is set to true\r\n\t\tfor (int i=0; i<35; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\")); // taking all the templates along with alphabets into consideration\r\n\t\t}\r\n\r\n\t}\r\n\telse\r\n\t{\r\n\t\talpha=false;// if input is not yes alpha flag is set to true\r\n\t\tfor (int i=0; i<10; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\"));// taking all the templates along with out alphabets into consideration\r\n\t\t}\r\n\t}\r\n\t\tint numTests = 100; // total number of trials\r\n\t\t\r\n\t\t// read in the templates for each character\r\n\t\tfor (int i=0; i<35; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\"));\r\n\t\t}\r\n\r\n\t\tint correct = 0;\r\n\t\tfor (int i=0; i<numTests; i++) {\r\n\t\t\t\r\n\t\t\t// generate a random string\r\n\t\t\tString rightAnswer = randomString(6,alpha);\r\n\t\t\t\r\n\t\t\t// make a captcha from it\r\n\t\t\tBufferedImage captchaImage = generateCaptcha(rightAnswer);\r\n\t\t\t\r\n\t\t\tif (show) {\r\n\t\t\t\tImageIO.write(captchaImage, \"jpeg\", new File(\"see.jpg\"));\r\n\t\t\t\tshow = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// guess the captcha\r\n\t\t\t\r\n\t\t\tString guess = guessCaptcha(captchaImage);\r\n\t\t\t// see if we got it right\r\n\t\t\tif (guess.equals(rightAnswer)) correct++;\r\n\t\t}\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"accuracy: \" + (correct / (double) numTests));\r\n\t}",
"@Override\r\n public void onClick(View arg0) {\n if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n\r\n //Chaptcha dialog\r\n captchaDialog = new Dialog(CreateAccount.this);\r\n captchaDialog.setContentView(R.layout.captcha_dialog);\r\n captchaDialog.setTitle(\"Please enter captcha\");\r\n\r\n reCaptcha = (ReCaptcha) captchaDialog.findViewById(R.id.recaptcha);\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n\r\n chaptchaAnswer = (EditText) captchaDialog.findViewById(R.id.answer);\r\n\r\n Button captchaVerify = (Button) captchaDialog.findViewById(R.id.verify);\r\n captchaVerify.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n //dialog.dismiss();\r\n reCaptcha.verifyAnswerAsync(\"6LfhQwsTAAAAALJvjUqiurjAdzi4dztuUIGq-NyZ\", chaptchaAnswer.getText().toString(), CreateAccount.this);\r\n }\r\n });\r\n Button captchaReload = (Button) captchaDialog.findViewById(R.id.reload);\r\n captchaReload.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n }\r\n });\r\n captchaDialog.show();\r\n\r\n } else if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n email.setError(\"Invalid e-mail\");\r\n }\r\n }",
"public void msjereCaptcha(){\r\n click(esperarElementoPresenteEnPagina(locatorMsjeCaptcha));\r\n }",
"public static String captcha(){\n\t\tString captcha=\"\";\n\t\tfor(int i=0; i<8; i+=2){\n\t\t\tcaptcha+=(char)(65+Math.random()*26)+\" \";\n\t\t\tcaptcha+=(char)(97+Math.random()*26);\n\t\t}\n\t\treturn captcha;\n\n\t}",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (Boolean.TRUE.equals(acc.getBooleanProperty(\"free\"))) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (acc.getType() == AccountType.FREE) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"@Override\r\n\tpublic void validate(FacesContext fc, UIComponent arg1, Object arg2)\r\n\t\t\tthrows ValidatorException {\n HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\r\n Boolean isResponseCorrect = Boolean.FALSE;\r\n javax.servlet.http.HttpSession session = request.getSession();\r\n String parm = (String)arg2;\r\n String c = (String) session.getAttribute(MyCaptcha.CAPTCHA_KEY);\r\n if (!parm.equals(c)) {\r\n \tFacesMessage message = new FacesMessage();\r\n \tmessage.setSummary(\"You have entered invalid text for image.\");\r\n \tmessage.setSeverity(FacesMessage.SEVERITY_ERROR);\r\n \tthrow new ValidatorException(message);\r\n\r\n }\r\n\t}",
"void setCaptcha(ICaptcha captcha);",
"@Override\n\tprotected boolean checkLogin(String loginResult,HttpClient client,String user, String password, int tryCount, String captcha){\n\t\tif (StringUtil.isNull(loginResult)) {\n\t\t\t// Login success\n\t\t\treturn true;\n\t\t}\n\n\t\tint result = getCode(loginResult, \"result\"), status = getCode(loginResult, \"status\");\n\n\t\tif (result == 1 && status == 1) {\n\t\t\t// Login success\n\t\t\treturn true;\n\t\t}else if (result == 0 && status == -2) {\n\t\t\t// Password Error\n\t\t\tput2RtnMap(ERROR, \"login fail! Username or password is wrong!\");\n\t\t\treturn false;\n\t\t}else if (result == 0 && (status == -3 || status == -1)) {\n\t\t\t// status(-3): Need captcha verification status(-1): Wrong\n\t\t\t// captcha\n\t\t\tcaptcha = VerifyUtil.getVerifyCode(client, website);\n\t\t\treturn login(client, user, password, tryCount + 1, captcha);\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}",
"@Override\n public boolean valida() {\n mediatorCredito m = new mediatorCredito();\n try{\n BigInteger dit = new BigInteger(JOptionPane.showInputDialog(null,\"Digite su número de \"\n + \"tarjeta de crédito\",\"\"));\n String pag = JOptionPane.showInputDialog(null,\"Ingrese su medio de pago: (Visa, master Card\"\n + \", American Express)\",\"\");\n if(m.verificarForm(dit, pag)==false){\n JOptionPane.showMessageDialog(null,\"ups, el medio de pago o la tarjeta de crédito no es válido\"\n ,\"Error\",0);\n }\n return m.verificarForm(dit, pag);\n \n }catch(Exception e){\n JOptionPane.showMessageDialog(null,\"Acción cancelada\",\"Advertencia\",2);\n return false;\n }\n }",
"public void Verify(View view) {\n try {\n if (!appsingleton.isvalidateLength(et_username,6)) {\n tv_validationtext.setText(getResources().getString(R.string.st_errorOtplength));\n rl_validation.setVisibility(View.VISIBLE);\n tv_validationtext.startAnimation(appsingleton.shake_animation);\n return;\n }\n else\n {\n rl_validation.setVisibility(View.GONE);\n }\n\n if (AppUtils.isNetworkAvailable(this)) {\n new OTPVerification(et_username.getText().toString()).execute();\n\n }//end of network if\n else\n {\n appsingleton.SnackbarMessage(getResources().getString(R.string.st_internet_error),\"\",et_username);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Test\n\tpublic void checkconfirmpassword_characters()\n\t{\n\t\t\n\t\tPageFactory.initElements(driver, Resetpassword.class);\n\t\tResetpassword.confirm_password.sendKeys(\"co12!@\");\n\t\tString user_text=Resetpassword.error_message.getText();\n\t\tAssert.assertEquals(user_text,\"co12!@\");\n\t\t\n\t}",
"public boolean verifyCaptcha(HttpServletRequest servletReq, Request req, Response res, PrintWriter out)\n\t{\n\t\tif ( null == captchaUrls) return true;\n\t\t\n\t\tUserProfile user = req.getUser();\n\t\t\n\t\tStringBuilder sb = new StringBuilder(24);\n\t\tsb.append(req.sensorId).append('.').append(req.action);\n\t\tif ( ! captchaUrls.contains(sb.toString())) return true;\n\t\t\n\t\tMap<String, String> params = req.mapData;\n\n\t\tString readcaptcha = null;\n\t\tString encodedCaptcha = null;\n\t\tif ( params.containsKey(\"readcaptcha\") ) \n\t\t\treadcaptcha = req.getString(\"readcaptcha\", true, true, false);\n\n\t\tif ( params.containsKey(\"encodedcaptcha\") ) \n\t\t\tencodedCaptcha = req.getString(\"encodedcaptcha\", true, true, false);\n\t\telse {\n\t\t\tif ( StringUtils.isEmpty(encodedCaptcha)) {\n\t\t\t\tCookie[] cookies = servletReq.getCookies();\n\t\t\t\tif (cookies != null && cookies.length > 0) {\n\t\t\t\t\tfor (Cookie cookie : cookies) {\n\t\t\t\t\t\tif ( cookie.getName().equals(\"encodedcaptcha\")) {\n\t\t\t\t\t\t\tencodedCaptcha = cookie.getValue(); \n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tString captchaTextEncoded = null;\n\t\tif ( null != readcaptcha && null != encodedCaptcha) {\n\t\t\tString secureCaptchaText = servletReq.getRemoteAddr() + readcaptcha;\n\t\t\tcaptchaTextEncoded = Hash.createHex(this.key, secureCaptchaText);\n\t\t\tif (captchaTextEncoded.equals(encodedCaptcha)) return true;\n\t\t}\n\n\t\tres.setErrorCode(\"CAPTCHA_ERROR\", ErrorCodes.CAPTCHA_MISMATCH, user.getLocale(), true);\n\t\treturn false;\n\t}",
"private static Boolean errorCheck(String Buffer){\n if(Buffer.matches(\"Y\")) return true;\n if(Buffer.matches(\"N\")) return false;\n screenClear(); //Clears the screen and applies an error message.\n return moreInput(); //Recursive repeat upon error.\n }",
"private void CustCheckLogin() {\n\t\tLoggingUtil.trace(\"Customer log in\");\n\t\tinput = new Scanner(System.in);\n\t\tSystem.out.println(\"Customer Login Page\");\n\t\tString email;\tString pass;\t\n\t\tint i=0;//counter from tries\n\t do { System.out.println(\"Email: \");\n\t\tSystem.out.print(\">>>>>\");email=input.nextLine(); c.setUsername(email);\n\t\tif(email.isEmpty()) {System.out.println(\"\\n\\nNo Dont put empty email\"); break; }\n\t\tSystem.out.println(\"Passowrd\");\n\t\tSystem.out.print(\">>>>>\");pass=input.nextLine();\n\t i++; \n\t if (s.checkUserCust(email, pass)==false) {\n\t \tSystem.out.println(\"Invalid Username or Pass\"); \n\t \tSystem.out.println(i);\n\t }\n\t else { cs.choosechoice();// go to customer screen\n\t \t break; }\t \n\t }while(i<4);\n\t ms.pageoneScreen();\n\t}",
"public Captcha() {\n value = generateCaptchaCode();\n id = generateCaptchaID();\n date = System.currentTimeMillis();\n }",
"@Override\n public void onSuccess(SafetyNetApi.RecaptchaTokenResponse response) {\n userResponseToken = response.getTokenResult();\n if (!userResponseToken.isEmpty()) {\n // Validate the user response token using the\n // reCAPTCHA siteverify API.\n // new SendPostRequest().execute();\n sendRequest();\n }\n }",
"@Test\r\n public void positiveRegistration() {\r\n driver.get(\"http://127.0.0.1:8888/wp-login.php?action=register\");\r\n StringBuilder sb = new StringBuilder(len);\r\n for (int i = 0; i < len; i++) {\r\n sb.append(AB.charAt(rnd.nextInt(AB.length())));\r\n }\r\n String charSequence = \"\";\r\n charSequence = sb.toString();\r\n WebElement loginField = driver.findElement(By.xpath(\"//input[@id='user_login']\"));\r\n loginField.sendKeys(charSequence);\r\n WebElement passwdField = driver.findElement(By.xpath(\"//input[@id='user_email']\"));\r\n passwdField.sendKeys(charSequence+\"@gmail.com\");\r\n\r\n WebElement registerButton = driver.findElement(By.xpath(\"//input[@name='wp-submit']\"));\r\n registerButton.click();\r\n\r\n WebElement registrationMessage = driver.findElement(By.xpath(\"//p[@class='message']\"));\r\n Assert.assertEquals(registrationMessage.getText(),\"Регистрация завершена. Проверьте вашу почту.\");\r\n }",
"private void validarSinInternet() {\n String email_val = email.getText().toString().trim();\n String password_val = password.getText().toString().trim();\n progressBar.setVisibility(View.VISIBLE);\n if ((Patterns.EMAIL_ADDRESS.matcher(email_val).matches() == false) && (email_val.isEmpty())) {\n mensaje_email();\n progressBar.setVisibility(View.GONE);\n } else if ((password_val.isEmpty())) {\n mensaje_tamaño();\n progressBar.setVisibility(View.GONE);\n } else {\n LoginUser(email_val, password_val);\n progressBar.setVisibility(View.GONE);\n }\n }",
"public Bitmap getCaptcha(String devKey) throws CaptchaException {\n\t\tBitmap image = null;\n\t\ttry {\n\t\t\tString getTokenURL = CAPTCHA_URL + \"/get?key=\" + devKey;\n\n\t\t\tURL getUrl = new URL(getTokenURL);\n\n\t\t\tHttpURLConnection httpURLConnection = (HttpURLConnection) getUrl.openConnection();\n\n\t\t\thttpURLConnection.connect();\n\n\t\t\tint code = httpURLConnection.getResponseCode();\n\t\t\tSystem.out.println(code);\n\t\t\tif (code == 200) {\n\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));\n\t\t\t\tString jsonString = reader.readLine();\n\n\t\t\t\tJSONObject jsonObject = new JSONObject(jsonString);\n\t\t\t\tString imageURL = jsonObject.getString(\"image\");\n\t\t\t\tthis.token = jsonObject.getString(\"token\");\n\t\t\t\tthis.verifyURL = jsonObject.getString(\"verify\");\n\t\t\t\tthis.adid = jsonObject.getString(\"adid\");\n\t\t\t\tthis.adurl = jsonObject.getString(\"adurl\");\n\t\t\t\tthis.audioURL = jsonObject.getString(\"audio\");\n\n\t\t\t\treader.close();\n\n\n\t\t\t\t//ini cara defaultnya\n\t\t\t\t/*URL getImageURL = new URL(imageURL);\n\t\t\t\thttpURLConnection = (HttpURLConnection) getImageURL.openConnection();\n\t\t\t\tInputStream imageStream = httpURLConnection.getInputStream();\n\t\t\t\tcode = httpURLConnection.getResponseCode();\n\t\t\t\tif(code == 200){\n\t\t\t\t\timage = BitmapFactory.decodeStream(imageStream);\n\t\t\t\t\timageStream.close();\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"img response http status code is:\" + code);\n\t\t\t\t}\n\t\t\t\thttpURLConnection.disconnect(); */\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//ini pake method bantu\n\t\t\t\timage = loadImageFromUrl(imageURL);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"get response http status code is:\" + code);\n\t\t\t}\t\t\t\n\n\t\t\thttpURLConnection.disconnect();\n\n\t\t} catch(MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch(JSONException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t}\n\n\t\treturn image;\n\t}",
"@Test\n public void testFactorialInvalidNonInteger()\n {\n driver.findElement(By.linkText(\"Factorial\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"hello\");\n try {\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"1\"));\n } catch (NoSuchElementException e) {\n fail();\n }\n }",
"private void validarResp(){\n String respIngresada = txtRespuesta.getText().toString();\n\n if(respIngresada.equals(respuesta)){\n //Habilita el prox paso\n viewFlipper.showNext();\n pasoFlipper = 1;\n } else {\n txtRespuesta.setError(getString(R.string.error_resp_incorrecta));\n txtRespuesta.requestFocus();\n }\n }",
"public String getCaptchaCode() {\n HttpGet httpget = new HttpGet(HttpURL.getCaptchaURL());\n try {\n HttpEntity entity = this.client.execute(httpget).getEntity();\n\n if (entity != null) {\n InputStream is = entity.getContent();\n File captchaImage = new File(CaptchaOCR.CAPTCHA_IMAGE_PATH);\n OutputStream os = new FileOutputStream(captchaImage);\n IOUtils.copy(is, os);\n IOUtils.closeQuietly(is);\n IOUtils.closeQuietly(os);\n }\n EntityUtils.consume(entity);\n return CaptchaOCR.doOcr();\n } catch (ClientProtocolException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return null;\n }",
"@Test\n public void testCantRegisterInvalidEmailShortPassword() {\n enterValuesAndClick(\"name\", \"invalidemail\", \"124\", \"\");\n checkErrors(nameNoError, emailInvalidError, pwdTooShortError, pwdRepeatRequiredError);\n }",
"public String Login_by_entering_credentials_which_do_not_exsist() {\n\temailtextbox.sendKeys(\"User\"+random.nextInt(100000)+\"@gmail.com\");\n\tpasswordtextbox.sendKeys(\"password\"+random.nextInt(100000));\n\tLoginButton.click();\n\twait.TextToBe_Wait(\"//div[text()='Invalid Email or Password']\", \"Invalid Email or Password\");\n\tString text=ErrorMessage.getText();\n\treturn text;\n\t}",
"public interface CaptchaService {\n /**\n * 生成验证码图片\n *\n * @param captchaId\n * @return\n */\n BufferedImage buildImage(String captchaId);\n\n /**\n * 验证 验证码\n * @param captchaType\n * @param captchaId\n * @param captcha\n * @return\n */\n boolean isValid(Setting.CaptchaType captchaType, String captchaId, String captcha);\n}",
"public interface CaptchaAlgorithm {\n\n Captcha generate();\n\n}",
"@Override\n public boolean validDefaultTime(String code) {\n return kaptcha.validate(code);\n }",
"public void checkAnswerFirst(View view) {\n userChoosenImage = findViewById(R.id.first_car_image);\n\n if (!resultMessage.getText().equals(\"Time's up!\")) { // making sure that the user can't choose an image after the timer is over\n displayResult();\n }\n }",
"@Test\n public void testCantRegisterMismatchPassword() {\n enterValuesAndClick(\"name\", \"[email protected]\", \"123456\", \"123478\");\n checkErrors(nameNoError, emailNoError, pwdsDoNotMatchError, pwdsDoNotMatchError);\n }",
"private void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int width = 250;\n int height = 100;\n //vectorul de captcha-uri\n// char data[][] = {\n// { 'm', 'a', 'n', 'c', 'a', 'r', 'e' },\n// { 'b', 'e', 't', 'o', 'n' },\n// { 'f', 'r', 'i', 'g', 'i', 'd', 'e', 'r' },\n// { 's', 'u', 'p', 'e', 'r', 'm', 'a', 'n' },\n// { 'j', 'e', 't' }\n// };\n\n //folosim o imagine buffer pentru a desena captcha-ul\n BufferedImage bufImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n Graphics2D g2d = bufImg.createGraphics();\n Font font = new Font(\"Georgia\", Font.BOLD, 18);\n g2d.setFont(font);\n g2d.setColor(Color.WHITE);\n\n //folosim hint-uri ca sa crestam calitatea textului din poza\n RenderingHints rHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n rHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n g2d.setRenderingHints(rHints);\n\n //desenam gradientul, pentru fundalul imaginii\n GradientPaint gPaint = new GradientPaint(0, 0, Color.BLUE, 0, height/2, Color.black, true);\n g2d.setPaint(gPaint);\n g2d.fillRect(0, 0, width, height);\n g2d.setColor(new Color(255, 153, 0));\n\n //numar random pt vectorul de captcha-uri\n Random rand = new Random();\n char data[][] = {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}};\n for (int i = 0; i < 8; i++) {\n char r = rndChar();\n data[0][i] = r;\n }\n //int index = Math.abs(rand.nextInt()) % 5;\n int index = 0;\n //trimitem stringul la user sa stie sa compare input-ul de la user\n String captcha = String.copyValueOf(data[index]);\n request.getSession().setAttribute(\"captcha\", captcha);\n\n //desenam captcha-ul ales in imagine\n int x = 0, y = 0;\n for (int i = 0; i < data[index].length; i++) {\n x += 15 + Math.abs(rand.nextInt()) % 15;\n y = 45 + Math.abs(rand.nextInt()) % 20;\n g2d.drawChars(data[index], i, 1, x, y);\n }\n g2d.dispose();\n\n response.setContentType(\"image/png\");\n OutputStream os = response.getOutputStream();\n ImageIO.write(bufImg, \"png\", os);\n os.close();\n }",
"protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please type in the License Server\");\n else {\n \t//TODO add more checks\n \tok();\n }\n }",
"private void check3(){\n \n if (errorCode == 0){\n \n if (firstDigit * fifthDigit * ninthDigit != 24){\n valid = false;\n errorCode = 3;\n }\n }\n\t}",
"private void checkValidation() {\n // Get email id and password\n MainActivity.EmailAddress = emailid.getText().toString();\n finalPassword = password.getText().toString();\n\n // Check patter for email id\n Pattern p = Pattern.compile(Utils.regEx);\n\n Matcher m = p.matcher(MainActivity.EmailAddress);\n\n // Check for both field is empty or not\n if (MainActivity.EmailAddress.equals(\"\") || MainActivity.EmailAddress.length() == 0\n || finalPassword.equals(\"\") || finalPassword.length() == 0) {\n loginLayout.startAnimation(shakeAnimation);\n new CustomToast().Show_Toast(getActivity(), view,\n \"Enter both credentials.\");\n\n }\n // Check if email id is valid or not\n else if (!m.find())\n new CustomToast().Show_Toast(getActivity(), view,\n \"Your Email Id is Invalid.\");\n // Else do login and do your stuff\n else\n tryLoginUser();\n\n }",
"@Test\n public void testCantRegisterValidEmailEmptyPassword() {\n enterValuesAndClick(\"\", \"[email protected]\", \"\", \"\");\n checkErrors(nameRequiredError, emailNoError, pwdRequiredError, pwdRepeatRequiredError);\n }",
"boolean checkVerification();",
"private boolean checkPassword(){\n Pattern p = Pattern.compile(\"^[A-z0-9]*$\");\n Matcher m = p.matcher(newPass.getText());\n boolean b = m.matches();\n if(newPass.getText().compareTo(repeatPass.getText()) != 0 || newPass.getText().isEmpty() || repeatPass.getText().isEmpty()){\n repeatPass.setBackground(Color.red);\n JOptionPane.showMessageDialog(null, \"Password Error\");\n return false;\n }\n else if(newPass.getText().length() > 10 || b == false){\n newPass.setBackground(Color.red);\n JOptionPane.showMessageDialog(null, \"Password Error\");\n return false;\n }\n newPass.setBackground(Color.green);\n repeatPass.setBackground(Color.green);\n return true;\n }",
"private void check1(){\n \n\t\tif (firstDigit != 4){\n valid = false;\n errorCode = 1;\n }\n\t}",
"public void checkCreditCard() throws BusinessException;",
"private void submitForm() {\n if (!validateName()) {\n return;\n }\n\n if (!validateEmail()) {\n return;\n }\n\n if (!validatePassword()) {\n return;\n }\n\n// Toast.makeText(getApplicationContext(), \"Thank You!\", Toast.LENGTH_SHORT).show();\n}",
"public interface OnCaptchaMatchCallback {\n void matchSuccess(CustomerPuzzleCodeView customerPuzzleCodeView);\n void matchFailed(CustomerPuzzleCodeView customerPuzzleCodeView);\n}",
"private void scanTicket(){\r\n\t\ttext = numberField.getText();\r\n\t\t//Number field text is converted into char \r\n\t\tstringToChar(text);\r\n\t\tif(executed == false){\r\n\t\t\trandom();\r\n\t\t}\r\n\t}",
"@Test(suiteName = \"NowPlaying\", testName = \"Now Playing - Live - Unrestricted - Channel Logo\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-206\" })\n\tpublic void validateHowardChannelLogo() {\n\t\tCommon common = new Common(driver);\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickOnTalk();\n\t\t\tgetPageFactory().getHoward().clickOnHowardStern();\n\t\t\tgetPageFactory().getHoward().verifyHowardChannelLogo();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"private void check_displaysError() {\n onView(withId(R.id.title))\n .check(matches(withText(R.string.input_title_error)));\n onView(withId(R.id.subtitle))\n .check(matches(withText(R.string.input_subtitle_error)));\n\n // And the button to be labeled try again\n onView(withId(R.id.hint))\n .check(matches(isDisplayed()))\n .check(matches(withText(R.string.input_hint_error)));\n }",
"public void validar() \r\n\t{\r\n\t\tString imagen = sudoku.validar();\r\n\t\tactualizarInformacion();\r\n\t\tactualizarImagen(imagen);\r\n\t}",
"@Test\n\tpublic void testUnmatchingPasswordNegative1() {\n\t\tfillSignUpForm(\"marius\",\"voda\",\"[email protected]\",\"Parola123\",\"parola123\",\"socialNetworks\");\n\t\tassertEquals(\"Passwords must match\", driver.findElement(By.cssSelector(\"#sign-up-confirm-password-div > app-form-control-error-message > em > span\")).getText());\n\t}",
"boolean hasCorrect();",
"public void startTest() throws Exception {\n\t\tWebDriver driver = new FirefoxDriver();\r\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t\tdriver.get(ProjectConstants.TEST_END_POINT);\r\n\t\t// driver.manage().window().maximize();\r\n\t\tDimension d = new Dimension(1366, 768);\r\n\t\tdriver.manage().window().setSize(d);\r\n\r\n\t\tThread.sleep(5000);\r\n\r\n\t\t// enter email.\r\n\t\tdriver.findElement(By.id(\"username\")).sendKeys(userName);\r\n\t\t// enter password.\r\n\t\tdriver.findElement(By.id(\"password\")).sendKeys(password);\r\n\t\t// enter captcha.\r\n\t\tString test = driver.findElement(By.xpath(\"//label[@id='ebcaptchatext']\")).getText();\r\n\t\tString ans = String.valueOf(Helpers.decodeCaptcha(test));\r\n\t\tSystem.out.println(\"Test =\" + test + \" Ans =\" + ans);\r\n\t\tdriver.findElement(By.id(\"ebcaptchainput\")).sendKeys(ans);\r\n\t\tdriver.findElement(By.className(\"checkmark-signup\")).click();\r\n\t\t// click on sign in button.\r\n\t\tdriver.findElement(By.id(\"submit\")).click();\r\n\t\tThread.sleep(10000);\r\n\r\n\t\tfor (int i = 0; i < configNumber.keySet().size(); i++) {\r\n\t\t\tif (configNumber.containsKey(\"event\" + i)) {\r\n\t\t\t\tJSONObject event = (JSONObject) configNumber.get(\"event\" + i);\r\n\t\t\t\tint eventType = ((Long) event.get(\"eventtype\")).intValue();\r\n\r\n\t\t\t\tswitch (eventType) {\r\n\t\t\t\tcase EVEN_CLICK:\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\thandleClick((String) event.get(\"id\"), driver);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\r\n\t\t\t\tcase EVEN_SLEEP:\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\thandleSleep(((Long) event.get(\"timeinmilli\")).intValue());\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\r\n\t\t\t\tcase EVEN_ENTER_TEXT:\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tsendText(((String) event.get(\"id\")), ((String) event.get(\"eventvalue\")), driver);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\t\tcase EVEN_WINDOW_CLOSE:\r\n\t\t\t\t\t\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\thandleWindowclose(((String) event.get(\"eventvalue\")), driver);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcatch(Exception e ){\r\n\t\t\t\t\t\t\t//driver.close();\r\n\t\t\t\t\t\t\t System.out.println(\"the browser is still open\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\tThread.currentThread();\r\n\t\tThread.sleep(5000);\r\n\t\t/*\r\n\t\t * WebDriverWait wait = new WebDriverWait(driver, 3);\r\n\t\t * \r\n\t\t * \r\n\t\t * //presence in DOM wait.until(ExpectedConditions.presenceOfElementLocated(By.\r\n\t\t * xpath(\"//a[@class='dropbtn nav-link dropbtnlogin']\")));\r\n\t\t * \r\n\t\t * \r\n\t\t * //clickable wait.until(ExpectedConditions.elementToBeClickable(By.\r\n\t\t * xpath(\"//a[@class='dropbtn nav-link dropbtnlogin']\"))); //WebDriverWait wait\r\n\t\t * = new WebDriverWait(driver, 20);\r\n\t\t * \r\n\t\t * WebElement element1\r\n\t\t * =driver.findElement(By.xpath(\"//a[@class='dropbtn nav-link dropbtnlogin']\"));\r\n\t\t * //wait.until(ExpectedConditions.invisibilityOfElementLocated(By.xpath(\r\n\t\t * \"//span[contains(text(),'Hello')]\"))); element1.click();\r\n\t\t * System.out.println(\"click \"); // WebDriverWait wait1 = new\r\n\t\t * WebDriverWait(driver, 20); JavascriptExecutor js = ((JavascriptExecutor)\r\n\t\t * driver); WebElement element2\r\n\t\t * =driver.findElement(By.xpath(\"//a[contains(text(),'Logout')]\"));\r\n\t\t * js.executeScript(\"arguments[0].scrollIntoView(true);\", element2);\r\n\t\t * //js.executeScript(\"arguments[0].scrollIntoView(true);\", element2);\r\n\t\t * //wait1.until(ExpectedConditions.invisibilityOfElementLocated(By.xpath(\r\n\t\t * \"//a[contains(text(),'Logout')]\"))); element2.click();\r\n\t\t */\t\r\n\t\tdriver.get(\"https://uno.frescodata.com/logout.php\");\r\n\t\tThread.sleep(2000);\r\n\t\tdriver.close();\r\n\t\t\r\n\t\t//driver.get(\"https://uno.frescodata.com/dashboard.php\");\r\n\t\t//driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\t\r\n\t\t//driver.findElement(By.xpath(\"//span[contains(text(),'Hello')]\")).click();\r\n\t\t//System.out.println(\"Done Mouse hover on logout Menu\");\r\n\t\t//driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\t\r\n\t\t//driver.findElement(By.xpath(\" //a[contains(text(),'Logout')]\")).click();\r\n\t\t//driver.close();\r\n\t\t//driver.quit();\r\n\t\t}",
"private void validar() {\n String email_val = email.getText().toString().trim();\n String password_val = password.getText().toString().trim();\n progressBar.setVisibility(View.VISIBLE);\n if ((Patterns.EMAIL_ADDRESS.matcher(email_val).matches() == false) && (email_val.isEmpty())) {\n mensaje_email();\n progressBar.setVisibility(View.GONE);\n } else if ((password_val.isEmpty())) {\n mensaje_tamaño();\n progressBar.setVisibility(View.GONE);\n } else {\n firebase_inicio();\n }\n }",
"@Test\n public void testFactorialInvalidInteger()\n {\n driver.findElement(By.linkText(\"Factorial\")).click();\n driver.findElement(By.name(\"value\")).sendKeys(\"0\");\n WebElement submit = driver.findElement(By.cssSelector(\"input\"));\n submit.sendKeys(Keys.RETURN);\n WebElement e = driver.findElement(By.className(\"jumbotron\"));\n String s1 = e.getText();\n assertTrue(s1.contains(\"1\"));\n }",
"private boolean validarNombreImagen(String nombreImagen) {\n\n String msjeError;\n if (nombreImagen.equals(\"\") || flagCheck_1 == false) {\n\n msjeError = \"Debe ingresar imagen válida para continuar.\";\n this.jLabelError.setText(msjeError);\n this.jLabelError.setForeground(Color.RED);\n this.jLabelError.setVisible(true);\n\n this.jLabel2.setForeground(Color.red);\n return false;\n } else {\n\n this.jLabel2.setForeground(jlabelColor);\n this.jLabelError.setVisible(false);\n return true;\n }\n }",
"@Override\r\n\t\t\tpublic void done(Integer arg0, BmobException arg1) {\n\t\t\t\tif(arg1==null){//验证码发送成功\r\n\t\t \tmyHandler.sendEmptyMessageDelayed(30000, 0);\r\n\t\t }\r\n\t\t\t}",
"public static void Android_Invalid_otp() {\n try {\n\n AppiumDriver<MobileElement> driver = getAppiumDriver();\n Thread.sleep(2000);\n MobileElement el1 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[1]/android.widget.EditText\");\n el1.click();\n\n String userName = getData(\"UserName\");\n el1.sendKeys(userName);\n driver.hideKeyboard();\n MobileElement el2 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[3]/android.widget.EditText\");\n String password = getData(\"Password\");\n\n el2.sendKeys(password);\n driver.hideKeyboard();\n ReportHelper.logReportStatus(LogStatus.PASS, \"UserName and Password Given Successfully\");\n\n MobileElement loginBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Login']\");\n loginBtn.click();\n\n Thread.sleep(12000);\n\n driver.findElementByXPath(\"//android.widget.EditText[@text='Confirmation Code']\").sendKeys(\"5252\");\n Thread.sleep(2000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Invalid OTP Given Successfully\");\n driver.hideKeyboard();\n MobileElement continueBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Continue']\");\n continueBtn.click();\n Thread.sleep(15000);\n MobileElement Errormsg = driver.findElementByXPath(\"//android.widget.TextView[@text='Sorry the authentication code you entered is incorrect. Please try again.']\");\n\n if (Errormsg.isDisplayed()) {\n Thread.sleep(3000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Sorry the authentication code you entered is incorrect. Please try again.\");\n MobileElement e2 = driver.findElementByXPath(\"//android.widget.Button[@text='Go To Home']\");\n e2.click();\n Thread.sleep(2000);\n }\n\n\n } catch (Exception e) {\n ReportHelper.logReportStatus(LogStatus.FAIL, \"login into the application\");\n\n }\n }",
"public String termsValidation() {\n name.sendKeys(\"Karan Prinja\");\n email.sendKeys(\"[email protected]\");\n password.sendKeys(\"termsnotmet\");\n this.scrollBy(submit);\n submit.click();\n helperMethods.waitForWebElement(termsError, 30);\n this.scrollBy(termsError);\n return termsError.getText();\n }",
"private void verifyQuestion(Answer answer) {\n // If is running, stop the question timer\n //(Hard mode)\n timerQuestion.stop();\n \n //if (challengeModel.getChallenge().getCurrentCorrectAnswer()) {\n if (challengeModel.getChallenge().getQuestionsList().get(challengeModel.getChallenge().getCurrentQuestionNumber()-1).getAnswer() == answer) {\n imgCenter.setIcon(Resources.getImageCorrect());\n labelAnswerResult.setText(\"Correto \");\n labelClarification.setText(\"\");\n }\n else {\n imgCenter.setIcon(Resources.getImageIncorrect());\n // Show clarification\n labelAnswerResult.setText(\"\");\n labelClarification.setText(\"<HTML><B>Esclarecimento: </B>\"+challengeModel.getChallenge().getCurrentRuleClarification()+\"</HTML>\");\n }\n \n showAnswerResult(answer);\n }",
"@Test(suiteName = \"NowPlaying\", testName = \"DMCA Restricted\", description = \"Validating DMCA restricted\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-219\" })\n\tpublic void dmcaRestrictedChannelLogo() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"verifying DMCA restricted Channel Logo MOBANDEVER-219\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickonMusic();\n\t\t\tcommon.scrollUntilTextExists(\"Dance/Electronic\");\n\t\t\tgetPageFactory().getEvehome().clickMucisSubRock();\n\t\t\tgetPageFactory().getEvehome().popChannel1();\n\t\t\tgetPageFactory().getCategory().nplLogo();\n\t\t\tgetPageFactory().getEvehome().clickminimize();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"private void tryLogin() {\n AsyncTask<String, Void, Boolean> task = new AsyncTask<String, Void, Boolean>(){\n @Override\n protected Boolean doInBackground(String... ci_session) {\n boolean isValid = PwcatsRequester.isValidCiSession(ci_session[0]);\n return isValid;\n }\n @Override\n protected void onPostExecute(Boolean isValid) {\n isLogined = isValid;\n showOrHideLogInOut(isLogined);\n if (!isValid)\n authLogout();\n TextView mNavAuthLogin = (TextView) findViewById(R.id.nav_auth_login);\n TextView mNavAuthLogout = (TextView) findViewById(R.id.nav_auth_logout);\n }\n };\n String ci_session = prefs.getString(getString(R.string.ci_session), null);\n task.execute(ci_session);\n }",
"public static void enterCaptcha(WebElement captchaField) {\n\t\tString captchaVal = JOptionPane.showInputDialog(\"Please enter the captcha value:\");\n\t\tSystem.out.println(captchaVal);\n\t\t// Type the entered captcha to the text box\n\t\tcaptchaField.sendKeys(captchaVal);\n\t}",
"private boolean validateForm() {\n Boolean validFlag = true;\n String email = emailTxt.getText().toString().trim();\n String name = nameTxt.getText().toString().trim();\n String phone = phoneTxt.getText().toString().trim();\n String password = passwordTxt.getText().toString();\n String confirPassWord = confirmPasswordTxt.getText().toString();\n\n Pattern emailP = Pattern.compile(\"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\\\.[A-Z]{2,6}$\", Pattern.CASE_INSENSITIVE);\n Matcher emailM = emailP.matcher(email);\n boolean emailB = emailM.find();\n\n if (TextUtils.isEmpty(email) || email.equals(\"\") || !emailB) {\n emailTxt.setError(\"Email bị để trống hoặc không dúng định dạng.\");\n validFlag = false;\n } else {\n emailTxt.setError(null);\n }\n\n if (TextUtils.isEmpty(password) || password.length() < 6) {\n passwordTxt.setError(\"Mật khẩu phải 6 ký tự trở lên\");\n validFlag = false;\n } else {\n passwordTxt.setError(null);\n }\n\n Pattern phoneP = Pattern.compile(\"[0-9]{8,15}$\");\n Matcher phoneM = phoneP.matcher(phone);\n boolean phoneB = phoneM.find();\n\n if (TextUtils.isEmpty(phone) || phone.length() < 8 || phone.length() > 15 || !phoneB) {\n phoneTxt.setError(\"Số điện thoại bị để trống hoặc không đúng định dạng\");\n validFlag = false;\n } else {\n phoneTxt.setError(null);\n }\n if (confirPassWord.length() < 6 || !confirPassWord.equals(password)) {\n confirmPasswordTxt.setError(\"Xác nhận mật khẩu không đúng\");\n validFlag = false;\n } else {\n confirmPasswordTxt.setError(null);\n }\n\n Pattern p = Pattern.compile(\"[0-9]\", Pattern.CASE_INSENSITIVE);\n Matcher m = p.matcher(name);\n boolean b = m.find();\n if (b) {\n nameTxt.setError(\"Tên tồn tại ký tự đặc biệt\");\n validFlag = false;\n } else {\n nameTxt.setError(null);\n }\n if (TextUtils.isEmpty(name)) {\n nameTxt.setError(\"Không được để trống tên.\");\n validFlag = false;\n } else {\n nameTxt.setError(null);\n }\n\n return validFlag;\n }",
"public static void checkAndClickTryAgainButton() {\r\n\t\tcheckNoSuchElementExceptionByXPath(\"//*[@id=\\\"markpage\\\"]/center/button[1]\", \"\\\"Try again\\\" button\");\r\n\t\tcheckElementNotInteractableExceptionByXPath(\"//*[@id=\\\"markpage\\\"]/center/button[1]\", \"\\\"Try again\\\" button\");\r\n\t}",
"@Test\r\n\tpublic void testIsValidPasswordTooShort()\r\n\t{\r\n\t\ttry{\r\n\t\t\tassertTrue(PasswordCheckerUtility.isValidPassword(\"flgk1\"));\r\n\t\t}\r\n\t\tcatch(LengthException e)\r\n\t\t{\r\n\t\t\tassertTrue(\"Successfully threw a lengthExcepetion\",true);\r\n\t\t}\r\n\t}",
"public static void validation() {\n\t\tif ((!textFieldName.getText().isEmpty()) && (!textField_FirstName.getText().isEmpty())\n\t\t\t\t&& (!textField_Town.getText().isEmpty()) && (!textField_Town.getText().isEmpty())) {\n\n\t\t\tif ((isValidEmailAddress(textField_Email.getText()) == true)) {\n\t\t\t\ttextField_Email.setBackground(Color.white);\n\t\t\t\tif ((force(textField_Mtp.getText()) > 82)) {\n\t\t\t\t\ttextField_Mtp.setBackground(Color.white);\n\t\t\t\t\tactionGiveServeur();\n\n\t\t\t\t} else {\n\t\t\t\t\tshowMessageDialog(null, \"Votre mot de passe est trop faible\");\n\t\t\t\t\ttextField_Mtp.setText(\"Mot de passe trop simple : changer le \");\n\t\t\t\t\ttextField_Mtp.setBackground(Color.RED);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttextField_Email.setText(\"Email invalide\");\n\t\t\t\ttextField_Email.setBackground(Color.RED);\n\t\t\t\tshowMessageDialog(null, \"Email est invalide\");\n\t\t\t}\n\t\t} else {\n\n\t\t\tshowMessageDialog(null, \"Certain champs sont vide !\");\n\t\t}\n\t}",
"@Test\n public void testCantRegisterInvalidEmail() {\n enterValuesAndClick(\"\", \"invalidemail\", \"123456\", \"123456\");\n checkErrors(nameRequiredError, emailInvalidError, pwdNoError, pwdRepeatNoError);\n }",
"boolean hasLoginapisuccessfulhitcount();",
"public abstract boolean verifyInput();",
"@Test\n\tpublic void testUnmatchingPasswordNegative2() {\n\t\tfillSignUpForm(\"marius\",\"voda\",\"[email protected]\",\"Parola123\",\"PaR0la123\",\"socialNetworks\");\n\t\tassertEquals(\"Passwords must match\", driver.findElement(By.cssSelector(\"#sign-up-confirm-password-div > app-form-control-error-message > em > span\")).getText());\n\t}",
"void abortChallenge();",
"void startChallenge();",
"public void verifierSaisie(){\n boolean ok = true;\n\n // On regarde si le client a ecrit quelque chose\n if(saisieMessage.getText().trim().equals(\"\"))\n ok = false;\n\n if(ok)\n btn.setEnabled(true); //activer le bouton\n else\n btn.setEnabled(false); //griser le bouton\n }",
"private boolean validarContrasena (String contrasena){\n Pattern pattern = Pattern.compile(\"^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&+=!.])(?=\\\\S+$).{6,}$\");\n if (!contrasena.matches(String.valueOf(pattern))){\n errorCo.setText(\"La Contraseña debe tener al menos: 6 caracteres, 1 minúscula, 1 mayúscula, 1 número y 1 signo\");\n errorCo.setVisibility(View.VISIBLE);\n\n }\n return contrasena.matches(String.valueOf(pattern));\n }",
"public static Boolean tryAgainBtn() throws Exception {\n\t\tboolean checkPage=false;\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"markpage\\\"]/center/button[1]\")).click();\n\t\tif (driver.getPageSource().contains(QandA.getQuestion(0))||driver.getPageSource().contains(QandA.getQuestion(1))||driver.getPageSource().contains(QandA.getQuestion(2))){\n\t\t\tcheckPage=true;\n\t\t}\n\t\treturn checkPage;\n\t}",
"public CaptchaIncorrectoException() {\n super(ERROR_KEY);\n }",
"@Test(timeout = 4000)\n public void test303() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try { \n errorPage0.passwordInput(\"ay_>w\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n verifyException(\"wheel.components.ComponentCreator\", e);\n }\n }",
"@Test\n public void incorrectUsernameIncorrectPasswordTest(){\n WebElement userField = driver.findElement(By.name(\"user\"));\n WebElement passwordField = driver.findElement(By.name(\"passwd\"));\n WebElement submitbutton = driver.findElement(By.className(\"submit\"));\n\n userField.sendKeys(Constants.REDDIT_INVALID_ACCT);\n passwordField.sendKeys(Constants.REDDIT_INVALID_PASS);\n submitbutton.click();\n\n WebDriverWait w = new WebDriverWait(driver, 10);\n\n assertTrue(submitbutton.isDisplayed());\n }",
"private boolean setIsSuccessful() {\n\t\tisSuccessful = false;\n\t\tRandom rand = new Random();\n\t\tint val = rand.nextInt(50);\n\t\tif (val % 2 == 0) {\n\t\t\tisSuccessful = true;\n\t\t}\n\t\treturn isSuccessful;\n\t}",
"private void check2(){\n \n // All methods past the first rule check to see\n // if errorCode is still 0 or not; if not skips respective method\n if(errorCode == 0){\n \n if (!(fourthDigit == fifthDigit + 1)){\n valid = false;\n errorCode = 2;\n }\n }\n\t}",
"@Test\n public void correctUsernameIncorrectPasswordTest(){\n\n WebElement userField = driver.findElement(By.name(\"user\"));\n WebElement passwordField = driver.findElement(By.name(\"passwd\"));\n WebElement submitbutton = driver.findElement(By.className(\"submit\"));\n\n userField.sendKeys(Constants.REDDIT_VALID_ACCT);\n passwordField.sendKeys(Constants.REDDIT_INVALID_PASS);\n submitbutton.click();\n\n WebDriverWait w = new WebDriverWait(driver, 10);\n\n assertTrue(submitbutton.isDisplayed());\n }",
"boolean checkValidity();",
"@Test\n\tpublic void Authentication_03() throws InterruptedException\n\t{\n\t\tRegisterPage rp = PageFactory.initElements(driver, RegisterPage.class);\n\t\t\n\t\trp.inputField(\"wesley\", \"100\", \"[email protected]\", \"12345\");\n\t\t\n\t\t//verify validation is displayed\n\t\tassertEquals(rp.messageValidationIsExist(\"Password length must be 6 or more\"), true,\"Message validation is not displayed\");\n\t\t\n\t\trp.clickOkMessageValidationButton();\n\t\t//rp.clearField();\n\t\t\n\t}",
"@Test\n public void testCheckForXssAttack2(){\n\n Assert.assertTrue(xssValidator.checkForXssAttack(RIGHT_DATA));\n }",
"@Test\n public void testCheckForXssAttack1(){\n\n Assert.assertFalse(xssValidator.checkForXssAttack(WRONG_DATA));\n }",
"public static int check() {\r\n\t\tint num = 0;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tnum = input.nextInt();\t\t\t// unos \r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\t\t\t\t// hvatanje greske\r\n\t\t\t\tSystem.out.println(\"Pogresan unos, probajte ponovo\");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t\treturn num;\r\n\t}",
"public List<String> passwordMessageValidations() {\n name.sendKeys(\"Karan Prinja\");\n email.sendKeys(\"[email protected]\");\n password.sendKeys(\"12345678\");\n helperMethods.waitForWebElement(smallPassword, 30);\n String sosoPassword = smallPassword.getText();\n password.clear();\n password.sendKeys(\"Randomer12345678\");\n helperMethods.waitForWebElement(smallPassword, 30);\n String goodPassword = smallPassword.getText();\n List<String> passwordValidationText = new ArrayList<>();\n passwordValidationText.add(sosoPassword);\n passwordValidationText.add(goodPassword);\n return passwordValidationText;\n }",
"public void validateSMTP() {\n System.out.println(\"Validating SMTP\");\n boolean hostSmtpCheck = false, portCheck = false, fromMailCheck = false, smtpMailpwdCheck = false, socketPortCheck = false;\n\n// smtpConfCheck = new Button(\"Test Mail\");\n if (!hostSmtp.getText().isEmpty()) {\n hostSmtpCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Host SMTP address should not be empty.\\n\");\n }\n\n if (!port.getText().isEmpty()) {\n portCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Port should not be empty.\\n\");\n }\n\n if (!fromMail.getText().isEmpty()) {\n fromMailCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". From Mail should not be empty.\\n\");\n }\n\n if (!smtpMailPwd.getText().isEmpty()) {\n smtpMailpwdCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Mail Password should not be empty.\\n\");\n }\n if (!socketProperty.getText().isEmpty()) {\n socketPortCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Socket port should not be empty.\\n\");\n }\n\n if (smtpMailpwdCheck == true && fromMailCheck == true && portCheck == true && hostSmtpCheck == true && socketPortCheck == true) {\n smtpConfCheck = true;\n } else {\n smtpConfCheck = false;\n hostSmtpCheck = false;\n portCheck = false;\n fromMailCheck = false;\n smtpMailpwdCheck = false;\n socketPortCheck = false;\n }\n }",
"protected void validatePassword(){\n //Only Checking For Word Type Password With Minimum Of 8 Digits, At Least One Capital Letter,At Least One Number,At Least One Special Character\n Boolean password = Pattern.matches(\"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9](?=.*[!@#$%^&*()])).{8,}$\",getPassword());\n System.out.println(passwordResult(password));\n }",
"public void checkAnswer() {\n }",
"@Override\r\n\tpublic void checkAnswer() {\n\t\t\r\n\t}",
"private boolean attemptRegistration() {\n\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String name = mFullName.getText().toString();\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n String confPassword = mPasswordConf.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n if(!TextUtils.isEmpty(confPassword) && !password.equals(confPassword)){\n mPasswordConf.setError(\"The passwords do not match\");\n focusView = mPasswordConf;\n cancel = true;\n }\n\n if(TextUtils.isEmpty(name)){\n mFullName.setError(getString(R.string.error_field_required));\n focusView = mFullName;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n return !cancel;\n }",
"public void verifyAnswer() {\n\t\tint i=0;\n\t\tSystem.out.println(\"in verify answer function\");\n\t\tSystem.out.println(\"Number of Answers: \"+ansCount);\n\t\tSystem.out.println(\"User ans: \"+userEquation);\n\t\tif (ansCount==0)\n\t\t\tlb2.setText(\"There is no solution for this set\");\n\t\telse{\n\t\t\tint c=0;\n\t\t\t\n\t\t\twhile(c<ansCount) {\n\t\t\t\tif (solutions[i].equals(userEquation)) {\n\t\t\t\t\tSystem.out.println(\"Ans was Correct\");\n\t\t\t\t\tfinal long duration = System.nanoTime() - startTime;\n\t\t\t\t\tseconds = TimeUnit.NANOSECONDS.toSeconds(duration);\n\t\t\t\t\tlb2.setText(\"Congradulations! You took \"+seconds+\" seconds to find an answer.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t\tc++;\n\t\t\t\tSystem.out.println(\"C: \"+c);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Ans was not Correct\");\n\t}\n\t}",
"private void validaciónDeRespuesta()\n\t{\n\t\ttry {\n\n\t\t\tString valorCifrado = in.readLine();\n\t\t\tString hmacCifrado = in.readLine();\n\t\t\tbyte[] valorDecifrado = decriptadoSimetrico(parseBase64Binary(valorCifrado), llaveSecreta, algSimetrica);\n\t\t\tString elString = printBase64Binary(valorDecifrado);\n\t\t\tbyte[] elByte = parseBase64Binary(elString);\n\n\t\t\tSystem.out.println( \"Valor decifrado: \"+elString + \"$\");\n\n\t\t\tbyte[] hmacDescifrado = decriptarAsimetrico(parseBase64Binary(hmacCifrado), llavePublica, algAsimetrica);\n\n\t\t\tString hmacRecibido =printBase64Binary(hmacDescifrado);\n\t\t\tbyte[] hmac = hash(elByte, llaveSecreta, HMACSHA512);\n\t\t\tString hmacGenerado = printBase64Binary(hmac);\n\n\n\n\n\t\t\tboolean x= hmacRecibido.equals(hmacGenerado);\n\t\t\tif(x!=true)\n\t\t\t{\n\t\t\t\tout.println(ERROR);\n\t\t\t\tSystem.out.println(\"Error, no es el mismo HMAC\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Se confirmo que el mensaje recibido proviene del servidor mediante el HMAC\");\n\t\t\t\tout.println(OK);\n\t\t\t}\n\n\n\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error con el hash\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void correctErrors();",
"public boolean verify();",
"private void onClickSignIn(){\n if(checkValidation()){\n //if Validation is ok\n submitForm();\n }\n else{\n //Something went wrong...\n Toast.makeText(LauncherActivity.this, \"Form contains error!\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void onFailure(Call<ChallengeResponse> call, Throwable t) {\n Toast.makeText(getBaseContext(), \"Please check your connection!\", Toast.LENGTH_LONG).show();\n finish();\n\n }",
"@Test\n\tpublic void checkconfirmpasswordfieldpresent()\n\t{\n\t\t\n\t\tPageFactory.initElements(driver, Resetpassword.class);\n\t\tResetpassword.password.sendKeys(\"password\");\n\t\tResetpassword.confirm_password.sendKeys(\"confirm password\");\n\t\tString user_text=Resetpassword.error_message.getText();\n\t\tAssert.assertEquals(user_text,\"Password should match with confirm password.\");\n\t\t\n\t}",
"@Test(timeout = 4000)\n public void test265() throws Throwable {\n Form form0 = new Form(\"Lc7/B.MJD\");\n // Undeclared exception!\n try { \n form0.textInput(\")j6;z$@\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"private boolean validateInput() {\n String username = editUsername.getText().toString().trim();\n String email = editEmail.getText().toString().trim();\n String password = editPassword.getText().toString().trim();\n String repeatPassword = editRepeatPassword.getText().toString().trim();\n if (!password.equals(repeatPassword)) {\n ShowMessageUtil.tosatSlow(\"Enter passwords differ\", EmailRegisterActivity.this);\n return false;\n } else if (username.equals(\"\") || email.equals(\"\") || password.equals(\"\")) {\n ShowMessageUtil.tosatSlow(\"every item can not be empty!\", EmailRegisterActivity.this);\n return false;\n }\n if (username.length()>10){\n ShowMessageUtil.tosatSlow(\"the character length of the username can't be over than 10\", EmailRegisterActivity.this);\n return false;\n }\n return true;\n }",
"public static boolean isCaptchaValid(String secretKey, String response) {\n\t\ttry {\n\t\t\tString url = \"https://www.google.com/recaptcha/api/siteverify?\" + \"secret=\" + secretKey + \"&response=\" + response;\n\t\t\tInputStream res = new URL(url).openStream();\n\t\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(res, Charset.forName(\"UTF-8\")));\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint cp;\n\t\t\twhile ((cp = rd.read()) != -1) {\n\t\t\t\tsb.append((char) cp);\n\t\t\t}\n\t\t\tString jsonText = sb.toString();\n\t\t\tres.close();\n\t\t\t\n\t\t\tJSONObject json = new JSONObject(jsonText);\n\t\t\t\n\t\t\tlogger.info(\"Recaptcha verify response: {}\", json);\n\t\t\t\n\t\t\treturn json.getBoolean(\"success\");\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Unexpected exception caught during captcha validation.\", e);\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test(priority = 3)\n public void emptyPasswordLogin() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, correctMail);\n login.typeCredentials(login.passwordLabel, \"\");\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.errorBox);\n login.checkErrorMessageMatching(login.errorBox,emptyPasswordError);\n\n }",
"public boolean getIsValidInquiryAttempt() {\r\n if (getInvalidCardErrorCount() >= getMaxNumErrorsPerSession()) {\r\n if (getInvalidCardErrorCount() == getMaxNumErrorsPerSession()) {\r\n getGiftCardLogger().logActivity(getCurrentUserIP(), \"GIFT CARD INQUIRY\");\r\n setInvalidCardErrorCount(getInvalidCardErrorCount() + 1);\r\n }\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }"
]
| [
"0.65944606",
"0.64795893",
"0.6406215",
"0.63535494",
"0.62072873",
"0.59181565",
"0.5879515",
"0.5810567",
"0.5707104",
"0.56599885",
"0.55341816",
"0.5531202",
"0.5530989",
"0.5520068",
"0.54746115",
"0.5443375",
"0.5427412",
"0.54267085",
"0.5389053",
"0.53804165",
"0.5349549",
"0.5348814",
"0.5337146",
"0.53340745",
"0.53258157",
"0.53020597",
"0.53003144",
"0.5299255",
"0.5294863",
"0.5294513",
"0.52871084",
"0.52836",
"0.52773345",
"0.5267463",
"0.5257589",
"0.52508473",
"0.5216987",
"0.5211085",
"0.5157983",
"0.5139835",
"0.51388264",
"0.5132024",
"0.51302",
"0.5124648",
"0.51164806",
"0.51120245",
"0.5103531",
"0.50923574",
"0.50743645",
"0.506715",
"0.50659394",
"0.5060601",
"0.5039514",
"0.50350463",
"0.5030625",
"0.5028786",
"0.5027655",
"0.50272787",
"0.5020737",
"0.5008985",
"0.50059414",
"0.50050545",
"0.500195",
"0.4994158",
"0.49818283",
"0.49810496",
"0.4980746",
"0.49777797",
"0.49754372",
"0.49482363",
"0.49478656",
"0.4943602",
"0.49433503",
"0.49412158",
"0.49404895",
"0.49353164",
"0.49300957",
"0.49296835",
"0.49240682",
"0.4923264",
"0.4916816",
"0.491461",
"0.49010837",
"0.48989367",
"0.48896056",
"0.48848352",
"0.48635542",
"0.4856043",
"0.4852248",
"0.4848674",
"0.4845268",
"0.4839483",
"0.48329335",
"0.48298383",
"0.48289314",
"0.48229226",
"0.48210207",
"0.48206994",
"0.48180148",
"0.48171383",
"0.48146167"
]
| 0.0 | -1 |
captcha expired, wrong name, wrong secondname | @Override
public boolean matches(Object list) {
return ((List<String>) list).size() == 3;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String captcha(){\n\t\tString captcha=\"\";\n\t\tfor(int i=0; i<8; i+=2){\n\t\t\tcaptcha+=(char)(65+Math.random()*26)+\" \";\n\t\t\tcaptcha+=(char)(97+Math.random()*26);\n\t\t}\n\t\treturn captcha;\n\n\t}",
"public Captcha() {\n value = generateCaptchaCode();\n id = generateCaptchaID();\n date = System.currentTimeMillis();\n }",
"public void msjereCaptcha(){\r\n click(esperarElementoPresenteEnPagina(locatorMsjeCaptcha));\r\n }",
"void setCaptcha(ICaptcha captcha);",
"@Override\n public boolean validDefaultTime(String code) {\n return kaptcha.validate(code);\n }",
"@Test(dependsOnMethods = {\"register\"})\n void confirmEmailAddressByCaptcha() {\n common.findWebElementByXpath(\"//*[@id=\\\"content\\\"]/fieldset/label/div\").click();\n\n //Click on Send captcha button\n common.timeoutSeconds(2);\n common.findWebElementById(\"send-captcha-button\").click();\n\n //No magic code is set\n common.verifyStatusMessage(\"Det uppstod ett problem med verifieringen av att du är en människa. \" +\n \"Var god försök igen.\");\n }",
"@Override\r\n public void onClick(View arg0) {\n if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n\r\n //Chaptcha dialog\r\n captchaDialog = new Dialog(CreateAccount.this);\r\n captchaDialog.setContentView(R.layout.captcha_dialog);\r\n captchaDialog.setTitle(\"Please enter captcha\");\r\n\r\n reCaptcha = (ReCaptcha) captchaDialog.findViewById(R.id.recaptcha);\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n\r\n chaptchaAnswer = (EditText) captchaDialog.findViewById(R.id.answer);\r\n\r\n Button captchaVerify = (Button) captchaDialog.findViewById(R.id.verify);\r\n captchaVerify.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n //dialog.dismiss();\r\n reCaptcha.verifyAnswerAsync(\"6LfhQwsTAAAAALJvjUqiurjAdzi4dztuUIGq-NyZ\", chaptchaAnswer.getText().toString(), CreateAccount.this);\r\n }\r\n });\r\n Button captchaReload = (Button) captchaDialog.findViewById(R.id.reload);\r\n captchaReload.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n }\r\n });\r\n captchaDialog.show();\r\n\r\n } else if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n email.setError(\"Invalid e-mail\");\r\n }\r\n }",
"public String getCaptchaCode() {\n HttpGet httpget = new HttpGet(HttpURL.getCaptchaURL());\n try {\n HttpEntity entity = this.client.execute(httpget).getEntity();\n\n if (entity != null) {\n InputStream is = entity.getContent();\n File captchaImage = new File(CaptchaOCR.CAPTCHA_IMAGE_PATH);\n OutputStream os = new FileOutputStream(captchaImage);\n IOUtils.copy(is, os);\n IOUtils.closeQuietly(is);\n IOUtils.closeQuietly(os);\n }\n EntityUtils.consume(entity);\n return CaptchaOCR.doOcr();\n } catch (ClientProtocolException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return null;\n }",
"@Override\r\n\tpublic void validate(FacesContext fc, UIComponent arg1, Object arg2)\r\n\t\t\tthrows ValidatorException {\n HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\r\n Boolean isResponseCorrect = Boolean.FALSE;\r\n javax.servlet.http.HttpSession session = request.getSession();\r\n String parm = (String)arg2;\r\n String c = (String) session.getAttribute(MyCaptcha.CAPTCHA_KEY);\r\n if (!parm.equals(c)) {\r\n \tFacesMessage message = new FacesMessage();\r\n \tmessage.setSummary(\"You have entered invalid text for image.\");\r\n \tmessage.setSeverity(FacesMessage.SEVERITY_ERROR);\r\n \tthrow new ValidatorException(message);\r\n\r\n }\r\n\t}",
"@Override\n public void timerExpired() {\n //Inform the player they have failed\n if (isEnglish) {\n Toast.makeText(this, LOSS, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, LOSS_CHINESE, Toast.LENGTH_SHORT).show();\n }\n\n //Set visibility for replay button to visible\n replayButton.setVisibility(View.VISIBLE);\n retryButton.setVisibility(View.VISIBLE);\n scoreboardButton.setVisibility(View.VISIBLE);\n }",
"public static void main(String[] args) throws Exception {\r\n\t\tSystem.out.println(\"Does the captcha contain alphabets (yes or no) :\");\r\n\tScanner sc=new Scanner(System.in);\r\n\tString in=sc.nextLine(); // taking imput (yes or no)\r\n\tif(in.toLowerCase().equals(\"yes\") || in.toLowerCase().equals(\"y\")) // checking if the input is yes\r\n\t{\r\n\t\talpha=true; // if input is yes alpha flag is set to true\r\n\t\tfor (int i=0; i<35; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\")); // taking all the templates along with alphabets into consideration\r\n\t\t}\r\n\r\n\t}\r\n\telse\r\n\t{\r\n\t\talpha=false;// if input is not yes alpha flag is set to true\r\n\t\tfor (int i=0; i<10; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\"));// taking all the templates along with out alphabets into consideration\r\n\t\t}\r\n\t}\r\n\t\tint numTests = 100; // total number of trials\r\n\t\t\r\n\t\t// read in the templates for each character\r\n\t\tfor (int i=0; i<35; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\"));\r\n\t\t}\r\n\r\n\t\tint correct = 0;\r\n\t\tfor (int i=0; i<numTests; i++) {\r\n\t\t\t\r\n\t\t\t// generate a random string\r\n\t\t\tString rightAnswer = randomString(6,alpha);\r\n\t\t\t\r\n\t\t\t// make a captcha from it\r\n\t\t\tBufferedImage captchaImage = generateCaptcha(rightAnswer);\r\n\t\t\t\r\n\t\t\tif (show) {\r\n\t\t\t\tImageIO.write(captchaImage, \"jpeg\", new File(\"see.jpg\"));\r\n\t\t\t\tshow = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// guess the captcha\r\n\t\t\t\r\n\t\t\tString guess = guessCaptcha(captchaImage);\r\n\t\t\t// see if we got it right\r\n\t\t\tif (guess.equals(rightAnswer)) correct++;\r\n\t\t}\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"accuracy: \" + (correct / (double) numTests));\r\n\t}",
"@Override\r\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\tpwd1=new String(jf1.getPassword());\r\n\t\t\t\tif(currCard.getPwd().equals(pwd1)){\r\n\t\t\t\t\tjl1.setText(\"\");\r\n\t\t\t\t\tis1=true;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tis1=false;\r\n\r\n\t\t\t\t\tjl1.setText(\"密码错误\");\r\n\t\t\t\t\t//jf1.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\t pwd2=new String(jf2.getPassword());\r\n\t\t\t\t\r\n\r\n\t\t\t\tif(is1==true){\r\n\t\t\t\tif(currCard.getPwd().equals(pwd2)){\r\n\t\t\t\t\tjl2.setText(\"新旧密码不能一致\");\r\n\t\t\t\t\t//jf2.requestFocus();\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tis2=true;\r\n\t\t\t\t\tjl2.setText(\"\");\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}",
"private AuthParams getCaptchaAuthParams(final String captchaResponse) {\n AuthParamsCaptcha authParams = new AuthParamsCaptcha();\n authParams.response = captchaResponse;\n return authParams;\n }",
"public Bitmap getCaptcha(String devKey) throws CaptchaException {\n\t\tBitmap image = null;\n\t\ttry {\n\t\t\tString getTokenURL = CAPTCHA_URL + \"/get?key=\" + devKey;\n\n\t\t\tURL getUrl = new URL(getTokenURL);\n\n\t\t\tHttpURLConnection httpURLConnection = (HttpURLConnection) getUrl.openConnection();\n\n\t\t\thttpURLConnection.connect();\n\n\t\t\tint code = httpURLConnection.getResponseCode();\n\t\t\tSystem.out.println(code);\n\t\t\tif (code == 200) {\n\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));\n\t\t\t\tString jsonString = reader.readLine();\n\n\t\t\t\tJSONObject jsonObject = new JSONObject(jsonString);\n\t\t\t\tString imageURL = jsonObject.getString(\"image\");\n\t\t\t\tthis.token = jsonObject.getString(\"token\");\n\t\t\t\tthis.verifyURL = jsonObject.getString(\"verify\");\n\t\t\t\tthis.adid = jsonObject.getString(\"adid\");\n\t\t\t\tthis.adurl = jsonObject.getString(\"adurl\");\n\t\t\t\tthis.audioURL = jsonObject.getString(\"audio\");\n\n\t\t\t\treader.close();\n\n\n\t\t\t\t//ini cara defaultnya\n\t\t\t\t/*URL getImageURL = new URL(imageURL);\n\t\t\t\thttpURLConnection = (HttpURLConnection) getImageURL.openConnection();\n\t\t\t\tInputStream imageStream = httpURLConnection.getInputStream();\n\t\t\t\tcode = httpURLConnection.getResponseCode();\n\t\t\t\tif(code == 200){\n\t\t\t\t\timage = BitmapFactory.decodeStream(imageStream);\n\t\t\t\t\timageStream.close();\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"img response http status code is:\" + code);\n\t\t\t\t}\n\t\t\t\thttpURLConnection.disconnect(); */\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//ini pake method bantu\n\t\t\t\timage = loadImageFromUrl(imageURL);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"get response http status code is:\" + code);\n\t\t\t}\t\t\t\n\n\t\t\thttpURLConnection.disconnect();\n\n\t\t} catch(MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch(JSONException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t}\n\n\t\treturn image;\n\t}",
"public static void signUp(String username, String password, String alternativeEmail, String firstName, String lastName) {\n click(REGISTRATION_LINK);\n type(REG_FLOW_USERNAME_FIELD, username);\n click(REG_FLOW_CHECK_BUTTON);\n// if (!REG_FLOW_USERNAME_FREE_MESSAGE.toString().contains(\"Потребителското име е свободно\")) {\n// System.out.println(\"Try another username - the entered one is already in use\");\n// }\n type(REG_FLOW_PASSWORD_FIELD, password);\n type(REG_FLOW_PASSWORD_REENTER_FIELD, password);\n WebElement phoneCheckbox = Browser.driver.findElement(REG_FLOW_PHONE_CHECKBOX);\n if (phoneCheckbox.isEnabled()) {\n phoneCheckbox.click(); //that's how we disable it\n }\n type(REG_FLOW_ALTERNATIVE_EMAIL_FIELD, alternativeEmail);\n type(REG_FLOW_QUESTION_FIELD, \"To be or not to be?\");\n type(REG_FLOW_ANSWER_FIELD, \"To beeee.\");\n type(REG_FLOW_FNAME_FIELD, firstName);\n type(REG_FLOW_LNAME_FIELD, lastName);\n Browser.driver.switchTo().frame(\"abv-GDPR-frame\").manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n // Manually to tap ACCEPT on the GDPR window\n Browser.driver.switchTo().defaultContent();\n click(REG_FLOW_GENDER_RADIOBUTTON); //to choose male\n click(REG_FLOW_DAY_DROPDOWN);\n click(REG_FLOW_DAY_3); // to choose 3th\n click(REG_FLOW_MONTH_DROPDOWN);\n click(REG_FLOW_MONTH_5); // to choose May\n click(REG_FLOW_YEAR_DROPDOWN);\n click(REG_FLOW_YEAR_1998); // to choose 1998\n\n findElement(REG_FLOW_CAPTCHA_FIELD);\n click(REG_FLOW_CAPTCHA_FIELD);\n // Timeout to enter the CAPTCHA manually\n // EXPLICIT WAIT DA MU TURYA\n click(REG_FLOW_CREATE_BUTTON);\n String successfulRegMessage = Browser.driver.findElement(REG_SUCCESS_MESSAGE).getText().trim();\n assertTrue(successfulRegMessage.contains(\"Успешна регистрация.\"), \"No SUCCESS message\");\n click(LOGIN_TO_YOUR_EMAIL_BUTTON);\n }",
"public void creditcard() {\n\t\tBy cd=By.xpath(\"//input[@name='creditCard']\");\r\n\t\tWebElement W_cd=wt.WaitForElement(cd, 10);\r\n\t\tW_cd.sendKeys(\"5462897859858\");\r\n\t\t\r\n\t\t}",
"public void setCaptchaResponse(final String captchaResponse) {\n mCaptchaResponse = captchaResponse;\n }",
"public static\n void checkExpiringPassword()\n {\n User user = ResourcesMgr.getSessionManager().getUser();\n \n String sPassword = user.getPassword();\n \n // Controllo della scadenza della password al primo accesso\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n // Primo accesso\n boolean boExpiredFA = ResourcesMgr.getBooleanProperty(ResourcesMgr.sGUILOGIN_EXP_FIRSTA, false);\n if(boExpiredFA) {\n GUIMessage.showWarning(\"Questo \\350 il Suo primo accesso. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n \n // Controllo della scadenza della password rispetto a quando e' stata aggiornata l'ultima volta.\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n int iExpirationDays = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_DAYS, 0);\n if(iExpirationDays > 0) {\n int iDays = getDaysFrom(user.getDatePassword());\n if(iExpirationDays <= iDays) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n else {\n int iMonths = getMonthsFrom(user.getDatePassword());\n int iExpirationMonths = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_MONTHS, 0);\n if(iExpirationMonths > 0 && iExpirationMonths <= iMonths) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n }\n }",
"@Test\n\tpublic void checkconfirmpassword_characters()\n\t{\n\t\t\n\t\tPageFactory.initElements(driver, Resetpassword.class);\n\t\tResetpassword.confirm_password.sendKeys(\"co12!@\");\n\t\tString user_text=Resetpassword.error_message.getText();\n\t\tAssert.assertEquals(user_text,\"co12!@\");\n\t\t\n\t}",
"private void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int width = 250;\n int height = 100;\n //vectorul de captcha-uri\n// char data[][] = {\n// { 'm', 'a', 'n', 'c', 'a', 'r', 'e' },\n// { 'b', 'e', 't', 'o', 'n' },\n// { 'f', 'r', 'i', 'g', 'i', 'd', 'e', 'r' },\n// { 's', 'u', 'p', 'e', 'r', 'm', 'a', 'n' },\n// { 'j', 'e', 't' }\n// };\n\n //folosim o imagine buffer pentru a desena captcha-ul\n BufferedImage bufImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n Graphics2D g2d = bufImg.createGraphics();\n Font font = new Font(\"Georgia\", Font.BOLD, 18);\n g2d.setFont(font);\n g2d.setColor(Color.WHITE);\n\n //folosim hint-uri ca sa crestam calitatea textului din poza\n RenderingHints rHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n rHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n g2d.setRenderingHints(rHints);\n\n //desenam gradientul, pentru fundalul imaginii\n GradientPaint gPaint = new GradientPaint(0, 0, Color.BLUE, 0, height/2, Color.black, true);\n g2d.setPaint(gPaint);\n g2d.fillRect(0, 0, width, height);\n g2d.setColor(new Color(255, 153, 0));\n\n //numar random pt vectorul de captcha-uri\n Random rand = new Random();\n char data[][] = {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}};\n for (int i = 0; i < 8; i++) {\n char r = rndChar();\n data[0][i] = r;\n }\n //int index = Math.abs(rand.nextInt()) % 5;\n int index = 0;\n //trimitem stringul la user sa stie sa compare input-ul de la user\n String captcha = String.copyValueOf(data[index]);\n request.getSession().setAttribute(\"captcha\", captcha);\n\n //desenam captcha-ul ales in imagine\n int x = 0, y = 0;\n for (int i = 0; i < data[index].length; i++) {\n x += 15 + Math.abs(rand.nextInt()) % 15;\n y = 45 + Math.abs(rand.nextInt()) % 20;\n g2d.drawChars(data[index], i, 1, x, y);\n }\n g2d.dispose();\n\n response.setContentType(\"image/png\");\n OutputStream os = response.getOutputStream();\n ImageIO.write(bufImg, \"png\", os);\n os.close();\n }",
"@Override\r\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\t pwd3=new String(jf3.getPassword());\r\n\t\t\t\tif(is2==true){\r\n\t\t\t\tif(pwd3.equals(pwd2)){\r\n\t\t\t\t\tjl3.setText(\"\");\r\n\t\t\t\t\tis3=true;\r\n\t\t\t\t}else\r\n\t\t\t\t\tjl3.setText(\"两次密码不相符\");\r\n\t\t\t\t\tjf3.requestFocus();\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"public interface CaptchaAlgorithm {\n\n Captcha generate();\n\n}",
"public void tryLoginAgain(){\n\t\tnameField.setText(\"\");\n\t\trollField.setText(\"\");\n\t\tseatField.setText(\"\");\n\t\tnameField.repaint();\n\t\tseatField.repaint();\n\t\trollField.repaint();\n\t\tclearErrors();\n\t\tmainDialog.dispose();\t\t\n\t}",
"private URL resolveRecaptcha(CharSequence content) {\n\t\treturn null;\n\t}",
"public void inputRandomEmailToTextbox() {\r\n\t\twaitElementVisible(driver, RegisterForm.EMAIL_TEXTBOX);\r\n\t\tString emailAddress = \"auto06\" + getTodayString(\"ddMMyyHHmmss\")+\"@lv.com\";\r\n\t\tsendKeyElement(driver,RegisterForm.EMAIL_TEXTBOX, emailAddress);\r\n\t}",
"@Test(priority = 2)\n public void incorrectLoginWithUsername() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, incorrectMail);\n login.typeCredentials(login.passwordLabel, correctPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.errorBox);\n login.checkErrorMessageMatching(login.errorBox,wrongUsernameAndPasswordError);\n }",
"@Test\n\tpublic void testUnmatchingPasswordNegative2() {\n\t\tfillSignUpForm(\"marius\",\"voda\",\"[email protected]\",\"Parola123\",\"PaR0la123\",\"socialNetworks\");\n\t\tassertEquals(\"Passwords must match\", driver.findElement(By.cssSelector(\"#sign-up-confirm-password-div > app-form-control-error-message > em > span\")).getText());\n\t}",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (Boolean.TRUE.equals(acc.getBooleanProperty(\"free\"))) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"@Test\n\tpublic void testUnmatchingPasswordNegative1() {\n\t\tfillSignUpForm(\"marius\",\"voda\",\"[email protected]\",\"Parola123\",\"parola123\",\"socialNetworks\");\n\t\tassertEquals(\"Passwords must match\", driver.findElement(By.cssSelector(\"#sign-up-confirm-password-div > app-form-control-error-message > em > span\")).getText());\n\t}",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (acc.getType() == AccountType.FREE) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"public CaptchaIncorrectoException() {\n super(ERROR_KEY);\n }",
"@Test\n public void incorrectUsernameIncorrectPasswordTest(){\n WebElement userField = driver.findElement(By.name(\"user\"));\n WebElement passwordField = driver.findElement(By.name(\"passwd\"));\n WebElement submitbutton = driver.findElement(By.className(\"submit\"));\n\n userField.sendKeys(Constants.REDDIT_INVALID_ACCT);\n passwordField.sendKeys(Constants.REDDIT_INVALID_PASS);\n submitbutton.click();\n\n WebDriverWait w = new WebDriverWait(driver, 10);\n\n assertTrue(submitbutton.isDisplayed());\n }",
"@Test\r\n public void positiveRegistration() {\r\n driver.get(\"http://127.0.0.1:8888/wp-login.php?action=register\");\r\n StringBuilder sb = new StringBuilder(len);\r\n for (int i = 0; i < len; i++) {\r\n sb.append(AB.charAt(rnd.nextInt(AB.length())));\r\n }\r\n String charSequence = \"\";\r\n charSequence = sb.toString();\r\n WebElement loginField = driver.findElement(By.xpath(\"//input[@id='user_login']\"));\r\n loginField.sendKeys(charSequence);\r\n WebElement passwdField = driver.findElement(By.xpath(\"//input[@id='user_email']\"));\r\n passwdField.sendKeys(charSequence+\"@gmail.com\");\r\n\r\n WebElement registerButton = driver.findElement(By.xpath(\"//input[@name='wp-submit']\"));\r\n registerButton.click();\r\n\r\n WebElement registrationMessage = driver.findElement(By.xpath(\"//p[@class='message']\"));\r\n Assert.assertEquals(registrationMessage.getText(),\"Регистрация завершена. Проверьте вашу почту.\");\r\n }",
"public static String expiredCredentials(String username) {\n return holder.format(\"expiredCredentials\", username);\n }",
"boolean validate(String name, String email, String password)\n {\n //Check if the name is empty and password field is 8 characters long, also including email check\n if(name.isEmpty() || !rfc2822.matcher(email).matches() || (password.length() < 8))\n {\n Toast.makeText(this, \"Please enter your name and email. Ensure password is more than 8 characters long!\", Toast.LENGTH_SHORT).show();\n\n //reset TextEdits\n eRegName.setText(null);\n eRegEmail.setText(null);\n eRegPassword.setText(null);\n\n return false;\n }\n return true;\n }",
"public void validateNameField() {\n\t\tif (nameField.getText().length() > 0) {\n\t\t\ttimeToPick.setEnabled(true);\n\t\t\tif (nameField.getText().length() > 24) {\n\t\t\t\tnameField.setText(nameField.getText().substring(0, 24));\n\t\t\t}\n\t\t\ttimeToPick.putClientProperty(\"playerName\", nameField.getText());\n\t\t} else {\n\t\t\ttimeToPick.setEnabled(false);\n\t\t}\n\t}",
"public void pass1()throws Exception\r\n { \r\n guiframe g=new guiframe();\r\n g.setSize(400,400);\r\n g.setTitle(\"Authentication A\");\r\n g.setVisible(true);\r\n \r\n \r\n \r\n \r\n \r\n /*Scanner s =new Scanner(System.in);\r\n System.out.println(\"Enter the Password:\");\r\n String str=s.nextLine();\r\n DateFormat df=new SimpleDateFormat(\"HH:mm\");\r\n Date d=new Date();\r\n String time=df.format(d);\r\n StringBuffer t1=new StringBuffer(time);\r\n t1=t1.deleteCharAt(2);\r\n time=t1.toString();\r\n System.out.println(t1);\r\n \r\n if(str.equals(time))\r\n System.out.println(\"Access Granted\");\r\n else\r\n System.out.println(\"Access Denied\");*/\r\n }",
"String validateCampo (String name, String email, String password){\n String campos;\n campos = name !=null && name.trim().length()>0? \"\" : \"\\n\" + campoName.getHint() + \"\\n\";\n campos += email !=null && email.trim().length()>0? \"\" :campoEmail.getHint() + \"\\n\";\n campos += password !=null && password.trim().length()>0?\"\" : campoPassword.getHint() + \"\\n\";\n campos += bitmaphoto !=null?\"\":\"Imagen\";\n return campos;\n }",
"@Test\n public void testInvalidUserName() {\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"username_edit_text\"))\n .setText(INVALID_USERNAME_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"password_edit_text\"))\n .setText(PASSWORD_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"login_button\"))\n .click();\n\n }",
"@Test\n public void testCantRegisterInvalidEmailShortPassword() {\n enterValuesAndClick(\"name\", \"invalidemail\", \"124\", \"\");\n checkErrors(nameNoError, emailInvalidError, pwdTooShortError, pwdRepeatRequiredError);\n }",
"private static String getRegattaName() {\n\t\tString name = \"\";\n\n\t\tSystem.out.println(\"\\nPlease enter a name for the regatta...\");\n\t\tdo {\n\t\t\tSystem.out.print(\">>\\t\");\n\t\t\tname = keyboard.nextLine().trim();\n\t\t\tif(\"exit\".equals(name)) goodbye();\n\t\t} while(!isValidRegattaName(name) || name.length() == 0);\n\n\t\treturn name;\n\t}",
"@When(\"^user enters valid username,valid password$\")\r\n\tpublic void user_enters_valid_username_valid_password() throws Exception {\n\t\thlpf.setPfname(\"capgemini\");\r\n\t\thlpf.setPfpwd(\"capg1234\");\r\n\t\tThread.sleep(2000);\r\n\t\thlpf.setPflogin();\r\n\t\t//driver.close();\r\n\t \r\n\t}",
"void clear()\n {\n captcha.reset();\n requestToken.setEnabled(false);\n username.setValue(\"\");\n greeting.setValue(\"\");\n token.setValue(\"\");\n newPassword.setValue(\"\");\n newPasswordRepeat.setValue(\"\");\n show(REQUEST_TOKEN);\n }",
"@Override\r\n public boolean isCredentialsNonExpired() {\r\n return true;\r\n }",
"public void resetForm() {\r\n\t\tfinal CTracked ctracked = UserSettings.ctracked == null ? new CTracked()\r\n\t\t\t\t: UserSettings.ctracked;\r\n\r\n\t\ttxtPassword.setValue(\"\");\r\n\t\ttxtPassword.clearInvalid();\r\n\r\n\t\ttxtPasswordConfirm.setValue(\"\");\r\n\t\ttxtPasswordConfirm.clearInvalid();\r\n\r\n\t\ttxtName.setValue(ctracked.getName() == null ? \"\" : ctracked.getName());\r\n\t\ttxtName.clearInvalid();\r\n\r\n\t\tif (ctracked.getBirthday() != null) {\r\n\t\t\tUserSettings.timerTask.getTaskList().add(new Task(2) {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void execute() {\r\n\t\t\t\t\tdateBirthday.setValue(ctracked.getBirthday());\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tdateBirthday.setValue(\"\");\r\n\t\t}\r\n\t\tdateBirthday.clearInvalid();\r\n\t\t\r\n\t\ttxtUsername.setValue(String.valueOf(ctracked.getUsername()));\r\n\r\n\r\n\t\ttxtMobilePhone.setValue(ctracked.getTel() == null ? \"\" : ctracked\r\n\t\t\t\t.getTel());\r\n\t\ttxtMobilePhone.clearInvalid();\r\n\r\n\t\ttxtEmail.setValue(ctracked.getEmail() == null ? \"\" : ctracked\r\n\t\t\t\t.getEmail());\r\n\t\ttxtEmail.clearInvalid();\r\n\r\n\t\ttxtEmailConfirm.setValue(ctracked.getEmail() == null ? \"\" : ctracked\r\n\t\t\t\t.getEmail());\r\n\t\ttxtEmailConfirm.clearInvalid();\r\n\r\n\t\tif (ctracked.getIntervalGps() != null) {\r\n\t\t\tUserSettings.timerTask.getTaskList().add(new Task(2) {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void execute() {\r\n\t\t\t\t\tcbIntervalGPS.setValue(ctracked.getIntervalGps()+\"\");\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tcbIntervalGPS.setValue(\"10\");\r\n\t\t}\r\n\t\tcbIntervalGPS.clearInvalid();\r\n\r\n\t\ttxtIconPath\r\n\t\t\t\t.setValue(ctracked.getIconPath() == null ? DEFFAULT_ICON_PATH\r\n\t\t\t\t\t\t: ctracked.getIconPath());\r\n\r\n\t\timgIcon.setUrl(txtIconPath.getText());\r\n\r\n\t\tcheckActive.setValue(ctracked.isActive() == null ? false : true);\r\n\r\n\t\tcheckEmbedded.setValue(ctracked.getEmbedded() == null ? false : true);\r\n\r\n\t\tcheckShowInMap.setValue(ctracked.getShowInMap() == null ? false : true);\r\n\r\n\t\tcbLanguage.setValue(ctracked.getLang() == null ? \"vi\" : ctracked\r\n\t\t\t\t.getLang());\r\n\t\tcbCountry.setValue(ctracked.getCountry() == null ? \"VN\" : ctracked\r\n\t\t\t\t.getCountry());\r\n\t\tcbTimeZone.setValue(ctracked.getGmt() == null ? \"7\" : ctracked.getGmt()\r\n\t\t\t\t+ \"\");\r\n\r\n\t\ttxtApiKey.setValue(ctracked.getApiKey() == null ? \"\" : ctracked\r\n\t\t\t\t.getApiKey());\r\n\r\n\t\tpostResetForm();\r\n\t}",
"private String getTempPassword(int length) {\r\n\t\tRandom rand = new Random(9845936902l);\r\n\t\tchar[] buf = new char[length];\r\n\t\tfor (int idx = 0; idx < buf.length; ++idx)\r\n\t\t\tbuf[idx] = symbols[rand.nextInt(symbols.length)];\r\n\t\treturn new String(buf);\r\n\t}",
"@Test\n public void testIsInvalidChannelName() {\n System.out.println(\"isInvalidChannelName test ---\");\n String validName = \"Valid Name\";\n String invalidName1 = \"Invalid_Name\";\n String invalidName2 = \"\";\n String invalidName3 = \" \";\n String invalidName4 = \"troll<script>document.cookie='lol'</script>\";\n assertFalse(instance.isInvalidChannelName(validName));\n assertTrue(instance.isInvalidChannelName(invalidName1));\n assertTrue(instance.isInvalidChannelName(invalidName2));\n assertTrue(instance.isInvalidChannelName(invalidName3));\n assertTrue(instance.isInvalidChannelName(invalidName4));\n }",
"protected String initCap(final String name) {\n return Srl.initCap(name);\n }",
"private String generateNewPassword() throws Exception\n {\n if(this.weblisketSession != null && \n this.weblisketSession.getId() != null)\n {\n int startIndex = this.weblisketSession.getId().length();\n if(startIndex >= 8)\n {\n return this.weblisketSession.getId().substring(startIndex - 8);\n }\n else\n {\n throw new Exception(\"Error Generating New Password\");\n }\n }\n else\n {\n throw new Exception(\"No Session Available For Generating New Password\");\n }\n }",
"@Override\npublic boolean isCredentialsNonExpired() {\n\treturn true;\n}",
"private void validate(String name) {\r\n /*\r\n Check to make sure that name is not blank and as a size of at least three characters and does not contain any spaces\r\n constant for min username chars.\r\n */\r\n final int MIN_USERNAME_CHARS = 3;\r\n if (name.isEmpty() || name.length() < MIN_USERNAME_CHARS || name.contains(\" \")) {\r\n // if so, show error message box\r\n showError(\"You must have a name at least \" + MIN_USERNAME_CHARS + \" characters long and have no spaces.\", \"Error\");\r\n } else {\r\n // set the host name\r\n Preferences.getInstance().setHostName(name);\r\n Preferences.getInstance().save();\r\n // close the window\r\n close();\r\n }\r\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return true;\n }",
"String getNewPassword();",
"@Test\n public void testCantRegisterMismatchPassword() {\n enterValuesAndClick(\"name\", \"[email protected]\", \"123456\", \"123478\");\n checkErrors(nameNoError, emailNoError, pwdsDoNotMatchError, pwdsDoNotMatchError);\n }",
"private void validarResp(){\n String respIngresada = txtRespuesta.getText().toString();\n\n if(respIngresada.equals(respuesta)){\n //Habilita el prox paso\n viewFlipper.showNext();\n pasoFlipper = 1;\n } else {\n txtRespuesta.setError(getString(R.string.error_resp_incorrecta));\n txtRespuesta.requestFocus();\n }\n }",
"public static String accountExpired(String username) {\n return holder.format(\"accountExpired\", username);\n }",
"public boolean verifyCaptcha(HttpServletRequest servletReq, Request req, Response res, PrintWriter out)\n\t{\n\t\tif ( null == captchaUrls) return true;\n\t\t\n\t\tUserProfile user = req.getUser();\n\t\t\n\t\tStringBuilder sb = new StringBuilder(24);\n\t\tsb.append(req.sensorId).append('.').append(req.action);\n\t\tif ( ! captchaUrls.contains(sb.toString())) return true;\n\t\t\n\t\tMap<String, String> params = req.mapData;\n\n\t\tString readcaptcha = null;\n\t\tString encodedCaptcha = null;\n\t\tif ( params.containsKey(\"readcaptcha\") ) \n\t\t\treadcaptcha = req.getString(\"readcaptcha\", true, true, false);\n\n\t\tif ( params.containsKey(\"encodedcaptcha\") ) \n\t\t\tencodedCaptcha = req.getString(\"encodedcaptcha\", true, true, false);\n\t\telse {\n\t\t\tif ( StringUtils.isEmpty(encodedCaptcha)) {\n\t\t\t\tCookie[] cookies = servletReq.getCookies();\n\t\t\t\tif (cookies != null && cookies.length > 0) {\n\t\t\t\t\tfor (Cookie cookie : cookies) {\n\t\t\t\t\t\tif ( cookie.getName().equals(\"encodedcaptcha\")) {\n\t\t\t\t\t\t\tencodedCaptcha = cookie.getValue(); \n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tString captchaTextEncoded = null;\n\t\tif ( null != readcaptcha && null != encodedCaptcha) {\n\t\t\tString secureCaptchaText = servletReq.getRemoteAddr() + readcaptcha;\n\t\t\tcaptchaTextEncoded = Hash.createHex(this.key, secureCaptchaText);\n\t\t\tif (captchaTextEncoded.equals(encodedCaptcha)) return true;\n\t\t}\n\n\t\tres.setErrorCode(\"CAPTCHA_ERROR\", ErrorCodes.CAPTCHA_MISMATCH, user.getLocale(), true);\n\t\treturn false;\n\t}",
"public interface CaptchaService {\n /**\n * 生成验证码图片\n *\n * @param captchaId\n * @return\n */\n BufferedImage buildImage(String captchaId);\n\n /**\n * 验证 验证码\n * @param captchaType\n * @param captchaId\n * @param captcha\n * @return\n */\n boolean isValid(Setting.CaptchaType captchaType, String captchaId, String captcha);\n}",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"private String getPasswordFor(String name) {\n return new StringBuilder().append(PASSWORD_FOR).append(\" '\").append(name).append(\"': \").toString();\n }",
"public void validateName(Player player) {\n String originalName = player.name;\n player.name = Text.cleanName(player.name);\n if (!originalName.equals(player.name) || player.name.length() > config.maxNameLength) {\n //name cannot be blank so then replace it with some random name\n if (player.name.replace(\" \", \"\").isEmpty()) {\n player.name = pickFreeName();\n }\n }\n }",
"public Patron issueCard(String nameOfPatron){\n //Check whether the patron has already had a card!\n if (!this.patron.containsKey(nameOfPatron)){\n Patron newPatron = new Patron(nameOfPatron,this);\n this.patron.put(nameOfPatron, newPatron);\n this.println(\"OK! A card has beed issued to \"+ nameOfPatron);\n return newPatron;\n }\n else{\n this.println(\"No two cards! This Patron has already had a Library Card!!!\");\n return null;\n }\n\n }",
"public String Login_by_entering_credentials_which_do_not_exsist() {\n\temailtextbox.sendKeys(\"User\"+random.nextInt(100000)+\"@gmail.com\");\n\tpasswordtextbox.sendKeys(\"password\"+random.nextInt(100000));\n\tLoginButton.click();\n\twait.TextToBe_Wait(\"//div[text()='Invalid Email or Password']\", \"Invalid Email or Password\");\n\tString text=ErrorMessage.getText();\n\treturn text;\n\t}",
"public static String chosenCard2IsNull() {\n return \"The second card you chose is invalid, please select again: \";\n }",
"public String nameCheck(String name) {\n\t\twhile(true) {\n\t\t\tif(Pattern.matches(\"[A-Z][a-z]{3,10}\", name)){\n\t\t\t\treturn name;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Name should have first capital alphabet and rest small alphabets.\");\n\t\t\t\tSystem.out.println(\"Enter again: \");\n\t\t\t\tname = sc.next();\n\t\t\t}\n\t\t}\n\t}",
"private static String genString(){\n final String ALPHA_NUMERIC_STRING =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n int pwLength = 14; //The longer the password, the more likely the user is to change it.\n StringBuilder pw = new StringBuilder();\n while (pwLength-- != 0) {\n int character = (int)(Math.random()*ALPHA_NUMERIC_STRING.length());\n pw.append(ALPHA_NUMERIC_STRING.charAt(character));\n }\n return pw.toString(); //\n }",
"@Override\n public void onSuccess(SafetyNetApi.RecaptchaTokenResponse response) {\n userResponseToken = response.getTokenResult();\n if (!userResponseToken.isEmpty()) {\n // Validate the user response token using the\n // reCAPTCHA siteverify API.\n // new SendPostRequest().execute();\n sendRequest();\n }\n }",
"@Override\n\t\t\t\tpublic boolean isCredentialsNonExpired() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"@Override\npublic boolean isCredentialsNonExpired() {\n\treturn false;\n}",
"public List<String> passwordMessageValidations() {\n name.sendKeys(\"Karan Prinja\");\n email.sendKeys(\"[email protected]\");\n password.sendKeys(\"12345678\");\n helperMethods.waitForWebElement(smallPassword, 30);\n String sosoPassword = smallPassword.getText();\n password.clear();\n password.sendKeys(\"Randomer12345678\");\n helperMethods.waitForWebElement(smallPassword, 30);\n String goodPassword = smallPassword.getText();\n List<String> passwordValidationText = new ArrayList<>();\n passwordValidationText.add(sosoPassword);\n passwordValidationText.add(goodPassword);\n return passwordValidationText;\n }",
"@Test\n public void testInvalidPassword() {\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"username_edit_text\"))\n .setText(USERNAME_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"password_edit_text\"))\n .setText(INVALID_PASSWORD_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"login_button\"))\n .click();\n\n }",
"public String termsValidation() {\n name.sendKeys(\"Karan Prinja\");\n email.sendKeys(\"[email protected]\");\n password.sendKeys(\"termsnotmet\");\n this.scrollBy(submit);\n submit.click();\n helperMethods.waitForWebElement(termsError, 30);\n this.scrollBy(termsError);\n return termsError.getText();\n }",
"@Test\n public void correctUsernameIncorrectPasswordTest(){\n\n WebElement userField = driver.findElement(By.name(\"user\"));\n WebElement passwordField = driver.findElement(By.name(\"passwd\"));\n WebElement submitbutton = driver.findElement(By.className(\"submit\"));\n\n userField.sendKeys(Constants.REDDIT_VALID_ACCT);\n passwordField.sendKeys(Constants.REDDIT_INVALID_PASS);\n submitbutton.click();\n\n WebDriverWait w = new WebDriverWait(driver, 10);\n\n assertTrue(submitbutton.isDisplayed());\n }",
"@Test(suiteName = \"NowPlaying\", testName = \"DMCA Restricted\", description = \"Validating DMCA restricted\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-219\" })\n\tpublic void dmcaRestrictedChannelLogo() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"verifying DMCA restricted Channel Logo MOBANDEVER-219\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickonMusic();\n\t\t\tcommon.scrollUntilTextExists(\"Dance/Electronic\");\n\t\t\tgetPageFactory().getEvehome().clickMucisSubRock();\n\t\t\tgetPageFactory().getEvehome().popChannel1();\n\t\t\tgetPageFactory().getCategory().nplLogo();\n\t\t\tgetPageFactory().getEvehome().clickminimize();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"@Override\r\n\t\t\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\t\tif (new String(pass.getPassword()).equals(name)) {\r\n\t\t\t\t\tpass.setText(\"\");\r\n\t\t\t\t\tpass.setEchoChar('.');\r\n\t\t\t\t\tpass.setForeground(Color.black);\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void keyReleased(KeyEvent arg0) {\n\t\t\t\tif (new String(pass.getPassword()).equals(\"\")) {\r\n\t\t\t\t\tpass.setText(name);\r\n\t\t\t\t\tpass.setEchoChar((char) 0);\r\n\t\t\t\t\tpass.setForeground(Color.LIGHT_GRAY);\r\n\t\t\t\t}\r\n\t\t\t}",
"public void v_Verify_Guest2_Hidden(){\n\t}",
"private String getErrorMessage(HttpServletRequest request, String key) {\n\t\tException exception = (Exception) request.getSession().getAttribute(key);\n\n\t\tString error = \"\";\n\t\tif (exception instanceof BadCredentialsException) {\n\t\t\terror = \"Неверный логин или пароль\";\n\t\t} else if (exception instanceof LockedException) {\n\t\t\terror = exception.getMessage();\n\t\t} else {\n\t\t\terror = \"Неверный логин или пароль\";\n\t\t}\n\t\treturn error;\n\t}",
"@Test(expected=RuntimeException.class)\n\tpublic void getUsernameFailureInvalidContentTest() throws Exception {\n\t\tassertNotNull(new SecretCredentialsManagerImpl(null, \"true\", null, null) {\n\n\t\t\t@Override\n\t\t\tprotected SecretCache getSecretCache() {\n\t\t\t\treturn new SecretCache(Mockito.mock(AWSSecretsManager.class)) {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic String getSecretString(final String secretId) {\n\t\t\t\t\t\treturn \"{ \\\"wrongusernamefield\\\" : \\\"username\\\" }\";\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t}.getUsername());\n\t}",
"@Test\r\n\tpublic void verification(){\n\t\tdriver.findElement(By.className(\"button block\")).click();\r\n\t\t\r\n\t\t//open a new tab\r\n\t\tdriver.findElement(By.cssSelector(\"body\")).sendKeys(Keys.CONTROL +\"t\");\r\n\t\t\r\n\t\t//switch to new tab\r\n\t\tArrayList<String> tabs = new ArrayList<String>(driver.getWindowHandles());\r\n\t\tdriver.switchTo().window(tabs.get(1));\r\n\t driver.get(\"https://www.textnow.com/login\");\r\n\t driver.findElement(By.id(\"loginUsername\")).sendKeys(\"elaineren\");\r\n\t driver.findElement(By.id(\"loginPassword\")).sendKeys(\"5691219-kk\");\r\n\t driver.findElement(By.id(\"submitLogin\")).click();\r\n\t \r\n\t String scode=driver.findElement(By.id(\"new\")).getText();\r\n\t System.out.println(scode);\r\n\t \r\n\t driver.findElement(By.linkText(\"Log Out\"));\r\n\t \r\n\t driver.switchTo().window(tabs.get(0));\r\n\t}",
"public void validateUserName(String name) {\n\t\ttry {\n\t\t\tAssert.assertTrue(userName.getText().equalsIgnoreCase(\"Hi \"+name),\"Username is correctly displayed\");\n\t\t\tLog.addMessage(\"Username correctly displayed\");\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Validation of User Login is failed\");\n\t\t\tLog.addMessage(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to validate User Login\");\n\t\t}\n\t}",
"private void validationUsername( String name ) throws Exception {\n\t\t\t if ( name != null && name.trim().length() < 3 ) {\n\t\t\t throw new Exception( \"Le nom d'utilisateur doit contenir au moins 3 caractères.\" );\n\t\t\t }\n\t\t\t}",
"private String getDllinkWebsiteCaptcha(final Account account, final DownloadLink link) throws IOException, PluginException, InterruptedException {\n Form captchaform = br.getFormbyActionRegex(\".*/redirect.*\");\r\n if (captchaform == null) {\r\n /* Fallback */\r\n captchaform = br.getForm(0);\r\n }\r\n if (captchaform == null) {\r\n logger.warning(\"captchaform is null\");\r\n }\r\n final String recaptchaV2Response = new CaptchaHelperHostPluginRecaptchaV2(this, br).getToken();\r\n captchaform.put(\"g-recaptcha-response\", recaptchaV2Response);\r\n br.setFollowRedirects(false);\r\n br.submitForm(captchaform);\r\n final String dllink = br.getRedirectLocation();\r\n if (!StringUtils.isEmpty(dllink)) {\r\n /* Store directurl */\r\n link.setProperty(this.getHost() + \"directurl_selfhosted\", dllink);\r\n }\r\n return dllink;\r\n }",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\r\n\t}",
"@Test\n public void loginWithWrongEmail(){\n String randomLog=random.getNewRandomName()+\"_auto\";\n String randomPassword=random.getNewRandomName();\n Assert.assertEquals(createUserChecking.creationChecking(randomLog,randomPassword),\"APPLICATION ERROR #1200\");\n log.info(\"login \"+randomLog+\" and email \"+randomPassword+\" were typed\");\n }",
"public BufferedImage getImage(String word) throws CaptchaException\n {\n int wordLenght;\n //check word\n wordLenght = checkWordLenght(word);\n //create attribute string from word\n AttributedString attributedWord = getAttributedString(word, wordLenght);\n\n //create backgound\n BufferedImage background = getBackround();\n //apply text on background\n return pasteText(background, attributedWord);\n\n }",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired()\n\t{\n\t\treturn true;\n\t}",
"private static boolean isValidRegattaName(String name) {\n\t\tif(name.length() == 0) {\n\t\t\tSystem.out.println(\"\\nRegatta names must be atleast one character!\"); \n\t\t\treturn false;\n\t\t}\n\n\t\tif(name.indexOf('.') == -1 && name.length() != 0) return true;\n\t\telse {\n\t\t\tSystem.out.println(\"\\nRegatta names cannot have \\'.\\' in them!\"); \n\t\t\treturn false;\n\t\t}\n\t}",
"String getPasswordExpiredMailBody( );",
"public String getInvalidError()\n\t{\n\t\t @SuppressWarnings(\"deprecation\")\n\t\tFluentWait<WebDriver> wait = new FluentWait<WebDriver>(driver)\n\t\t\t .withTimeout(5000, TimeUnit.MILLISECONDS)\n\t\t\t .pollingEvery(250, TimeUnit.MILLISECONDS)\n\t\t\t .ignoring(NoSuchElementException.class);\n\t\t\t \n\t\t\t WebElement element = wait.until(new Function<WebDriver, WebElement>() \n\t\t\t {\n\t\t\t public WebElement apply(WebDriver driver) \n\t\t\t {\n\t\t\t\t String getTextOnPage = invaliderror.getText();\n\t\t\t\t \n\t\t\t\t if(getTextOnPage.contains(\"Invalid Username Or Password\"))\n\t\t\t\t \t{\n\t\t\t\t\t \treturn invaliderror;\n\t\t\t\t \t}\n\t\t\t\t else\n\t\t\t\t \t{\n\t\t\t\t\t \treturn null;\n\t\t\t\t \t}\n\t\t\t }\n\t\t\t }\n\t\t\t );\n\t\t\t\n\t\t\treturn element.getText();\n\t}",
"public static void enterCaptcha(WebElement captchaField) {\n\t\tString captchaVal = JOptionPane.showInputDialog(\"Please enter the captcha value:\");\n\t\tSystem.out.println(captchaVal);\n\t\t// Type the entered captcha to the text box\n\t\tcaptchaField.sendKeys(captchaVal);\n\t}",
"public void wrongPasswordOrUsername() {\n messageLabel.setForeground(Color.red);\n messageLabel.setText(\"Gebruikersnaam en/of wachtwoord incorrect\");\n usernameField.setText(\"\");\n passwordField.setText(\"\");\n }",
"public static String chosenCard1IsNull() {\n return \"The first card you chose is invalid, please select again: \";\n }",
"@Test\n public void testIncorrectName(){\n UserRegisterKYC nameWithNumber = new UserRegisterKYC(\"hello123\",validId3,\"26/02/1995\",\"738583\");\n int requestResponse = nameWithNumber.sendRegisterRequest();\n assertEquals(400, requestResponse);\n\n UserRegisterKYC nameWithSymbol = new UserRegisterKYC(\"hello!\", validId3, \"26/02/1995\",\"587631\");\n requestResponse = nameWithSymbol.sendRegisterRequest();\n assertEquals(400, requestResponse);\n }",
"private String readGuess() {\n\t\tString unsafeGuess = readLine(\"Your Guess: \").trim().toUpperCase();\n\t\tif (!unsafeGuess.matches(\"[a-zA-z]\") || unsafeGuess.length() != 1) {\n\t\t\tprintln(\"Please enter a single letter.\");\n\t\t\treturn readGuess();\n\t\t} else {\n\t\t\treturn unsafeGuess.toUpperCase();\n\t\t}\n\t}",
"private void txtNameKeyReleased() {\n\n\t\tlblCanvasPharmName.setText(txtPharmacyName.getText());\n\t}"
]
| [
"0.6140862",
"0.5836856",
"0.57461435",
"0.5734857",
"0.5712803",
"0.5581927",
"0.5580921",
"0.5275379",
"0.524042",
"0.52196664",
"0.51912934",
"0.5161183",
"0.51304585",
"0.5057718",
"0.50246984",
"0.5016593",
"0.50006324",
"0.49832663",
"0.49636358",
"0.496353",
"0.49432498",
"0.4937758",
"0.49324906",
"0.49034443",
"0.48924652",
"0.48779812",
"0.48713407",
"0.4865936",
"0.48552456",
"0.4834374",
"0.48325083",
"0.4824412",
"0.4814241",
"0.48100618",
"0.4799725",
"0.47676346",
"0.4765247",
"0.4756546",
"0.47536013",
"0.47351736",
"0.4723825",
"0.47235897",
"0.4720874",
"0.46861982",
"0.46820644",
"0.46765435",
"0.4667098",
"0.4655931",
"0.46435866",
"0.46238902",
"0.4614537",
"0.4612793",
"0.46057162",
"0.46037245",
"0.46006402",
"0.45940444",
"0.458873",
"0.45803222",
"0.45793992",
"0.4579024",
"0.4579024",
"0.4579024",
"0.45761806",
"0.4571341",
"0.45711654",
"0.4569064",
"0.45621392",
"0.45609766",
"0.45606562",
"0.455841",
"0.45561314",
"0.45552173",
"0.45508838",
"0.45469517",
"0.454317",
"0.45363793",
"0.45344958",
"0.45344627",
"0.45323488",
"0.45296738",
"0.452374",
"0.4523114",
"0.45128298",
"0.45120087",
"0.45069423",
"0.45014286",
"0.45001483",
"0.44987196",
"0.44973576",
"0.44933566",
"0.44933566",
"0.44865295",
"0.44818026",
"0.44795284",
"0.44783965",
"0.44779584",
"0.4470659",
"0.44698486",
"0.44674292",
"0.44669867",
"0.44657648"
]
| 0.0 | -1 |
captcha expired, wrong email | @Override
public boolean matches(Object list) {
return ((List<String>) list).size() == 2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test(dependsOnMethods = {\"register\"})\n void confirmEmailAddressByCaptcha() {\n common.findWebElementByXpath(\"//*[@id=\\\"content\\\"]/fieldset/label/div\").click();\n\n //Click on Send captcha button\n common.timeoutSeconds(2);\n common.findWebElementById(\"send-captcha-button\").click();\n\n //No magic code is set\n common.verifyStatusMessage(\"Det uppstod ett problem med verifieringen av att du är en människa. \" +\n \"Var god försök igen.\");\n }",
"public Captcha() {\n value = generateCaptchaCode();\n id = generateCaptchaID();\n date = System.currentTimeMillis();\n }",
"public void msjereCaptcha(){\r\n click(esperarElementoPresenteEnPagina(locatorMsjeCaptcha));\r\n }",
"@Override\r\n public void onClick(View arg0) {\n if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n\r\n //Chaptcha dialog\r\n captchaDialog = new Dialog(CreateAccount.this);\r\n captchaDialog.setContentView(R.layout.captcha_dialog);\r\n captchaDialog.setTitle(\"Please enter captcha\");\r\n\r\n reCaptcha = (ReCaptcha) captchaDialog.findViewById(R.id.recaptcha);\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n\r\n chaptchaAnswer = (EditText) captchaDialog.findViewById(R.id.answer);\r\n\r\n Button captchaVerify = (Button) captchaDialog.findViewById(R.id.verify);\r\n captchaVerify.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n //dialog.dismiss();\r\n reCaptcha.verifyAnswerAsync(\"6LfhQwsTAAAAALJvjUqiurjAdzi4dztuUIGq-NyZ\", chaptchaAnswer.getText().toString(), CreateAccount.this);\r\n }\r\n });\r\n Button captchaReload = (Button) captchaDialog.findViewById(R.id.reload);\r\n captchaReload.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n }\r\n });\r\n captchaDialog.show();\r\n\r\n } else if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n email.setError(\"Invalid e-mail\");\r\n }\r\n }",
"void setCaptcha(ICaptcha captcha);",
"public String getCaptchaCode() {\n HttpGet httpget = new HttpGet(HttpURL.getCaptchaURL());\n try {\n HttpEntity entity = this.client.execute(httpget).getEntity();\n\n if (entity != null) {\n InputStream is = entity.getContent();\n File captchaImage = new File(CaptchaOCR.CAPTCHA_IMAGE_PATH);\n OutputStream os = new FileOutputStream(captchaImage);\n IOUtils.copy(is, os);\n IOUtils.closeQuietly(is);\n IOUtils.closeQuietly(os);\n }\n EntityUtils.consume(entity);\n return CaptchaOCR.doOcr();\n } catch (ClientProtocolException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return null;\n }",
"private void sendTrialExpiredEmail(String email) throws MessagingException{\r\n\t\temailService.send(email, trialExpiredSubject, null, trialExpiredEmailBody);\r\n\t}",
"String getPasswordExpiredMailBody( );",
"public static String captcha(){\n\t\tString captcha=\"\";\n\t\tfor(int i=0; i<8; i+=2){\n\t\t\tcaptcha+=(char)(65+Math.random()*26)+\" \";\n\t\t\tcaptcha+=(char)(97+Math.random()*26);\n\t\t}\n\t\treturn captcha;\n\n\t}",
"@Override\n public boolean validDefaultTime(String code) {\n return kaptcha.validate(code);\n }",
"public Bitmap getCaptcha(String devKey) throws CaptchaException {\n\t\tBitmap image = null;\n\t\ttry {\n\t\t\tString getTokenURL = CAPTCHA_URL + \"/get?key=\" + devKey;\n\n\t\t\tURL getUrl = new URL(getTokenURL);\n\n\t\t\tHttpURLConnection httpURLConnection = (HttpURLConnection) getUrl.openConnection();\n\n\t\t\thttpURLConnection.connect();\n\n\t\t\tint code = httpURLConnection.getResponseCode();\n\t\t\tSystem.out.println(code);\n\t\t\tif (code == 200) {\n\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));\n\t\t\t\tString jsonString = reader.readLine();\n\n\t\t\t\tJSONObject jsonObject = new JSONObject(jsonString);\n\t\t\t\tString imageURL = jsonObject.getString(\"image\");\n\t\t\t\tthis.token = jsonObject.getString(\"token\");\n\t\t\t\tthis.verifyURL = jsonObject.getString(\"verify\");\n\t\t\t\tthis.adid = jsonObject.getString(\"adid\");\n\t\t\t\tthis.adurl = jsonObject.getString(\"adurl\");\n\t\t\t\tthis.audioURL = jsonObject.getString(\"audio\");\n\n\t\t\t\treader.close();\n\n\n\t\t\t\t//ini cara defaultnya\n\t\t\t\t/*URL getImageURL = new URL(imageURL);\n\t\t\t\thttpURLConnection = (HttpURLConnection) getImageURL.openConnection();\n\t\t\t\tInputStream imageStream = httpURLConnection.getInputStream();\n\t\t\t\tcode = httpURLConnection.getResponseCode();\n\t\t\t\tif(code == 200){\n\t\t\t\t\timage = BitmapFactory.decodeStream(imageStream);\n\t\t\t\t\timageStream.close();\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"img response http status code is:\" + code);\n\t\t\t\t}\n\t\t\t\thttpURLConnection.disconnect(); */\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//ini pake method bantu\n\t\t\t\timage = loadImageFromUrl(imageURL);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"get response http status code is:\" + code);\n\t\t\t}\t\t\t\n\n\t\t\thttpURLConnection.disconnect();\n\n\t\t} catch(MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch(JSONException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t}\n\n\t\treturn image;\n\t}",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (Boolean.TRUE.equals(acc.getBooleanProperty(\"free\"))) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"@Override\r\n\tpublic void validate(FacesContext fc, UIComponent arg1, Object arg2)\r\n\t\t\tthrows ValidatorException {\n HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\r\n Boolean isResponseCorrect = Boolean.FALSE;\r\n javax.servlet.http.HttpSession session = request.getSession();\r\n String parm = (String)arg2;\r\n String c = (String) session.getAttribute(MyCaptcha.CAPTCHA_KEY);\r\n if (!parm.equals(c)) {\r\n \tFacesMessage message = new FacesMessage();\r\n \tmessage.setSummary(\"You have entered invalid text for image.\");\r\n \tmessage.setSeverity(FacesMessage.SEVERITY_ERROR);\r\n \tthrow new ValidatorException(message);\r\n\r\n }\r\n\t}",
"@RequestMapping\n public ModelAndView emailExpired(Map<String, Object> out , HttpServletRequest request){\n SeoUtil.getInstance().buildSeo(\"resetPassword\",\n new String[]{\"邮箱已过期\"},\n new String[]{\"\"},\n new String[]{\"\"},out);\n return new ModelAndView();\n }",
"@Override\n public void timerExpired() {\n //Inform the player they have failed\n if (isEnglish) {\n Toast.makeText(this, LOSS, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, LOSS_CHINESE, Toast.LENGTH_SHORT).show();\n }\n\n //Set visibility for replay button to visible\n replayButton.setVisibility(View.VISIBLE);\n retryButton.setVisibility(View.VISIBLE);\n scoreboardButton.setVisibility(View.VISIBLE);\n }",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (acc.getType() == AccountType.FREE) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"public static\n void checkExpiringPassword()\n {\n User user = ResourcesMgr.getSessionManager().getUser();\n \n String sPassword = user.getPassword();\n \n // Controllo della scadenza della password al primo accesso\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n // Primo accesso\n boolean boExpiredFA = ResourcesMgr.getBooleanProperty(ResourcesMgr.sGUILOGIN_EXP_FIRSTA, false);\n if(boExpiredFA) {\n GUIMessage.showWarning(\"Questo \\350 il Suo primo accesso. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n \n // Controllo della scadenza della password rispetto a quando e' stata aggiornata l'ultima volta.\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n int iExpirationDays = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_DAYS, 0);\n if(iExpirationDays > 0) {\n int iDays = getDaysFrom(user.getDatePassword());\n if(iExpirationDays <= iDays) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n else {\n int iMonths = getMonthsFrom(user.getDatePassword());\n int iExpirationMonths = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_MONTHS, 0);\n if(iExpirationMonths > 0 && iExpirationMonths <= iMonths) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n }\n }",
"public void checkAccountExpiration() throws MessagingException{\r\n\t\tList<Account> accounts = accountRepository.findAll();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\r\n\t\t\r\n\t\t//Username Password does not exist its only for faking user to system default\r\n\t\tUsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(\"[email protected]\",\r\n\t\t\t\t\"Test1234@\");\r\n\t\tSecurityContextHolder.getContext().setAuthentication(authRequest);\r\n\t\t\r\n\t\tfor( Account acc: accounts)\t{\r\n\t\t\tif(acc.getAlwaysActive() == false && acc.getActive() == true){\r\n\t\t\t\tDate expiration = acc.getExpirationDate() != null ? acc.getExpirationDate() :\r\n\t\t\t\t\tDateUtil.toDate(DateUtil.adjustDate(DateUtil.fromDate(acc.getStartDate()), Calendar.DAY_OF_MONTH, acc.getType() == AccountType.TRIAL ? getTrial.getTrialDays() : PREMIUM_EXPIRATION_DAYS));\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (DateUtil.getDaysRemaining(expiration) <= -1){\r\n\t\t\t\t\tacc.setActive(false);\r\n\t\t\t\t\tacc.setExpirationDate(new Date());\r\n\t\t\t\t\tacc.setCurrency(\"SGD\");\r\n\t\t\t\t\tUser user = new User();\r\n\t\t\t\t\tuser.setId(1L);\r\n\t\t\t\t\tacc.setLastModifiedBy(user);\r\n\t\t\t\t\tacc.setLastModifiedDate(new Date());\r\n\t\t\t\t\taccountRepository.save(acc);\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\tsendTrialExpiredEmail(acc.getUser().getUsername());\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch(MessagingException e){\r\n\t\t\t\t\t\tlog.error(\"exception while sending email to \"+acc.getUser().getUsername());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public void verifyEmail(java.lang.String unregisteredUserEmail, java.lang.String userID, java.lang.String password, java.lang.String email, int timeout, com.strikeiron.www.holders.SIWsOutputOfVerifyEmailRecordHolder verifyEmailResult, com.strikeiron.www.holders.SISubscriptionInfoHolder SISubscriptionInfo) throws java.rmi.RemoteException;",
"public void inputRandomEmailToTextbox() {\r\n\t\twaitElementVisible(driver, RegisterForm.EMAIL_TEXTBOX);\r\n\t\tString emailAddress = \"auto06\" + getTodayString(\"ddMMyyHHmmss\")+\"@lv.com\";\r\n\t\tsendKeyElement(driver,RegisterForm.EMAIL_TEXTBOX, emailAddress);\r\n\t}",
"String getExpirationtMailBody( );",
"public interface CaptchaAlgorithm {\n\n Captcha generate();\n\n}",
"boolean expired();",
"@Override\n public void onSuccess(SafetyNetApi.RecaptchaTokenResponse response) {\n userResponseToken = response.getTokenResult();\n if (!userResponseToken.isEmpty()) {\n // Validate the user response token using the\n // reCAPTCHA siteverify API.\n // new SendPostRequest().execute();\n sendRequest();\n }\n }",
"public boolean verifyCaptcha(HttpServletRequest servletReq, Request req, Response res, PrintWriter out)\n\t{\n\t\tif ( null == captchaUrls) return true;\n\t\t\n\t\tUserProfile user = req.getUser();\n\t\t\n\t\tStringBuilder sb = new StringBuilder(24);\n\t\tsb.append(req.sensorId).append('.').append(req.action);\n\t\tif ( ! captchaUrls.contains(sb.toString())) return true;\n\t\t\n\t\tMap<String, String> params = req.mapData;\n\n\t\tString readcaptcha = null;\n\t\tString encodedCaptcha = null;\n\t\tif ( params.containsKey(\"readcaptcha\") ) \n\t\t\treadcaptcha = req.getString(\"readcaptcha\", true, true, false);\n\n\t\tif ( params.containsKey(\"encodedcaptcha\") ) \n\t\t\tencodedCaptcha = req.getString(\"encodedcaptcha\", true, true, false);\n\t\telse {\n\t\t\tif ( StringUtils.isEmpty(encodedCaptcha)) {\n\t\t\t\tCookie[] cookies = servletReq.getCookies();\n\t\t\t\tif (cookies != null && cookies.length > 0) {\n\t\t\t\t\tfor (Cookie cookie : cookies) {\n\t\t\t\t\t\tif ( cookie.getName().equals(\"encodedcaptcha\")) {\n\t\t\t\t\t\t\tencodedCaptcha = cookie.getValue(); \n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tString captchaTextEncoded = null;\n\t\tif ( null != readcaptcha && null != encodedCaptcha) {\n\t\t\tString secureCaptchaText = servletReq.getRemoteAddr() + readcaptcha;\n\t\t\tcaptchaTextEncoded = Hash.createHex(this.key, secureCaptchaText);\n\t\t\tif (captchaTextEncoded.equals(encodedCaptcha)) return true;\n\t\t}\n\n\t\tres.setErrorCode(\"CAPTCHA_ERROR\", ErrorCodes.CAPTCHA_MISMATCH, user.getLocale(), true);\n\t\treturn false;\n\t}",
"@Override\r\n public boolean isCredentialsNonExpired() {\r\n return true;\r\n }",
"public void setCaptchaResponse(final String captchaResponse) {\n mCaptchaResponse = captchaResponse;\n }",
"public void alterarDadosCadastraisEmailInvalido(String email) {\n\t\tAlterarDadosCadastraisPage alterarDadosCadastraisPage = new AlterarDadosCadastraisPage(driver);\n\t\talterarDadosCadastraisPage.getInputEmail().clear();\n\t\talterarDadosCadastraisPage.getInputEmail().sendKeys(email);\n\t\talterarDadosCadastraisPage.getButtonSalvar().click();\n\t}",
"public CaptchaIncorrectoException() {\n super(ERROR_KEY);\n }",
"private void timerExpired() {\r\n timer.stop();\r\n mainFrame.setEnabled(true);\r\n inputPanel.addKits(receivedKits);\r\n messageSent = false;\r\n setMessage(finishedReceivingMessage, Color.BLUE);\r\n receivedKits.clear();\r\n }",
"private URL resolveRecaptcha(CharSequence content) {\n\t\treturn null;\n\t}",
"@Override\n public boolean isCredentialsNonExpired() {\n return true;\n }",
"@Override\npublic boolean isCredentialsNonExpired() {\n\treturn true;\n}",
"private AuthParams getCaptchaAuthParams(final String captchaResponse) {\n AuthParamsCaptcha authParams = new AuthParamsCaptcha();\n authParams.response = captchaResponse;\n return authParams;\n }",
"boolean isExpired();",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"boolean isCardApiTicketExpired(String appId);",
"@Test\n\tpublic void verifySuccessMessageUponSubmittingValidEmailInForgetPasswordPage() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\tsendKeys(forgotPasswordPageObj.forgotPasswordEmailInputField, testUserPL);\n\t\tjsClick(driver,forgotPasswordPageObj.forgotPasswordRecoveryButton);\n\t\twaitTill(2000);\n\t Assert.assertEquals(getText(forgotPasswordPageObj.forgotPasswordSuccessMessage), \"We've sent you an email with a link to reset your password. You may close this tab and check your email.\", \"Success message is not displaying upon submitting the forget password page with valid ceredentials\");\n\t}",
"@Test\n\tpublic void checkconfirmpassword_characters()\n\t{\n\t\t\n\t\tPageFactory.initElements(driver, Resetpassword.class);\n\t\tResetpassword.confirm_password.sendKeys(\"co12!@\");\n\t\tString user_text=Resetpassword.error_message.getText();\n\t\tAssert.assertEquals(user_text,\"co12!@\");\n\t\t\n\t}",
"@Override\npublic boolean isCredentialsNonExpired() {\n\treturn false;\n}",
"@Override\n\t\t\t\tpublic boolean isCredentialsNonExpired() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"public void recoverPassword(String email){\r\n User user = userRepo.findUserByEmail(email);\r\n if (user == null) throw new NullPointerException(\"User with this email was not found\");\r\n String newPassword = PasswordGenerator.generatePassword();\r\n user.setPassword(hashPassword(newPassword));\r\n userRepo.save(user);\r\n\r\n // sends email to user\r\n emailService.sendEmail(email, \"Gidd! varsler\", \"Forandringer med din Gidd! bruker\\n\" +\r\n \"Ditt nye passord er: \" + newPassword);\r\n }",
"@SuppressWarnings(\"unused\")\n void expire();",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"public interface CaptchaService {\n /**\n * 生成验证码图片\n *\n * @param captchaId\n * @return\n */\n BufferedImage buildImage(String captchaId);\n\n /**\n * 验证 验证码\n * @param captchaType\n * @param captchaId\n * @param captcha\n * @return\n */\n boolean isValid(Setting.CaptchaType captchaType, String captchaId, String captcha);\n}",
"private void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int width = 250;\n int height = 100;\n //vectorul de captcha-uri\n// char data[][] = {\n// { 'm', 'a', 'n', 'c', 'a', 'r', 'e' },\n// { 'b', 'e', 't', 'o', 'n' },\n// { 'f', 'r', 'i', 'g', 'i', 'd', 'e', 'r' },\n// { 's', 'u', 'p', 'e', 'r', 'm', 'a', 'n' },\n// { 'j', 'e', 't' }\n// };\n\n //folosim o imagine buffer pentru a desena captcha-ul\n BufferedImage bufImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n Graphics2D g2d = bufImg.createGraphics();\n Font font = new Font(\"Georgia\", Font.BOLD, 18);\n g2d.setFont(font);\n g2d.setColor(Color.WHITE);\n\n //folosim hint-uri ca sa crestam calitatea textului din poza\n RenderingHints rHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n rHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n g2d.setRenderingHints(rHints);\n\n //desenam gradientul, pentru fundalul imaginii\n GradientPaint gPaint = new GradientPaint(0, 0, Color.BLUE, 0, height/2, Color.black, true);\n g2d.setPaint(gPaint);\n g2d.fillRect(0, 0, width, height);\n g2d.setColor(new Color(255, 153, 0));\n\n //numar random pt vectorul de captcha-uri\n Random rand = new Random();\n char data[][] = {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}};\n for (int i = 0; i < 8; i++) {\n char r = rndChar();\n data[0][i] = r;\n }\n //int index = Math.abs(rand.nextInt()) % 5;\n int index = 0;\n //trimitem stringul la user sa stie sa compare input-ul de la user\n String captcha = String.copyValueOf(data[index]);\n request.getSession().setAttribute(\"captcha\", captcha);\n\n //desenam captcha-ul ales in imagine\n int x = 0, y = 0;\n for (int i = 0; i < data[index].length; i++) {\n x += 15 + Math.abs(rand.nextInt()) % 15;\n y = 45 + Math.abs(rand.nextInt()) % 20;\n g2d.drawChars(data[index], i, 1, x, y);\n }\n g2d.dispose();\n\n response.setContentType(\"image/png\");\n OutputStream os = response.getOutputStream();\n ImageIO.write(bufImg, \"png\", os);\n os.close();\n }",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\r\n\t}",
"private String getSendMailResetPasswordContent(UserForm userForm) {\n return \"\";\n }",
"@Test\n public void EmptyEmailTest() {\n driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n String actualResult = forgetPasswordPO\n .setEmail(\"\")\n .clickImagePanel()\n .getEmailAlertMessage();\n\n Assert.assertEquals(\"Email is required\", actualResult);\n }",
"@Override\n public void onVerificationFailed(FirebaseException e) {\n emailVerificationProgressBar.setVisibility (View.GONE);\n Toast.makeText (getContext (), e.getMessage (), Toast.LENGTH_LONG).show ();\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return Boolean.TRUE;\n }",
"public boolean sendLostPasswordEmail(String tempPassword, String email, String url, String imagePath) throws MessagingException, IOException {\n // get email template\n File emailTemplate = new File(imagePath + File.separator + \"email\", EMAIL_TEMPLATE_FILENAME);\n \n // set email address, temp password and url in the email\n String messageBody = createMessageBody(email, tempPassword, url, imagePath);\n \n // send email\n boolean isMsgSent = sendLinuxEmail.sendMessage(SUBJECT, messageBody, FROM, email, emailTemplate);\n \n return isMsgSent;\n }",
"@Override\n\tpublic boolean isCredentialsNonExpired()\n\t{\n\t\treturn true;\n\t}",
"public void verifyCodePressed(View view) {\r\n emailTo = String.valueOf(etEmail.getText());\r\n //Generate the random verify code\r\n verifyCode = (int)((Math.random() * 9 + 1) * 100000);\r\n Toast.makeText(ForgetPswActivity.this,\"Sending..... the verify code\", Toast.LENGTH_LONG).show();\r\n Thread thread = new Thread(){\r\n @Override\r\n public void run() {\r\n EmailUtil.getInstance().sendEmail(emailTo,\"Verify Code from Digital Learner Logbook\",\r\n \"DLL send a verify code: \" + verifyCode +\r\n \", This code is for reset the password only!\" );\r\n\r\n Looper.prepare();\r\n Toast.makeText(ForgetPswActivity.this,\"Sent the verify code\", Toast.LENGTH_LONG).show();\r\n Looper.loop();\r\n }\r\n };\r\n thread.start();\r\n\r\n }",
"public static void sendEmail(String randPass) {\n\t\t// Recipient's email ID needs to be mentioned.\n\t String to = \"[email protected]\";\n\n\t // Sender's email ID needs to be mentioned\n\t String from = \"[email protected]\";\n\n\t // Get system properties\n\t Properties properties = System.getProperties();\n\t \tproperties = System.getProperties();\n\t properties.put(\"mail.smtp.auth\", \"true\");\n\t properties.put(\"mail.smtp.starttls.enable\", \"true\");\n\t properties.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n\t properties.put(\"mail.smtp.port\", \"587\");\n\n\t // Get the default Session object.\n\t Session session = Session.getInstance(properties, new javax.mail.Authenticator() {\n\t protected PasswordAuthentication getPasswordAuthentication() {\n\t return new PasswordAuthentication(\"user\", \"pass\");\n\t }\n\t });\n\n\t try {\n\t // Create a default MimeMessage object.\n\t MimeMessage message = new MimeMessage(session);\n\n\t // Set From: header field of the header.\n\t message.setFrom(new InternetAddress(from));\n\n\t // Set To: header field of the header.\n\t message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));\n\n\t // Set Subject: header field\n\t message.setSubject(\"Dart Password Reset\");\n\t // Now set the actual message\n\t message.setText(\"You're getting this message because you've requested to reset your password! Your new password is: \" + randPass + \" ! Don't forget it.\");\n\n\t // Send message\n\t Transport.send(message);\n\t System.out.println(\"Sent message successfully....\");\n\t } catch (MessagingException mex) {\n\t mex.printStackTrace();\n\t }\n\n\t}",
"private void attemptReset(final View theButton) {\n validateEmail();\n }",
"protected void validateEmail(){\n\n //Creating Boolean Value And checking More Accurate Email Validator Added\n\n Boolean email = Pattern.matches(\"^[A-Za-z]+([.+-]?[a-z A-z0-9]+)?@[a-zA-z0-9]{1,6}\\\\.[a-zA-Z]{2,6},?([.][a-zA-z+,]{2,6})?$\",getEmail());\n System.out.println(emailResult(email));\n }",
"private boolean verificaEmail(String cadena) {\n if (validate.esVacio(cadena)) {\n setErrorEmail(getMsjVacio());\n return false;\n }\n if (!validate.esEmailValido(cadena)) {\n setErrorEmail(getMsjEmailInvalido());\n return false;\n }\n setErrorEmail(null);\n return true;\n }",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"boolean isCredentialsNonExpired();",
"boolean isCredentialsNonExpired();",
"public interface OnCaptchaMatchCallback {\n void matchSuccess(CustomerPuzzleCodeView customerPuzzleCodeView);\n void matchFailed(CustomerPuzzleCodeView customerPuzzleCodeView);\n}",
"private String getSendMailPasswordContent(UserForm userForm) {\n return \"\";\n\n }",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"public String getPasswordExpirationMsg() {\r\n return passwordExpirationMsg;\r\n }",
"boolean isJsapiTicketExpired(String appId);",
"@Override\r\n public boolean isAccountNonExpired() {\r\n return true;\r\n }",
"boolean hasExpired();",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/plain;charset=UTF-8\");\n Date date = new Date();\n String email = request.getParameter(\"email\");\n boolean valido = false;\n UtenteQueries uq = new UtenteQueries(manager);\n try {\n valido = uq.emailValida(email);\n } catch (SQLException ex) {\n \n }\n if(valido){\n Timestamp time = new Timestamp(date.getTime());\n String timestamp = time.toString();\n MessageDigest md = null;\n try {\n md = MessageDigest.getInstance(\"MD5\");\n } catch (NoSuchAlgorithmException ex) {\n //\n }\n md.update((email + timestamp).getBytes());\n byte[] md5 = md.digest();\n StringBuffer sb = new StringBuffer();\n for (byte b : md5) {\n sb.append(String.format(\"%02x\", b & 0xff));\n }\n String md5Str = sb.toString();\n PasswordRecoveryQueries prq = new PasswordRecoveryQueries(manager);\n try {\n PasswordRecovery pr = new PasswordRecovery();\n pr.setHash(md5Str);\n pr.setEmail(email);\n pr.setTime(time);\n prq.insertRecuperaPassword(pr);\n MailSender instance = new MailSender();\n try {\n instance.changePassword(email, \"http://localhost:8084/Multisala/password-recovery.html?key=\" + md5Str);\n response.getWriter().println(\"success\");\n } catch (MessagingException ex) {\n response.getWriter().println(\"fail\");\n }\n } catch (SQLException ex) {\n response.getWriter().println(\"fail\");\n }\n }else\n response.getWriter().println(\"noemail\"); \n }",
"public static void main(String[] args) throws Exception {\r\n\t\tSystem.out.println(\"Does the captcha contain alphabets (yes or no) :\");\r\n\tScanner sc=new Scanner(System.in);\r\n\tString in=sc.nextLine(); // taking imput (yes or no)\r\n\tif(in.toLowerCase().equals(\"yes\") || in.toLowerCase().equals(\"y\")) // checking if the input is yes\r\n\t{\r\n\t\talpha=true; // if input is yes alpha flag is set to true\r\n\t\tfor (int i=0; i<35; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\")); // taking all the templates along with alphabets into consideration\r\n\t\t}\r\n\r\n\t}\r\n\telse\r\n\t{\r\n\t\talpha=false;// if input is not yes alpha flag is set to true\r\n\t\tfor (int i=0; i<10; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\"));// taking all the templates along with out alphabets into consideration\r\n\t\t}\r\n\t}\r\n\t\tint numTests = 100; // total number of trials\r\n\t\t\r\n\t\t// read in the templates for each character\r\n\t\tfor (int i=0; i<35; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\"));\r\n\t\t}\r\n\r\n\t\tint correct = 0;\r\n\t\tfor (int i=0; i<numTests; i++) {\r\n\t\t\t\r\n\t\t\t// generate a random string\r\n\t\t\tString rightAnswer = randomString(6,alpha);\r\n\t\t\t\r\n\t\t\t// make a captcha from it\r\n\t\t\tBufferedImage captchaImage = generateCaptcha(rightAnswer);\r\n\t\t\t\r\n\t\t\tif (show) {\r\n\t\t\t\tImageIO.write(captchaImage, \"jpeg\", new File(\"see.jpg\"));\r\n\t\t\t\tshow = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// guess the captcha\r\n\t\t\t\r\n\t\t\tString guess = guessCaptcha(captchaImage);\r\n\t\t\t// see if we got it right\r\n\t\t\tif (guess.equals(rightAnswer)) correct++;\r\n\t\t}\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"accuracy: \" + (correct / (double) numTests));\r\n\t}",
"@Nullable\n private String getCaptchaPublicKey() {\n return RegistrationToolsKt.getCaptchaPublicKey(mRegistrationResponse);\n }",
"private String getDllinkWebsiteCaptcha(final Account account, final DownloadLink link) throws IOException, PluginException, InterruptedException {\n Form captchaform = br.getFormbyActionRegex(\".*/redirect.*\");\r\n if (captchaform == null) {\r\n /* Fallback */\r\n captchaform = br.getForm(0);\r\n }\r\n if (captchaform == null) {\r\n logger.warning(\"captchaform is null\");\r\n }\r\n final String recaptchaV2Response = new CaptchaHelperHostPluginRecaptchaV2(this, br).getToken();\r\n captchaform.put(\"g-recaptcha-response\", recaptchaV2Response);\r\n br.setFollowRedirects(false);\r\n br.submitForm(captchaform);\r\n final String dllink = br.getRedirectLocation();\r\n if (!StringUtils.isEmpty(dllink)) {\r\n /* Store directurl */\r\n link.setProperty(this.getHost() + \"directurl_selfhosted\", dllink);\r\n }\r\n return dllink;\r\n }",
"public static void main(String[] args) {\n try {\r\n System.out.println(\"We are trying to do something cool\");\r\n System.setProperty(\"webdriver.chrome.driver\", \"C://chromedriver.exe\");\r\n WebDriver driver = new ChromeDriver();\r\n String gmail = \"https://accounts.google.com/signin/v2/identifier?service=mail&passive=true&rm=false&continue=https%3A%2F%2Fmail.google.com%2Fmail%2F&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin\";\r\n\r\n driver.get(gmail);\r\n\r\n driver.findElement(By.xpath(\"//*[@id=\\\"identifierId\\\"]\")).sendKeys(\"[email protected]\"); //[email protected]\r\n\r\n Thread.sleep(1000);\r\n //This is to click next\r\n driver.findElement(By.xpath(\"//*[@id=\\\"identifierNext\\\"]\")).click();\r\n\r\n Thread.sleep(1000);\r\n //This is to put in the password Cairo2000\r\n driver.findElement(By.cssSelector(\".aCsJod.oJeWuf div div input\" )).sendKeys(\"Cairo2000\");\r\n driver.findElement(By.cssSelector(\"#passwordNext\")).click();\r\n //tempGmail.sendKeys(Keys.SHIFT, Keys.TAB);\r\n //driver.findElement(By.xpath(\"//*[@id=\\\"passwordNext\\\"]\")).sendKeys(\"Awad9911677\");\r\n //driver.findElement(By.xpath(\"//*[@id=\\\"identifierNext\\\"]\")).click();\r\n\r\n\r\n Thread.sleep(1000);\r\n WebElement PageChecker = (new WebDriverWait(driver, 10000)).until(ExpectedConditions.elementToBeClickable(By.xpath(\"//*[@id=\\\":ha\\\"]/div/div\")));\r\n\r\n System.out.println(\"We should be in the email now to check the stuff\");\r\n\r\n\r\n for(int x = 0; x <= 17; x++){\r\n String ca = \"a\";\r\n\r\n switch (x) {\r\n case 0: ca = \"0\";\r\n break;\r\n case 1: ca = \"1\";\r\n break;\r\n case 2: ca = \"2\";\r\n break;\r\n case 3: ca = \"3\";\r\n break;\r\n case 4: ca = \"4\";\r\n break;\r\n case 5: ca = \"5\";\r\n break;\r\n case 6: ca = \"6\";\r\n break;\r\n case 7: ca = \"7\";\r\n break;\r\n case 8: ca = \"8\";\r\n break;\r\n case 9: ca = \"9\";\r\n break;\r\n case 10: ca = \"a\";\r\n break;\r\n case 11: ca = \"b\";\r\n break;\r\n case 12: ca = \"c\";\r\n break;\r\n case 13: ca = \"d\";\r\n break;\r\n case 14: ca = \"e\";\r\n break;\r\n case 15: ca = \"f\";\r\n break;\r\n case 16: ca = \"g\";\r\n break;\r\n default: ca = \"g\";\r\n break;\r\n }\r\n //This is the innerloop\r\n for(int y = 0; y <= 36; y++){\r\n\r\n String da;\r\n //da = checkYValue(y);\r\n switch (y) {\r\n case 0: da = \"0\";\r\n break;\r\n case 1: da = \"1\";\r\n break;\r\n case 2: da = \"2\";\r\n break;\r\n case 3: da = \"3\";\r\n break;\r\n case 4: da = \"4\";\r\n break;\r\n case 5: da = \"5\";\r\n break;\r\n case 6: da = \"6\";\r\n break;\r\n case 7: da = \"7\";\r\n break;\r\n case 8: da = \"8\";\r\n break;\r\n case 9: da = \"9\";\r\n break;\r\n case 10: da = \"a\";\r\n break;\r\n case 11: da = \"b\";\r\n break;\r\n case 12: da = \"c\";\r\n break;\r\n case 13: da = \"d\";\r\n break;\r\n case 14: da = \"e\";\r\n break;\r\n case 15: da = \"f\";\r\n break;\r\n case 16: da = \"g\";\r\n break;\r\n case 17: da = \"h\";\r\n break;\r\n case 18: da = \"i\";\r\n break;\r\n case 19: da = \"j\";\r\n break;\r\n case 20: da = \"k\";\r\n break;\r\n case 21: da = \"l\";\r\n break;\r\n case 22: da = \"m\";\r\n break;\r\n case 23: da = \"n\";\r\n break;\r\n case 24: da = \"o\";\r\n break;\r\n case 25: da = \"p\";\r\n break;\r\n case 26: da = \"q\";\r\n break;\r\n case 27: da = \"r\";\r\n break;\r\n case 28: da = \"s\";\r\n break;\r\n case 29: da = \"t\";\r\n break;\r\n case 30: da = \"u\";\r\n break;\r\n case 31: da = \"v\";\r\n break;\r\n case 32: da = \"w\";\r\n break;\r\n case 33: da = \"x\";\r\n break;\r\n case 34: da = \"y\";\r\n break;\r\n case 35: da = \"z\";\r\n break;\r\n default: da = \"g\";\r\n break;\r\n }\r\n\r\n // System.out.println(\"Check CA and DA \" + ca + \" X\" );\r\n\r\n if( x >= 3 && y >= 2){ // if ID = 31 skip it duh\r\n\r\n if( driver.findElements(By.xpath(\"//*[@id=\\\":\" + ca + da + \"\\\"]\")).size() != 0){\r\n\r\n //System.out.println(\"Check CA and DA\" + ca + \" \" + da);\r\n //*[@id=\":6t\"]\r\n //TODO: Search based on sender of email //*[@id=\\\":\" + ca + da + \"\\\"]\" //*[@id=\":v7\"]/b/text()\r\n\r\n // System.out.println(driver.findElement(By.id(\":\" + ca + da)).getText());\r\n // System.out.println(\"We are here\");\r\n\r\n //if(driver.findElement(By.cssSelector(\".zA.zE\")).getCssValue(gmail)){ //this is to find if it is unread //Old Code .getText().contains(\"Instant payment received from\")\r\n if(driver.findElement(By.id(\":\" + ca + da)).getText().contains(\"Instant payment received from\")) {\r\n WebElement currentEmail = driver.findElement(By.id(\":\" + ca + da));\r\n System.out.println(currentEmail.getCssValue(\"background\"));\r\n if(currentEmail.getCssValue(\"background\").contains(\"rgba(255, 255, 255, 0.9)\")){\r\n //unread click it\r\n System.out.println(\"We are unread now click\");\r\n driver.findElement(By.xpath(\"//*[@id=\\\":\" + ca + da + \"\\\"]\")).click();\r\n System.out.println(\"You Luckly basters\");\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n if(x == 16 && y == 16){ //stop at gg\r\n break;\r\n }\r\n }\r\n if(x == 16){ //stop at gg\r\n break;\r\n }\r\n }\r\n\r\n System.out.println(\"We are in the RIGHT EMAIL ADDRESS\");\r\n Thread.sleep(1000);\r\n WebElement insideEmail = driver.findElement(By.cssSelector(\".acX .aaq, .acX .bsQ\"));\r\n //driver.findElement(By.xpath(\"//*[@id=\\\":k8\\\"]/div[1]/div[2]/div[1]/table/tbody/tr[1]/td[4]/div[1]\")).click();\r\n insideEmail.click();\r\n //insideEmail.sendKeys(\"This is a test\");\r\n driver.findElement(By.cssSelector(\".aO7\")).sendKeys(\"We made it\");\r\n\r\n\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(Ebay.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n\r\n }",
"long getExpiration();",
"public LoginPage resetPasswordGmail(String email) {\r\n\t\tArrayList<String> tabs = new ArrayList<String>(Constant.WEBDRIVER.getWindowHandles());\r\n\t\tConstant.WEBDRIVER.switchTo().window(tabs.get(1));\r\n\r\n\t\tresetRailwayAccount(email);\r\n\t\tArrayList<String> newtabs = new ArrayList<String>(Constant.WEBDRIVER.getWindowHandles());\r\n\t\tConstant.WEBDRIVER.switchTo().window(newtabs.get(3));\r\n\t\treturn new LoginPage();\r\n\t\t/*\r\n\t\t * this.clickLinkEmail(_resetPWSubject, email); // Switch tab chrome ---------\r\n\t\t * ArrayList<String> arr = new\r\n\t\t * ArrayList<String>(Constant.WEBDRIVER.getWindowHandles());\r\n\t\t * Constant.WEBDRIVER.switchTo().window(arr.get(2)); // End Switch tab chrome\r\n\t\t * ---------\r\n\t\t * \r\n\t\t * \r\n\t\t * closeWindow(); switchWindow();\r\n\t\t */\r\n\r\n\t}",
"void sessionExpired();",
"@Override\n public void onFailure(Call<String> call, Throwable t) {\n dismissProgress();\n SecurityLayer.generateToken(getApplicationContext());\n com.ceva.ubmobile.core.ui.Log.debug(\"otpvalidation\", t.toString());\n //showToast(getString(R.string.error_500));\n // prog.dismiss();\n // startDashBoard();\n }",
"public static void enterCaptcha(WebElement captchaField) {\n\t\tString captchaVal = JOptionPane.showInputDialog(\"Please enter the captcha value:\");\n\t\tSystem.out.println(captchaVal);\n\t\t// Type the entered captcha to the text box\n\t\tcaptchaField.sendKeys(captchaVal);\n\t}",
"private void validarSinInternet() {\n String email_val = email.getText().toString().trim();\n String password_val = password.getText().toString().trim();\n progressBar.setVisibility(View.VISIBLE);\n if ((Patterns.EMAIL_ADDRESS.matcher(email_val).matches() == false) && (email_val.isEmpty())) {\n mensaje_email();\n progressBar.setVisibility(View.GONE);\n } else if ((password_val.isEmpty())) {\n mensaje_tamaño();\n progressBar.setVisibility(View.GONE);\n } else {\n LoginUser(email_val, password_val);\n progressBar.setVisibility(View.GONE);\n }\n }",
"public void verifyExpiration(RefreshToken token) {\n if (token.getExpiryDate().compareTo(Instant.now()) < 0) {\n throw new TokenRefreshException(token.getToken(), \"Expired token. Please issue a new request\");\n }\n }",
"String getExpiry();",
"public void setPasswordExpirationMsg(String passwordExpirationDate) {\r\n passwordExpirationMsg = passwordExpirationDate;\r\n }"
]
| [
"0.6525122",
"0.62760454",
"0.6112905",
"0.5957779",
"0.5847885",
"0.5844947",
"0.5838674",
"0.5729452",
"0.5693519",
"0.55834657",
"0.5432431",
"0.53452843",
"0.5323989",
"0.53198415",
"0.5314801",
"0.5287159",
"0.52528054",
"0.524107",
"0.51976544",
"0.51841563",
"0.51510084",
"0.5150374",
"0.5142506",
"0.5026552",
"0.5026395",
"0.5022359",
"0.5021115",
"0.50074697",
"0.49850267",
"0.49811783",
"0.4972416",
"0.4947683",
"0.4941577",
"0.49295023",
"0.49229002",
"0.49037156",
"0.49037156",
"0.49037156",
"0.4900918",
"0.48795655",
"0.48708788",
"0.48661792",
"0.48555097",
"0.48290864",
"0.4828969",
"0.48234448",
"0.48234448",
"0.48230508",
"0.48150718",
"0.48067534",
"0.4804064",
"0.4802673",
"0.47953376",
"0.4794321",
"0.4793422",
"0.47909138",
"0.47840387",
"0.47801843",
"0.47679532",
"0.47658905",
"0.47641996",
"0.47546393",
"0.47546393",
"0.47546393",
"0.47546393",
"0.47546393",
"0.47546393",
"0.47546393",
"0.47546393",
"0.47546393",
"0.47546393",
"0.47546393",
"0.47546393",
"0.47546393",
"0.47546393",
"0.47546393",
"0.4750812",
"0.4750812",
"0.47487035",
"0.47485214",
"0.47478908",
"0.47478908",
"0.47478908",
"0.47440824",
"0.47251466",
"0.4724433",
"0.47185972",
"0.4715902",
"0.47065604",
"0.47049034",
"0.47007042",
"0.46980768",
"0.46920857",
"0.46890366",
"0.46848446",
"0.4680188",
"0.46793836",
"0.46784225",
"0.46730158",
"0.46655717",
"0.4665376"
]
| 0.0 | -1 |
captcha expired, wrong password | @Override
public boolean matches(Object list) {
return ((List<String>) list).size() == 2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Captcha() {\n value = generateCaptchaCode();\n id = generateCaptchaID();\n date = System.currentTimeMillis();\n }",
"public static\n void checkExpiringPassword()\n {\n User user = ResourcesMgr.getSessionManager().getUser();\n \n String sPassword = user.getPassword();\n \n // Controllo della scadenza della password al primo accesso\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n // Primo accesso\n boolean boExpiredFA = ResourcesMgr.getBooleanProperty(ResourcesMgr.sGUILOGIN_EXP_FIRSTA, false);\n if(boExpiredFA) {\n GUIMessage.showWarning(\"Questo \\350 il Suo primo accesso. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n \n // Controllo della scadenza della password rispetto a quando e' stata aggiornata l'ultima volta.\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n int iExpirationDays = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_DAYS, 0);\n if(iExpirationDays > 0) {\n int iDays = getDaysFrom(user.getDatePassword());\n if(iExpirationDays <= iDays) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n else {\n int iMonths = getMonthsFrom(user.getDatePassword());\n int iExpirationMonths = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_MONTHS, 0);\n if(iExpirationMonths > 0 && iExpirationMonths <= iMonths) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n }\n }",
"void setCaptcha(ICaptcha captcha);",
"public void msjereCaptcha(){\r\n click(esperarElementoPresenteEnPagina(locatorMsjeCaptcha));\r\n }",
"public static String captcha(){\n\t\tString captcha=\"\";\n\t\tfor(int i=0; i<8; i+=2){\n\t\t\tcaptcha+=(char)(65+Math.random()*26)+\" \";\n\t\t\tcaptcha+=(char)(97+Math.random()*26);\n\t\t}\n\t\treturn captcha;\n\n\t}",
"@Test(dependsOnMethods = {\"register\"})\n void confirmEmailAddressByCaptcha() {\n common.findWebElementByXpath(\"//*[@id=\\\"content\\\"]/fieldset/label/div\").click();\n\n //Click on Send captcha button\n common.timeoutSeconds(2);\n common.findWebElementById(\"send-captcha-button\").click();\n\n //No magic code is set\n common.verifyStatusMessage(\"Det uppstod ett problem med verifieringen av att du är en människa. \" +\n \"Var god försök igen.\");\n }",
"String getTemporaryPassword();",
"String getNewPassword();",
"@Test\n\tpublic void checkconfirmpassword_characters()\n\t{\n\t\t\n\t\tPageFactory.initElements(driver, Resetpassword.class);\n\t\tResetpassword.confirm_password.sendKeys(\"co12!@\");\n\t\tString user_text=Resetpassword.error_message.getText();\n\t\tAssert.assertEquals(user_text,\"co12!@\");\n\t\t\n\t}",
"@Override\r\n public void onClick(View arg0) {\n if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n\r\n //Chaptcha dialog\r\n captchaDialog = new Dialog(CreateAccount.this);\r\n captchaDialog.setContentView(R.layout.captcha_dialog);\r\n captchaDialog.setTitle(\"Please enter captcha\");\r\n\r\n reCaptcha = (ReCaptcha) captchaDialog.findViewById(R.id.recaptcha);\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n\r\n chaptchaAnswer = (EditText) captchaDialog.findViewById(R.id.answer);\r\n\r\n Button captchaVerify = (Button) captchaDialog.findViewById(R.id.verify);\r\n captchaVerify.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n //dialog.dismiss();\r\n reCaptcha.verifyAnswerAsync(\"6LfhQwsTAAAAALJvjUqiurjAdzi4dztuUIGq-NyZ\", chaptchaAnswer.getText().toString(), CreateAccount.this);\r\n }\r\n });\r\n Button captchaReload = (Button) captchaDialog.findViewById(R.id.reload);\r\n captchaReload.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n }\r\n });\r\n captchaDialog.show();\r\n\r\n } else if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n email.setError(\"Invalid e-mail\");\r\n }\r\n }",
"public LoginPage verifyWrongPassword() {\n string errorText = driver.findElement(By.id(\"errorMessage\")).text(); \n Assert.equals(\"Ooops, seems you have the wrong credentials there! :(\", errorText);\n return this;\n }",
"public String getCaptchaCode() {\n HttpGet httpget = new HttpGet(HttpURL.getCaptchaURL());\n try {\n HttpEntity entity = this.client.execute(httpget).getEntity();\n\n if (entity != null) {\n InputStream is = entity.getContent();\n File captchaImage = new File(CaptchaOCR.CAPTCHA_IMAGE_PATH);\n OutputStream os = new FileOutputStream(captchaImage);\n IOUtils.copy(is, os);\n IOUtils.closeQuietly(is);\n IOUtils.closeQuietly(os);\n }\n EntityUtils.consume(entity);\n return CaptchaOCR.doOcr();\n } catch (ClientProtocolException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return null;\n }",
"void setErrorPassword();",
"@Override\n public boolean validDefaultTime(String code) {\n return kaptcha.validate(code);\n }",
"private void signalInvalidPassword() {\r\n passText.setBackgroundColor(ContextCompat.getColor(this, R.color.errorBackground));\r\n Toast.makeText(this, \"The password was incorrect!\", Toast.LENGTH_SHORT).show();\r\n }",
"public void reEnterAgentPassword(String reAPwd) throws Exception {\n\n\t\twdriver.findElement(By.xpath(\"//input[@placeholder='Please re-enter your password']\")).click();\n\t\twdriver.findElement(By.xpath(\"//input[@placeholder='Please re-enter your password']\")).clear();\n\t\twdriver.findElement(By.xpath(\"//input[@placeholder='Please re-enter your password']\")).sendKeys(reAPwd);\n\t}",
"@Test(priority = 1)\n public void incorrectLoginWithPassword() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, correctMail);\n login.typeCredentials(login.passwordLabel, incorrectPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.errorBox);\n login.checkErrorMessageMatching(login.errorBox,wrongUsernameAndPasswordError);\n }",
"public boolean verifyPasswordExpiration(){\n throw new UnsupportedOperationException();\n }",
"@Override\r\n public boolean isCredentialsNonExpired() {\r\n return true;\r\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\r\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\tpwd1=new String(jf1.getPassword());\r\n\t\t\t\tif(currCard.getPwd().equals(pwd1)){\r\n\t\t\t\t\tjl1.setText(\"\");\r\n\t\t\t\t\tis1=true;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tis1=false;\r\n\r\n\t\t\t\t\tjl1.setText(\"密码错误\");\r\n\t\t\t\t\t//jf1.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}",
"public void verifyOneTimePassword() throws LiquidoException {\n\t\tlong userAuthyId = 118906633;\n\t\tString otp = \"2079048\";\n\t\ttry {\n\t\t\tString res = client.verifyOneTimePassword(userAuthyId, otp);\n\t\t\tlog.info(\" => \"+res);\n\t\t\tlog.info(\"Authy OneTimePassword verified SUCCESSFULLY. User \"+userAuthyId+\" is authentic.\");\n\t\t} catch (LiquidoException e) {\n\t\t\tlog.error(\"Cannot verify OTP\", e);\n\t\t\tthrow e;\n\t\t}\n\t}",
"@Override\npublic boolean isCredentialsNonExpired() {\n\treturn true;\n}",
"@Override\n public boolean isCredentialsNonExpired() {\n return true;\n }",
"@When(\"^user should enter the valid password in the loginpage$\")\n\tpublic void user_should_enter_the_valid_password_in_the_loginpage() throws Throwable {\n\t\tinputValuestoElement(pa.getAp().getPasswordinput(), \"superman@1010\");\n\t\n\t \n\t}",
"@Test\n public void testInvalidPassword() {\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"username_edit_text\"))\n .setText(USERNAME_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"password_edit_text\"))\n .setText(INVALID_PASSWORD_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"login_button\"))\n .click();\n\n }",
"@Override\npublic boolean isCredentialsNonExpired() {\n\treturn false;\n}",
"public Bitmap getCaptcha(String devKey) throws CaptchaException {\n\t\tBitmap image = null;\n\t\ttry {\n\t\t\tString getTokenURL = CAPTCHA_URL + \"/get?key=\" + devKey;\n\n\t\t\tURL getUrl = new URL(getTokenURL);\n\n\t\t\tHttpURLConnection httpURLConnection = (HttpURLConnection) getUrl.openConnection();\n\n\t\t\thttpURLConnection.connect();\n\n\t\t\tint code = httpURLConnection.getResponseCode();\n\t\t\tSystem.out.println(code);\n\t\t\tif (code == 200) {\n\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));\n\t\t\t\tString jsonString = reader.readLine();\n\n\t\t\t\tJSONObject jsonObject = new JSONObject(jsonString);\n\t\t\t\tString imageURL = jsonObject.getString(\"image\");\n\t\t\t\tthis.token = jsonObject.getString(\"token\");\n\t\t\t\tthis.verifyURL = jsonObject.getString(\"verify\");\n\t\t\t\tthis.adid = jsonObject.getString(\"adid\");\n\t\t\t\tthis.adurl = jsonObject.getString(\"adurl\");\n\t\t\t\tthis.audioURL = jsonObject.getString(\"audio\");\n\n\t\t\t\treader.close();\n\n\n\t\t\t\t//ini cara defaultnya\n\t\t\t\t/*URL getImageURL = new URL(imageURL);\n\t\t\t\thttpURLConnection = (HttpURLConnection) getImageURL.openConnection();\n\t\t\t\tInputStream imageStream = httpURLConnection.getInputStream();\n\t\t\t\tcode = httpURLConnection.getResponseCode();\n\t\t\t\tif(code == 200){\n\t\t\t\t\timage = BitmapFactory.decodeStream(imageStream);\n\t\t\t\t\timageStream.close();\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"img response http status code is:\" + code);\n\t\t\t\t}\n\t\t\t\thttpURLConnection.disconnect(); */\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//ini pake method bantu\n\t\t\t\timage = loadImageFromUrl(imageURL);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"get response http status code is:\" + code);\n\t\t\t}\t\t\t\n\n\t\t\thttpURLConnection.disconnect();\n\n\t\t} catch(MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch(JSONException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t}\n\n\t\treturn image;\n\t}",
"@Override\n\t\t\t\tpublic boolean isCredentialsNonExpired() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"@Then(\"^użytkownik wprowadza w pole hasło błędne hasło$\")\n public void użytkownik_wprowadza_w_pole_hasło_błędne_hasło() throws Throwable {\n String Zlehaslo = \"invalidinvalidinvalid\";\n driver.findElement(By.id(\"enp_customer_form_login_password\")).click();\n driver.findElement(By.id(\"enp_customer_form_login_password\")).sendKeys(Zlehaslo);\n czas(1000);\n }",
"public interface CaptchaAlgorithm {\n\n Captcha generate();\n\n}",
"private String generateNewPassword() throws Exception\n {\n if(this.weblisketSession != null && \n this.weblisketSession.getId() != null)\n {\n int startIndex = this.weblisketSession.getId().length();\n if(startIndex >= 8)\n {\n return this.weblisketSession.getId().substring(startIndex - 8);\n }\n else\n {\n throw new Exception(\"Error Generating New Password\");\n }\n }\n else\n {\n throw new Exception(\"No Session Available For Generating New Password\");\n }\n }",
"String getPasswordExpiredMailBody( );",
"@Test\n\tpublic void testUnmatchingPasswordNegative2() {\n\t\tfillSignUpForm(\"marius\",\"voda\",\"[email protected]\",\"Parola123\",\"PaR0la123\",\"socialNetworks\");\n\t\tassertEquals(\"Passwords must match\", driver.findElement(By.cssSelector(\"#sign-up-confirm-password-div > app-form-control-error-message > em > span\")).getText());\n\t}",
"@Test\n\tpublic void testUnmatchingPasswordNegative1() {\n\t\tfillSignUpForm(\"marius\",\"voda\",\"[email protected]\",\"Parola123\",\"parola123\",\"socialNetworks\");\n\t\tassertEquals(\"Passwords must match\", driver.findElement(By.cssSelector(\"#sign-up-confirm-password-div > app-form-control-error-message > em > span\")).getText());\n\t}",
"public String Login_by_entering_credentials_which_do_not_exsist() {\n\temailtextbox.sendKeys(\"User\"+random.nextInt(100000)+\"@gmail.com\");\n\tpasswordtextbox.sendKeys(\"password\"+random.nextInt(100000));\n\tLoginButton.click();\n\twait.TextToBe_Wait(\"//div[text()='Invalid Email or Password']\", \"Invalid Email or Password\");\n\tString text=ErrorMessage.getText();\n\treturn text;\n\t}",
"private AuthParams getCaptchaAuthParams(final String captchaResponse) {\n AuthParamsCaptcha authParams = new AuthParamsCaptcha();\n authParams.response = captchaResponse;\n return authParams;\n }",
"private boolean checkPassword(){\n Pattern p = Pattern.compile(\"^[A-z0-9]*$\");\n Matcher m = p.matcher(newPass.getText());\n boolean b = m.matches();\n if(newPass.getText().compareTo(repeatPass.getText()) != 0 || newPass.getText().isEmpty() || repeatPass.getText().isEmpty()){\n repeatPass.setBackground(Color.red);\n JOptionPane.showMessageDialog(null, \"Password Error\");\n return false;\n }\n else if(newPass.getText().length() > 10 || b == false){\n newPass.setBackground(Color.red);\n JOptionPane.showMessageDialog(null, \"Password Error\");\n return false;\n }\n newPass.setBackground(Color.green);\n repeatPass.setBackground(Color.green);\n return true;\n }",
"public CaptchaIncorrectoException() {\n super(ERROR_KEY);\n }",
"@Override\r\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\t pwd2=new String(jf2.getPassword());\r\n\t\t\t\t\r\n\r\n\t\t\t\tif(is1==true){\r\n\t\t\t\tif(currCard.getPwd().equals(pwd2)){\r\n\t\t\t\t\tjl2.setText(\"新旧密码不能一致\");\r\n\t\t\t\t\t//jf2.requestFocus();\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tis2=true;\r\n\t\t\t\t\tjl2.setText(\"\");\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}",
"void validatePassword(String usid, String password) throws Exception;",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\r\n\t}",
"@When(\"^The user enters the password$\")\n\tpublic void the_user_enters_the_password() throws Throwable {\n\t\t\n\t lpw.password_textbox();\n\t}",
"public void pass1()throws Exception\r\n { \r\n guiframe g=new guiframe();\r\n g.setSize(400,400);\r\n g.setTitle(\"Authentication A\");\r\n g.setVisible(true);\r\n \r\n \r\n \r\n \r\n \r\n /*Scanner s =new Scanner(System.in);\r\n System.out.println(\"Enter the Password:\");\r\n String str=s.nextLine();\r\n DateFormat df=new SimpleDateFormat(\"HH:mm\");\r\n Date d=new Date();\r\n String time=df.format(d);\r\n StringBuffer t1=new StringBuffer(time);\r\n t1=t1.deleteCharAt(2);\r\n time=t1.toString();\r\n System.out.println(t1);\r\n \r\n if(str.equals(time))\r\n System.out.println(\"Access Granted\");\r\n else\r\n System.out.println(\"Access Denied\");*/\r\n }",
"@Test\n public void incorrectUsernameIncorrectPasswordTest(){\n WebElement userField = driver.findElement(By.name(\"user\"));\n WebElement passwordField = driver.findElement(By.name(\"passwd\"));\n WebElement submitbutton = driver.findElement(By.className(\"submit\"));\n\n userField.sendKeys(Constants.REDDIT_INVALID_ACCT);\n passwordField.sendKeys(Constants.REDDIT_INVALID_PASS);\n submitbutton.click();\n\n WebDriverWait w = new WebDriverWait(driver, 10);\n\n assertTrue(submitbutton.isDisplayed());\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return Boolean.TRUE;\n }",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"public ForgotPassword() {\n initComponents();\n SQLConnect sqlcon = new SQLConnect();\n con=sqlcon.sqlCon(con);\n }",
"@When(\"^I enter a invalid password$\")\n\tpublic void i_enter_a_invalid_password() throws Throwable {\n\t\tthrow new PendingException();\n\t}",
"private void passwordvalidation( String password ) throws Exception {\r\n if ( password != null ) {\r\n if ( password.length() < 6 ) {\r\n throw new Exception( \"Le mot de passe doit contenir au moins 6 caracteres.\" );\r\n }\r\n } else {\r\n throw new Exception( \"Merci de saisir votre mot de passe.\" );\r\n }\r\n }",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic void validate(FacesContext fc, UIComponent arg1, Object arg2)\r\n\t\t\tthrows ValidatorException {\n HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\r\n Boolean isResponseCorrect = Boolean.FALSE;\r\n javax.servlet.http.HttpSession session = request.getSession();\r\n String parm = (String)arg2;\r\n String c = (String) session.getAttribute(MyCaptcha.CAPTCHA_KEY);\r\n if (!parm.equals(c)) {\r\n \tFacesMessage message = new FacesMessage();\r\n \tmessage.setSummary(\"You have entered invalid text for image.\");\r\n \tmessage.setSeverity(FacesMessage.SEVERITY_ERROR);\r\n \tthrow new ValidatorException(message);\r\n\r\n }\r\n\t}",
"@Override\r\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\t pwd3=new String(jf3.getPassword());\r\n\t\t\t\tif(is2==true){\r\n\t\t\t\tif(pwd3.equals(pwd2)){\r\n\t\t\t\t\tjl3.setText(\"\");\r\n\t\t\t\t\tis3=true;\r\n\t\t\t\t}else\r\n\t\t\t\t\tjl3.setText(\"两次密码不相符\");\r\n\t\t\t\t\tjf3.requestFocus();\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"@Test\n\tpublic void retrievePasswordReplayAttackTest() throws RemoteException, NoSuchAlgorithmException, InvalidKeySpecException, IOException, InvalidKeyException, SignatureException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, UnrecoverableKeyException, KeyStoreException, CertificateException {\n\t\tPasswordManager pm = new PasswordManager(8080);\n\t\tString responseRegister = pm.registerUser(byteToString(cliPubKey.getEncoded()), \n\t\t\t\tDigitalSignature.getSignature(cliPubKey.getEncoded(),cliPrivKey));\n\n\t\t// Set global variables for Secret Key and Server Public Key based on the register\n\t\tbyte[] secretKeyByte = RSAMethods.decipher(responseRegister.split(\"-\")[2], cliPrivKey);\n\t\tString secretKeyStr = new String(secretKeyByte, \"UTF-8\");\n\t\tsecretKey = new SecretKeySpec(stringToByte(secretKeyStr), 0, stringToByte(secretKeyStr).length, \"HmacMD5\");\n\t\tservPubKey = getServerPublicKey(responseRegister.split(\"-\")[0]);\n\t\t\n\t\t// Simulate the save request from client\n\t\tString domain = \"facebook\";\n\t\tString username = \"test\";\n\t\tString password = \"123aBc456\";\n\t\tint seqNum = 0;\n\t\tString msg = messageToSend(domain,username,password,\"0\",seqNum);\n\n\t\t// Call savePassword method on server\n\t\tpm.savePassword(msg);\n\n\t\t// Simulate the retrieve request from client\n\t\tseqNum = 1;\n\t\tmsg = messageToSend(domain,username,\"\",\"1\",seqNum);\n\n\t\t// Simulate a Replay Attack by sending the same message twice\n\t\tpm.retrievePassword(msg);\n\t\tString retrieveResponse2 = pm.retrievePassword(msg);\n\t\t\n\t\t// Check the way server deals with freshness of messages\n\t\tbyte[] responseTest = RSAMethods.decipher(retrieveResponse2.split(\"-\")[0],cliPrivKey);\n\t\tString responseTestStr = new String(responseTest, \"UTF-8\");\n\t\tAssert.assertEquals(\"Error\", responseTestStr);\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired()\n\t{\n\t\treturn true;\n\t}",
"public void recoverPassword(String email){\r\n User user = userRepo.findUserByEmail(email);\r\n if (user == null) throw new NullPointerException(\"User with this email was not found\");\r\n String newPassword = PasswordGenerator.generatePassword();\r\n user.setPassword(hashPassword(newPassword));\r\n userRepo.save(user);\r\n\r\n // sends email to user\r\n emailService.sendEmail(email, \"Gidd! varsler\", \"Forandringer med din Gidd! bruker\\n\" +\r\n \"Ditt nye passord er: \" + newPassword);\r\n }",
"@Test (priority=2)\n\tpublic synchronized void resetPasswordOnLive() throws InterruptedException, IOException, AWTException {\n\t\t\n\t\tif (resetLive == true)\n\t\t{\n\t\t\n\t\t\tRemoteWebDriver driver = DriverFactory.getInstance().getDriver();\n\t\t\t\n\t\t\t/********************************************************************************\n\t\t\t * \n\t\t\t * CREATE USER ON LIVE\n\t\t\t * \n\t\t\t ********************************************************************************/\n\t\t\t\n\t\t\t// Environment\n\t\t\tString env = \"Live\";\n\t\t\t\n\t\t\t// Go to Live Secure site\n\t\t\tdriver.get(\"https://secure.mercuryvmp.com/\");\n\t\t\t\n\t\t\t// Create the user\n\t\t\tresetPassword(driver, env);\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\n\t\telse\n\t\t{\n\t\t\tExtentTest test = ExtentTestManager.getTest();\n\t\t\t// Skip test\n\t\t\tSystem.out.println(\"Skipped resetting the password for the user on Live becuase the boolean was set to false\");\n\t\t\t// Log a skip in the extent report\n\t\t\ttest.log(LogStatus.SKIP, \"<span class='label info'>SKIPPED</span>\", \"<pre>Skipped resetting the password for the user on Live becuase the boolean was set to false</pre>\");\n\t\t} // end else\n\t\t\n\t}",
"public Forgotpassword()\n {\n initComponents();\n \n }",
"public static void signInInvalidPassword() throws InterruptedException {\n // test case 1- sign in to home depot account\n // step one: ****Open Browser and Navigate to URL\n browseSetUp(chromeDriver, chromeDriverPath, url);\n // click on my account web element\n driver.findElement(By.cssSelector(\"#headerMyAccount > div.MyAccount__icon > div > div.HeaderIcon__primary > svg\")).click();\n // step two: enter your credentials\n //valid user name:\n driver.findElement(By.cssSelector(\"#SPSOSignIn > a > span\")).click();\n // step three: enter valid email\n driver.findElement(By.cssSelector(\"#email\")).sendKeys(\"[email protected]\");\n // valid passoword:\n driver.findElement(By.id(\"password-input-field\")).sendKeys(\"fouad12345@#\");\n // click on sign in\n driver.findElement(By.cssSelector(\"#single-signin__body > div > div.col__12-12.col__8-12--xs.u--paddingNone-top.col__4-12--lg.col__4-12--md.col__6-12--sm > form > button > span\")).click();\n Thread.sleep(3000);\n driver.quit();\n\n\n\n }",
"private void resetPassword()\n {\n password = null;\n currentPasswdField.setText(\"\");\n currentPasswdField.requestFocusInWindow();\n okButton.setEnabled(false);\n }",
"private void actualitzaPasswd(String nou){\n user.setPasswd(nou);\n try{\n helperU.actualitzar(user, false);\n \n info(\"Contrasenya actualitzada!\");\n }catch(Exception ex){\n avis(\"Error al actualitzar la contrasenya!\");\n }\n }",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@When(\"^user enters valid username,valid password$\")\r\n\tpublic void user_enters_valid_username_valid_password() throws Exception {\n\t\thlpf.setPfname(\"capgemini\");\r\n\t\thlpf.setPfpwd(\"capg1234\");\r\n\t\tThread.sleep(2000);\r\n\t\thlpf.setPflogin();\r\n\t\t//driver.close();\r\n\t \r\n\t}",
"public static void Android_Invalid_otp() {\n try {\n\n AppiumDriver<MobileElement> driver = getAppiumDriver();\n Thread.sleep(2000);\n MobileElement el1 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[1]/android.widget.EditText\");\n el1.click();\n\n String userName = getData(\"UserName\");\n el1.sendKeys(userName);\n driver.hideKeyboard();\n MobileElement el2 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[3]/android.widget.EditText\");\n String password = getData(\"Password\");\n\n el2.sendKeys(password);\n driver.hideKeyboard();\n ReportHelper.logReportStatus(LogStatus.PASS, \"UserName and Password Given Successfully\");\n\n MobileElement loginBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Login']\");\n loginBtn.click();\n\n Thread.sleep(12000);\n\n driver.findElementByXPath(\"//android.widget.EditText[@text='Confirmation Code']\").sendKeys(\"5252\");\n Thread.sleep(2000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Invalid OTP Given Successfully\");\n driver.hideKeyboard();\n MobileElement continueBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Continue']\");\n continueBtn.click();\n Thread.sleep(15000);\n MobileElement Errormsg = driver.findElementByXPath(\"//android.widget.TextView[@text='Sorry the authentication code you entered is incorrect. Please try again.']\");\n\n if (Errormsg.isDisplayed()) {\n Thread.sleep(3000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Sorry the authentication code you entered is incorrect. Please try again.\");\n MobileElement e2 = driver.findElementByXPath(\"//android.widget.Button[@text='Go To Home']\");\n e2.click();\n Thread.sleep(2000);\n }\n\n\n } catch (Exception e) {\n ReportHelper.logReportStatus(LogStatus.FAIL, \"login into the application\");\n\n }\n }",
"private String getTempPassword(int length) {\r\n\t\tRandom rand = new Random(9845936902l);\r\n\t\tchar[] buf = new char[length];\r\n\t\tfor (int idx = 0; idx < buf.length; ++idx)\r\n\t\t\tbuf[idx] = symbols[rand.nextInt(symbols.length)];\r\n\t\treturn new String(buf);\r\n\t}",
"@Test\n public void testOtp(){\n String secret = \"whatever is here is okay\";\n Totp totp = new Totp(secret);\n String now = totp.now();\n assertThat(totp.verify(now)).isEqualTo(true);\n }",
"private void validatePassword() {\n mPassWordValidator.processResult(\n mPassWordValidator.apply(binding.registerPassword.getText().toString()),\n this::verifyAuthWithServer,\n result -> binding.registerPassword.setError(\"Please enter a valid Password.\"));\n }",
"public synchronized void resetPassword(RemoteWebDriver driver, String env) throws InterruptedException, IOException, AWTException {\n\t\t\t\n\t\t// Enter Email\n\t\tperform.type(driver, SLogin.email_txtbx(driver), \"automation\" + env + user + \"@dntest.net\");\n\t\t\n\t\t// Enter Password\n\t\tperform.type(driver, SLogin.password_txtbx(driver), password);\n\t\t\n\t\t// Click Sign In\n\t\tperform.click(driver, SLogin.signIn_btn(driver));\n\t\t\n\t\t// Wait for Find textbox\n\t\tperform.waitForElementToBeClickable(driver, SOrders.find_txtbx(driver));\n\t\t\n\t\t// Go to Users\n\t\tsecure.goToUsers(driver);\n\t\t\n\t\t// Change the password 5 times\n\t\tfor (int a = 1; a <=5; a++)\n\t\t{\n\t\t\t\n\t\t\tString pw = perform.randomLetters(driver, 10);\n\t\t\n\t\t\t// Wait for the Password Gear Icon\n\t\t\tperform.waitForElementToBeClickable(driver, SUsers.passwordGear_icon(driver));\n\t\t\t\n\t\t\t// Click the Password Gear icon\n\t\t\tperform.click(driver, SUsers.passwordGear_icon(driver));\n\t\t\t\n\t\t\t// Wait for overlay to be visible\n\t\t\tperform.waitForOverlayToBeVisible(driver);\n\t\t\t\n\t\t\t// Wait for New\n\t\t\tperform.waitForElementToBeClickable(driver, SUsers.passwordSecurityOptions_txtbx(driver));\n\t\t\t\n\t\t\t// Enter New PW\n\t\t\tperform.type(driver, SUsers.passwordSecurityOptions_txtbx(driver), pw);\n\t\t\t\n\t\t\t// Confirm New PW\n\t\t\tperform.type(driver, SUsers.confirmPasswordSecurityOptions_txtbx(driver), pw);\n\t\t\t\n\t\t\t// Click Save\n\t\t\tperform.click(driver, SUsers.saveSecurityOptions_btn(driver));\n\t\t\t\n\t\t\t// Wait for overlay to be hidden\n\t\t\tperform.waitForOverlayToBeHidden(driver);\n\t\t\n\t\t} // end for loop\n\t\t\n\t\t// Change the password to T3sting1\n\t\t// Wait for the Password Gear Icon\n\t\tperform.waitForElementToBeClickable(driver, SUsers.passwordGear_icon(driver));\n\t\t\n\t\t// Click the Password Gear icon\n\t\tperform.click(driver, SUsers.passwordGear_icon(driver));\n\t\t\n\t\t// Wait for overlay to be visible\n\t\tperform.waitForOverlayToBeVisible(driver);\n\t\t\n\t\t// Wait for New\n\t\tperform.waitForElementToBeClickable(driver, SUsers.passwordSecurityOptions_txtbx(driver));\n\t\t\n\t\t// Enter New PW\n\t\tperform.type(driver, SUsers.passwordSecurityOptions_txtbx(driver), \"T3sting1\");\n\t\t\n\t\t// Confirm New PW\n\t\tperform.type(driver, SUsers.confirmPasswordSecurityOptions_txtbx(driver), \"T3sting1\");\n\t\t\n\t\t// Click Save\n\t\tperform.click(driver, SUsers.saveSecurityOptions_btn(driver));\n\t\t\n\t\t// Wait for overlay to be hidden\n\t\tperform.waitForOverlayToBeHidden(driver);\n\t\t\n\t\t// Save the settings\n\t\tsecure.saveUsersSettings(driver);\n\t\t\n\t}",
"boolean isCredentialsNonExpired();",
"boolean isCredentialsNonExpired();",
"@Test\n\tpublic void savePasswordReplayAttackTest() throws RemoteException, NoSuchAlgorithmException, InvalidKeySpecException, IOException, InvalidKeyException, SignatureException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, UnrecoverableKeyException, KeyStoreException, CertificateException {\n\t\tPasswordManager pm = new PasswordManager(8080);\n\t\tString responseRegister = pm.registerUser(byteToString(cliPubKey.getEncoded()), \n\t\t\t\tDigitalSignature.getSignature(cliPubKey.getEncoded(),cliPrivKey));\n\n\t\t// Set global variables for Secret Key and Server Public Key based on the register\n\t\tbyte[] secretKeyByte = RSAMethods.decipher(responseRegister.split(\"-\")[2], cliPrivKey);\n\t\tString secretKeyStr = new String(secretKeyByte, \"UTF-8\");\n\t\tsecretKey = new SecretKeySpec(stringToByte(secretKeyStr), 0, stringToByte(secretKeyStr).length, \"HmacMD5\");\n\t\tservPubKey = getServerPublicKey(responseRegister.split(\"-\")[0]);\n\t\t\n\t\t// Simulate the request from client\n\t\tString domain = \"facebook\";\n\t\tString username = \"test\";\n\t\tString password = \"123aBc456\";\n\t\tint seqNum = 0;\n\t\tString msg = messageToSend(domain,username,password,\"0\",seqNum);\n\t\t\n\t\t// Simulate a Replay Attack by sending the same message twice\n\t\tpm.savePassword(msg);\n\t\tString saveResponse2 = pm.savePassword(msg.toString()); // Replay attack by sending msg twice\n\t\t\n\t\t// Check the way server deals with freshness of messages\n\t\tbyte[] responseTest = RSAMethods.decipher(saveResponse2.split(\"-\")[0],cliPrivKey);\n\t\tString responseTestStr = new String(responseTest, \"UTF-8\");\n\t\tAssert.assertEquals(\"Error\", responseTestStr);\n\t}",
"PasswordProtection protection();",
"public String getPasswordExpirationMsg() {\r\n return passwordExpirationMsg;\r\n }"
]
| [
"0.64967513",
"0.63820565",
"0.60197836",
"0.60172635",
"0.5881013",
"0.5849816",
"0.5794758",
"0.57842684",
"0.56291276",
"0.5609227",
"0.5600242",
"0.55680805",
"0.5560433",
"0.55423176",
"0.55237657",
"0.550487",
"0.55046177",
"0.55035025",
"0.5470499",
"0.54360944",
"0.54360944",
"0.54360944",
"0.54334766",
"0.542439",
"0.54229474",
"0.5416162",
"0.5415868",
"0.54131305",
"0.5403026",
"0.5402803",
"0.53978914",
"0.53525335",
"0.5345681",
"0.53372884",
"0.53339976",
"0.5324154",
"0.5304671",
"0.5302257",
"0.53006047",
"0.52964884",
"0.529569",
"0.5294582",
"0.52915704",
"0.5286036",
"0.5278462",
"0.5270266",
"0.5262758",
"0.52376825",
"0.5236216",
"0.5236216",
"0.5231547",
"0.52124363",
"0.5211726",
"0.52097774",
"0.52097774",
"0.52097774",
"0.5181737",
"0.5179407",
"0.5174632",
"0.5168366",
"0.5167963",
"0.5165771",
"0.5162112",
"0.51584065",
"0.5154346",
"0.51504636",
"0.51494724",
"0.51494724",
"0.51494724",
"0.51494724",
"0.51494724",
"0.51494724",
"0.51494724",
"0.51494724",
"0.51494724",
"0.5148758",
"0.5148758",
"0.5148758",
"0.5148758",
"0.5148758",
"0.5148758",
"0.5148758",
"0.5148758",
"0.5148758",
"0.5148758",
"0.5148758",
"0.5148758",
"0.5148758",
"0.5148758",
"0.5148758",
"0.51486164",
"0.51466554",
"0.51397717",
"0.5137484",
"0.51254505",
"0.511975",
"0.5114878",
"0.5114878",
"0.5112388",
"0.5109155",
"0.5108512"
]
| 0.0 | -1 |
captcha expired, wrong birthdate | @Override
public boolean matches(Object list) {
return ((List<String>) list).size() == 2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void expiredate() {\n\t\tdr.findElement(By.xpath(\"//input[@id='expiryDate']\")).sendKeys(\"05/2028\");\r\n\t\t\r\n\t\t\r\n\t\t}",
"@Override\n public boolean validDefaultTime(String code) {\n return kaptcha.validate(code);\n }",
"public Captcha() {\n value = generateCaptchaCode();\n id = generateCaptchaID();\n date = System.currentTimeMillis();\n }",
"public static\n void checkExpiringPassword()\n {\n User user = ResourcesMgr.getSessionManager().getUser();\n \n String sPassword = user.getPassword();\n \n // Controllo della scadenza della password al primo accesso\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n // Primo accesso\n boolean boExpiredFA = ResourcesMgr.getBooleanProperty(ResourcesMgr.sGUILOGIN_EXP_FIRSTA, false);\n if(boExpiredFA) {\n GUIMessage.showWarning(\"Questo \\350 il Suo primo accesso. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n \n // Controllo della scadenza della password rispetto a quando e' stata aggiornata l'ultima volta.\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n int iExpirationDays = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_DAYS, 0);\n if(iExpirationDays > 0) {\n int iDays = getDaysFrom(user.getDatePassword());\n if(iExpirationDays <= iDays) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n else {\n int iMonths = getMonthsFrom(user.getDatePassword());\n int iExpirationMonths = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_MONTHS, 0);\n if(iExpirationMonths > 0 && iExpirationMonths <= iMonths) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n }\n }",
"String getExpiry();",
"boolean expired();",
"Date getExpiredDate();",
"com.google.type.Date getExpireDate();",
"public int getExpiry();",
"public static void isValidCreditCardExpirationDate(String userInput) {\n\t\tDateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"MM/yy\");\n\t\ttry {\n\t\t\t// Try to parse a YearMonth from the input, then check to make sure it is not in\n\t\t\t// the past.\n\t\t\tif (YearMonth.parse(userInput, formatter).isBefore(YearMonth.now())) {\n\t\t\t\tthrow new IllegalArgumentException(\"Expiration date must be in the future! Please try again:\");\n\t\t\t}\n\t\t} catch (DateTimeException dte) {\n\t\t\tthrow new IllegalArgumentException(\"Expiration date format must be mm/yy. Please try again:\");\n\t\t}\n\n\t}",
"public boolean validateDate() {\r\n\t\tDate now = new Date();\r\n\t\t// expire date should be in the future\r\n\t\tif (now.compareTo(getExpireDate()) != -1)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}",
"long getExpirationDate();",
"@Override\n public Date getExpiration()\n {\n return null;\n }",
"public String getExpirationDate() { return date; }",
"boolean isExpired();",
"@Override\n public void setExpiration( Date arg0)\n {\n \n }",
"public Date getEXPIRY_DATE() {\r\n return EXPIRY_DATE;\r\n }",
"@Test\n public void testInvalidBirthDate() {\n registerUser(username, password, password, email, email, forename, surname, \"01011990\");\n assertNull(userService.getUser(username));\n }",
"public void validate_the_Date_of_Birth_of_Security_in_Customer_Tab(String DateofBirth)throws Exception {\n\t\tVerifyElementPresent(Desktop_XPATH_Verify_Customer_Page_Security.replaceAll(\"M_Header\", \"Security\").replaceAll(\"M_Category\", \"Date of Birth\").replaceAll(\"M_InnerText\", DateofBirth), \"Date of Birth - \"+DateofBirth, false);\n\t}",
"boolean hasExpiry();",
"@Override\r\n public boolean isAccountNonExpired() {\r\n return true;\r\n }",
"abstract void birthDateValidity();",
"@Test(dependsOnMethods = {\"register\"})\n void confirmEmailAddressByCaptcha() {\n common.findWebElementByXpath(\"//*[@id=\\\"content\\\"]/fieldset/label/div\").click();\n\n //Click on Send captcha button\n common.timeoutSeconds(2);\n common.findWebElementById(\"send-captcha-button\").click();\n\n //No magic code is set\n common.verifyStatusMessage(\"Det uppstod ett problem med verifieringen av att du är en människa. \" +\n \"Var god försök igen.\");\n }",
"boolean isValidExpTime();",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String ccNumber = request.getParameter(\"cardNum\");\n String expiryDate = request.getParameter(\"expiry\");\n String type = request.getParameter(\"cardType\");\n String cvv = request.getParameter(\"cvv\");\n CreditCardValidator v = new CreditCardValidator();\n boolean valid =v.isValid(ccNumber);\n boolean expired=true;\n boolean isCVVValid=false;\n Date date = null;\n Date now = new Date();\n try {\n date = new SimpleDateFormat(\"MM/yyyy\").parse(expiryDate); \n \n } catch (ParseException ex) {\n Logger.getLogger(ValidateCard.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n if( date.getYear() == now.getYear() && date.getMonth() > now.getMonth())\n {\n expired=false;\n }\n else if(date.getYear() > now.getYear())\n {\n expired=false;\n }\n if(cvv.length() == 3 || cvv.length() == 4)\n {\n try{\n Integer.parseInt(cvv);\n isCVVValid= true;\n }\n catch(NumberFormatException e)\n {\n //ignore isCVVValid is false\n }\n }\n \n response.setContentType(\"text/html;charset=UTF-8\");\n try (PrintWriter out = response.getWriter()) {\n /* TODO output your page here. You may use following sample code. */\n out.println(\"<!DOCTYPE html>\");\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Servlet ValidateCard</title>\"); \n out.println(\"</head>\");\n out.println(\"<body>\");\n out.println(\"<h1>is valid \" + valid + \"</h1>\");\n out.println(\"<h1>ex date \" + expiryDate + \"</h1>\");\n out.println(\"<h1>ex date \" + date + \"</h1>\");\n out.println(\"<h1>current date \" + now + \"</h1>\");\n out.println(\"<h1> is expired \" + expired + \"</h1>\");\n \n out.println(\"<h1>is CVV Valid \" + isCVVValid + \"</h1>\");\n out.println(\"</body>\");\n out.println(\"</html>\");\n }\n }",
"public LicenseExpiryDateValidator(DriverRegistration registration) {\n super(registration);\n }",
"long getExpiration();",
"@Override\n public boolean isAccountNonExpired() {\n return false;\n }",
"@Override\n public boolean isAccountNonExpired() {\n return false;\n }",
"@Override\n public boolean isAccountNonExpired() {\n return false;\n }",
"void setCaptcha(ICaptcha captcha);",
"@Test\n public void testClaimRecdDtCymd() {\n new ClaimFieldTester()\n .verifyDateStringFieldTransformedCorrectly(\n FissClaim.Builder::setRecdDtCymd,\n RdaFissClaim::getReceivedDate,\n RdaFissClaim.Fields.receivedDate);\n }",
"long getExpires();",
"private Date generateExpirationDate(){\n Calendar c = Calendar.getInstance();\n c.setTime(new Date());\n c.add(Calendar.DAY_OF_WEEK, CommonSecurityConfig.EXPIRATION);\n return c.getTime();\n }",
"public int getExpiry()\n {\n return expiry;\n }",
"public boolean checkTokenExpiry(String token) {\n System.out.println(token);\n Date now = new Date();\n long nowTime = now.getTime();\n //Date expire;\n Date tokenEXPClaim;\n long expires;\n try {\n DecodedJWT recievedToken = JWT.decode(token);\n tokenEXPClaim = recievedToken.getExpiresAt();\n expires = tokenEXPClaim.getTime();\n return nowTime >= expires;\n } \n catch (Exception exception){\n System.out.println(\"Problem with token, no way to check expiry\");\n System.out.println(exception);\n return true;\n }\n \n }",
"@Override\n public boolean isAccountNonExpired() {\n return true;\n }",
"@Override\n public boolean isAccountNonExpired() {\n return true;\n }",
"@Override\n public boolean isAccountNonExpired() {\n return true;\n }",
"@Override\r\n public void onClick(View arg0) {\n if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n\r\n //Chaptcha dialog\r\n captchaDialog = new Dialog(CreateAccount.this);\r\n captchaDialog.setContentView(R.layout.captcha_dialog);\r\n captchaDialog.setTitle(\"Please enter captcha\");\r\n\r\n reCaptcha = (ReCaptcha) captchaDialog.findViewById(R.id.recaptcha);\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n\r\n chaptchaAnswer = (EditText) captchaDialog.findViewById(R.id.answer);\r\n\r\n Button captchaVerify = (Button) captchaDialog.findViewById(R.id.verify);\r\n captchaVerify.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n //dialog.dismiss();\r\n reCaptcha.verifyAnswerAsync(\"6LfhQwsTAAAAALJvjUqiurjAdzi4dztuUIGq-NyZ\", chaptchaAnswer.getText().toString(), CreateAccount.this);\r\n }\r\n });\r\n Button captchaReload = (Button) captchaDialog.findViewById(R.id.reload);\r\n captchaReload.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n }\r\n });\r\n captchaDialog.show();\r\n\r\n } else if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n email.setError(\"Invalid e-mail\");\r\n }\r\n }",
"@SuppressWarnings(\"unused\")\n void expire();",
"public boolean verifyPasswordExpiration(){\n throw new UnsupportedOperationException();\n }",
"public Boolean hasCardExpired(Date currentDate);",
"public String getExpiryDate() {\n return this.expiryDate;\n }",
"@Override\n public boolean isAccountNonExpired () {\n return true;\n }",
"public abstract Date getExpirationDate();",
"boolean hasExpirationDate();",
"@Override\n\t\t\t\tpublic boolean isAccountNonExpired() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"public Timestamp getDateExpiry( )\r\n {\r\n return _tDateExpiry;\r\n }",
"@Override\r\n public boolean isCredentialsNonExpired() {\r\n return true;\r\n }",
"public static boolean checkExpiryDate(int year,int month,int day) {\n \tCalendar expirydate=Calendar.getInstance();\n\t\texpirydate.set(year, month-1, day);\n\t\tcal=Calendar.getInstance();\n\t\t\n\t\tif(cal.getTime().compareTo(expirydate.getTime())>0) {\n\t\t\tlogErrPrint(\"checkExpiryDate(): Has expired...\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private GuessDate(){\n }",
"public void setExpiryTime(java.util.Calendar param){\n localExpiryTimeTracker = true;\n \n this.localExpiryTime=param;\n \n\n }",
"public Date getExpiryDate() {\n return expiryDate;\n }",
"String getSpecifiedExpiry();",
"public Date getExpiryDate()\n {\n return expiryDate;\n }",
"public String getPassportExpiryDate() {\n\t\treturn passportExpiryDate;\n\t}",
"public void setExpirationDate(java.util.Date value);",
"@Override\n public synchronized boolean clearExpired(Date date) {\n return false;\n }",
"boolean hasExpired();",
"@Override\r\n\tpublic boolean isAccountNonExpired() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isAccountNonExpired() {\n\t\treturn false;\r\n\t}",
"@Override\n\t\tpublic boolean clearExpired(Date date) {\n\t\t\treturn false;\n\t\t}",
"void setExpiredDate(Date expiredDate);",
"@Override\r\n\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\t\t\tif(mExpirationDateValue.getText().toString().length() != 7){\r\n\t\t\t\t\tmExpirationDateValue.setTextColor(getResources().getColor(R.color.red));\r\n\t\t\t\t\tmExpirationDateValue.setTag(\"invalid\");\r\n\t\t\t\t}\r\n\t\t\t}",
"public long getExpires()\r\n/* 229: */ {\r\n/* 230:347 */ return getFirstDate(\"Expires\");\r\n/* 231: */ }",
"public static String captcha(){\n\t\tString captcha=\"\";\n\t\tfor(int i=0; i<8; i+=2){\n\t\t\tcaptcha+=(char)(65+Math.random()*26)+\" \";\n\t\t\tcaptcha+=(char)(97+Math.random()*26);\n\t\t}\n\t\treturn captcha;\n\n\t}",
"public void setEXPIRY_DATE(Date EXPIRY_DATE) {\r\n this.EXPIRY_DATE = EXPIRY_DATE;\r\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return true;\n }",
"@Override\npublic boolean isAccountNonExpired() {\n\treturn true;\n}",
"@Override\npublic boolean isAccountNonExpired() {\n\treturn false;\n}",
"@Override\npublic boolean isCredentialsNonExpired() {\n\treturn true;\n}",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public void timerExpired() {\n //Inform the player they have failed\n if (isEnglish) {\n Toast.makeText(this, LOSS, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, LOSS_CHINESE, Toast.LENGTH_SHORT).show();\n }\n\n //Set visibility for replay button to visible\n replayButton.setVisibility(View.VISIBLE);\n retryButton.setVisibility(View.VISIBLE);\n scoreboardButton.setVisibility(View.VISIBLE);\n }",
"public boolean checkTokenExpiry() {\n //System.out.println(\"Checking token expiry...\");\n Date now = new Date();\n long nowTime = now.getTime();\n //Date expire;\n Date tokenEXPClaim;\n long expires;\n try {\n DecodedJWT recievedToken = JWT.decode(currentAccessToken);\n tokenEXPClaim = recievedToken.getExpiresAt();\n expires = tokenEXPClaim.getTime();\n //System.out.println(\"Now is \"+nowTime);\n //System.out.println(\"Expires at \"+expires);\n //System.out.println(\"Expired? \"+(nowTime >= expires));\n return nowTime >= expires;\n } \n catch (Exception exception){\n System.out.println(\"Problem with token, no way to check expiry\");\n System.out.println(exception);\n return true;\n }\n \n }",
"public void msjereCaptcha(){\r\n click(esperarElementoPresenteEnPagina(locatorMsjeCaptcha));\r\n }",
"private void expire()\n\t{\n\t\tif (m_expire != 0 && m_timeExp < System.currentTimeMillis())\n\t\t{\n\t\t//\tSystem.out.println (\"------------ Expired: \" + getName() + \" --------------------\");\n\t\t\treset();\n\t\t}\n\t}",
"boolean isExpire(long currentTime);",
"String getCoverageExpirationDate(Record inputRecord);",
"@Test\n public void testClaimCancelDate() {\n new ClaimFieldTester()\n .verifyDateStringFieldTransformedCorrectly(\n FissClaim.Builder::setCancelDateCymd,\n RdaFissClaim::getCancelDate,\n RdaFissClaim.Fields.cancelDate);\n }",
"boolean hasExpireDate();",
"boolean isAccountNonExpired();",
"boolean isAccountNonExpired();",
"@Override\r\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\r\n\t}",
"@Override\n\t\t\t\tpublic boolean isCredentialsNonExpired() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"public void creditcard() {\n\t\tBy cd=By.xpath(\"//input[@name='creditCard']\");\r\n\t\tWebElement W_cd=wt.WaitForElement(cd, 10);\r\n\t\tW_cd.sendKeys(\"5462897859858\");\r\n\t\t\r\n\t\t}",
"public Character getExpiredRenewalFlag() {\n return expiredRenewalFlag;\n }",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn false;\n\t}",
"void setExpired(boolean expired);",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\r\n\t}",
"@Override\npublic boolean isCredentialsNonExpired() {\n\treturn false;\n}",
"public String getCaptchaCode() {\n HttpGet httpget = new HttpGet(HttpURL.getCaptchaURL());\n try {\n HttpEntity entity = this.client.execute(httpget).getEntity();\n\n if (entity != null) {\n InputStream is = entity.getContent();\n File captchaImage = new File(CaptchaOCR.CAPTCHA_IMAGE_PATH);\n OutputStream os = new FileOutputStream(captchaImage);\n IOUtils.copy(is, os);\n IOUtils.closeQuietly(is);\n IOUtils.closeQuietly(os);\n }\n EntityUtils.consume(entity);\n return CaptchaOCR.doOcr();\n } catch (ClientProtocolException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return null;\n }",
"@Override\n\tpublic boolean isExpired();",
"Duration getTokenExpiredIn();",
"public void checkAccountExpiration() throws MessagingException{\r\n\t\tList<Account> accounts = accountRepository.findAll();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\r\n\t\t\r\n\t\t//Username Password does not exist its only for faking user to system default\r\n\t\tUsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(\"[email protected]\",\r\n\t\t\t\t\"Test1234@\");\r\n\t\tSecurityContextHolder.getContext().setAuthentication(authRequest);\r\n\t\t\r\n\t\tfor( Account acc: accounts)\t{\r\n\t\t\tif(acc.getAlwaysActive() == false && acc.getActive() == true){\r\n\t\t\t\tDate expiration = acc.getExpirationDate() != null ? acc.getExpirationDate() :\r\n\t\t\t\t\tDateUtil.toDate(DateUtil.adjustDate(DateUtil.fromDate(acc.getStartDate()), Calendar.DAY_OF_MONTH, acc.getType() == AccountType.TRIAL ? getTrial.getTrialDays() : PREMIUM_EXPIRATION_DAYS));\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (DateUtil.getDaysRemaining(expiration) <= -1){\r\n\t\t\t\t\tacc.setActive(false);\r\n\t\t\t\t\tacc.setExpirationDate(new Date());\r\n\t\t\t\t\tacc.setCurrency(\"SGD\");\r\n\t\t\t\t\tUser user = new User();\r\n\t\t\t\t\tuser.setId(1L);\r\n\t\t\t\t\tacc.setLastModifiedBy(user);\r\n\t\t\t\t\tacc.setLastModifiedDate(new Date());\r\n\t\t\t\t\taccountRepository.save(acc);\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\tsendTrialExpiredEmail(acc.getUser().getUsername());\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch(MessagingException e){\r\n\t\t\t\t\t\tlog.error(\"exception while sending email to \"+acc.getUser().getUsername());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}"
]
| [
"0.6225682",
"0.61789185",
"0.59818465",
"0.5887287",
"0.56240207",
"0.5622745",
"0.561794",
"0.55306566",
"0.5520491",
"0.54578775",
"0.5397451",
"0.5377474",
"0.5369476",
"0.5336788",
"0.53029543",
"0.5290179",
"0.5269109",
"0.52315015",
"0.5228456",
"0.52215564",
"0.5215101",
"0.52117884",
"0.51962113",
"0.5181205",
"0.51658016",
"0.5164826",
"0.51561856",
"0.51485896",
"0.51485896",
"0.51485896",
"0.5145631",
"0.5141513",
"0.51410633",
"0.51307064",
"0.5119275",
"0.51180696",
"0.5111191",
"0.5111191",
"0.5111191",
"0.50890785",
"0.5083828",
"0.5081241",
"0.50735694",
"0.50734055",
"0.50680655",
"0.5054358",
"0.5045639",
"0.5043544",
"0.50420725",
"0.50417864",
"0.5037061",
"0.503557",
"0.50353545",
"0.5032521",
"0.5030519",
"0.5030324",
"0.5029368",
"0.5027134",
"0.5017611",
"0.50120544",
"0.5003362",
"0.5003362",
"0.5003325",
"0.49938717",
"0.4988795",
"0.4988715",
"0.4987724",
"0.49784166",
"0.49717614",
"0.49708402",
"0.49692824",
"0.4967022",
"0.49643263",
"0.49643263",
"0.49643263",
"0.49625763",
"0.49594128",
"0.4956908",
"0.49565622",
"0.49541172",
"0.49529272",
"0.49498305",
"0.49488845",
"0.49488685",
"0.49488685",
"0.49481016",
"0.49481016",
"0.49454737",
"0.49420205",
"0.49304083",
"0.49293527",
"0.49293527",
"0.49293527",
"0.49267662",
"0.49267328",
"0.49245912",
"0.49227336",
"0.49226376",
"0.49195307",
"0.49150473",
"0.49109814"
]
| 0.0 | -1 |
captcha expired, wrong adress1, wrong address2 | @Override
public boolean matches(Object list) {
return ((List<String>) list).size() == 3;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test(dependsOnMethods = {\"register\"})\n void confirmEmailAddressByCaptcha() {\n common.findWebElementByXpath(\"//*[@id=\\\"content\\\"]/fieldset/label/div\").click();\n\n //Click on Send captcha button\n common.timeoutSeconds(2);\n common.findWebElementById(\"send-captcha-button\").click();\n\n //No magic code is set\n common.verifyStatusMessage(\"Det uppstod ett problem med verifieringen av att du är en människa. \" +\n \"Var god försök igen.\");\n }",
"public void msjereCaptcha(){\r\n click(esperarElementoPresenteEnPagina(locatorMsjeCaptcha));\r\n }",
"public static String captcha(){\n\t\tString captcha=\"\";\n\t\tfor(int i=0; i<8; i+=2){\n\t\t\tcaptcha+=(char)(65+Math.random()*26)+\" \";\n\t\t\tcaptcha+=(char)(97+Math.random()*26);\n\t\t}\n\t\treturn captcha;\n\n\t}",
"@Override\r\n public void onClick(View arg0) {\n if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n\r\n //Chaptcha dialog\r\n captchaDialog = new Dialog(CreateAccount.this);\r\n captchaDialog.setContentView(R.layout.captcha_dialog);\r\n captchaDialog.setTitle(\"Please enter captcha\");\r\n\r\n reCaptcha = (ReCaptcha) captchaDialog.findViewById(R.id.recaptcha);\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n\r\n chaptchaAnswer = (EditText) captchaDialog.findViewById(R.id.answer);\r\n\r\n Button captchaVerify = (Button) captchaDialog.findViewById(R.id.verify);\r\n captchaVerify.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n //dialog.dismiss();\r\n reCaptcha.verifyAnswerAsync(\"6LfhQwsTAAAAALJvjUqiurjAdzi4dztuUIGq-NyZ\", chaptchaAnswer.getText().toString(), CreateAccount.this);\r\n }\r\n });\r\n Button captchaReload = (Button) captchaDialog.findViewById(R.id.reload);\r\n captchaReload.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n }\r\n });\r\n captchaDialog.show();\r\n\r\n } else if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n email.setError(\"Invalid e-mail\");\r\n }\r\n }",
"void setCaptcha(ICaptcha captcha);",
"public Captcha() {\n value = generateCaptchaCode();\n id = generateCaptchaID();\n date = System.currentTimeMillis();\n }",
"private URL resolveRecaptcha(CharSequence content) {\n\t\treturn null;\n\t}",
"public String getCaptchaCode() {\n HttpGet httpget = new HttpGet(HttpURL.getCaptchaURL());\n try {\n HttpEntity entity = this.client.execute(httpget).getEntity();\n\n if (entity != null) {\n InputStream is = entity.getContent();\n File captchaImage = new File(CaptchaOCR.CAPTCHA_IMAGE_PATH);\n OutputStream os = new FileOutputStream(captchaImage);\n IOUtils.copy(is, os);\n IOUtils.closeQuietly(is);\n IOUtils.closeQuietly(os);\n }\n EntityUtils.consume(entity);\n return CaptchaOCR.doOcr();\n } catch (ClientProtocolException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return null;\n }",
"public Bitmap getCaptcha(String devKey) throws CaptchaException {\n\t\tBitmap image = null;\n\t\ttry {\n\t\t\tString getTokenURL = CAPTCHA_URL + \"/get?key=\" + devKey;\n\n\t\t\tURL getUrl = new URL(getTokenURL);\n\n\t\t\tHttpURLConnection httpURLConnection = (HttpURLConnection) getUrl.openConnection();\n\n\t\t\thttpURLConnection.connect();\n\n\t\t\tint code = httpURLConnection.getResponseCode();\n\t\t\tSystem.out.println(code);\n\t\t\tif (code == 200) {\n\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));\n\t\t\t\tString jsonString = reader.readLine();\n\n\t\t\t\tJSONObject jsonObject = new JSONObject(jsonString);\n\t\t\t\tString imageURL = jsonObject.getString(\"image\");\n\t\t\t\tthis.token = jsonObject.getString(\"token\");\n\t\t\t\tthis.verifyURL = jsonObject.getString(\"verify\");\n\t\t\t\tthis.adid = jsonObject.getString(\"adid\");\n\t\t\t\tthis.adurl = jsonObject.getString(\"adurl\");\n\t\t\t\tthis.audioURL = jsonObject.getString(\"audio\");\n\n\t\t\t\treader.close();\n\n\n\t\t\t\t//ini cara defaultnya\n\t\t\t\t/*URL getImageURL = new URL(imageURL);\n\t\t\t\thttpURLConnection = (HttpURLConnection) getImageURL.openConnection();\n\t\t\t\tInputStream imageStream = httpURLConnection.getInputStream();\n\t\t\t\tcode = httpURLConnection.getResponseCode();\n\t\t\t\tif(code == 200){\n\t\t\t\t\timage = BitmapFactory.decodeStream(imageStream);\n\t\t\t\t\timageStream.close();\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"img response http status code is:\" + code);\n\t\t\t\t}\n\t\t\t\thttpURLConnection.disconnect(); */\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//ini pake method bantu\n\t\t\t\timage = loadImageFromUrl(imageURL);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"get response http status code is:\" + code);\n\t\t\t}\t\t\t\n\n\t\t\thttpURLConnection.disconnect();\n\n\t\t} catch(MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch(JSONException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t}\n\n\t\treturn image;\n\t}",
"private void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int width = 250;\n int height = 100;\n //vectorul de captcha-uri\n// char data[][] = {\n// { 'm', 'a', 'n', 'c', 'a', 'r', 'e' },\n// { 'b', 'e', 't', 'o', 'n' },\n// { 'f', 'r', 'i', 'g', 'i', 'd', 'e', 'r' },\n// { 's', 'u', 'p', 'e', 'r', 'm', 'a', 'n' },\n// { 'j', 'e', 't' }\n// };\n\n //folosim o imagine buffer pentru a desena captcha-ul\n BufferedImage bufImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n Graphics2D g2d = bufImg.createGraphics();\n Font font = new Font(\"Georgia\", Font.BOLD, 18);\n g2d.setFont(font);\n g2d.setColor(Color.WHITE);\n\n //folosim hint-uri ca sa crestam calitatea textului din poza\n RenderingHints rHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n rHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n g2d.setRenderingHints(rHints);\n\n //desenam gradientul, pentru fundalul imaginii\n GradientPaint gPaint = new GradientPaint(0, 0, Color.BLUE, 0, height/2, Color.black, true);\n g2d.setPaint(gPaint);\n g2d.fillRect(0, 0, width, height);\n g2d.setColor(new Color(255, 153, 0));\n\n //numar random pt vectorul de captcha-uri\n Random rand = new Random();\n char data[][] = {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}};\n for (int i = 0; i < 8; i++) {\n char r = rndChar();\n data[0][i] = r;\n }\n //int index = Math.abs(rand.nextInt()) % 5;\n int index = 0;\n //trimitem stringul la user sa stie sa compare input-ul de la user\n String captcha = String.copyValueOf(data[index]);\n request.getSession().setAttribute(\"captcha\", captcha);\n\n //desenam captcha-ul ales in imagine\n int x = 0, y = 0;\n for (int i = 0; i < data[index].length; i++) {\n x += 15 + Math.abs(rand.nextInt()) % 15;\n y = 45 + Math.abs(rand.nextInt()) % 20;\n g2d.drawChars(data[index], i, 1, x, y);\n }\n g2d.dispose();\n\n response.setContentType(\"image/png\");\n OutputStream os = response.getOutputStream();\n ImageIO.write(bufImg, \"png\", os);\n os.close();\n }",
"@Override\n public boolean validDefaultTime(String code) {\n return kaptcha.validate(code);\n }",
"public boolean verifyCaptcha(HttpServletRequest servletReq, Request req, Response res, PrintWriter out)\n\t{\n\t\tif ( null == captchaUrls) return true;\n\t\t\n\t\tUserProfile user = req.getUser();\n\t\t\n\t\tStringBuilder sb = new StringBuilder(24);\n\t\tsb.append(req.sensorId).append('.').append(req.action);\n\t\tif ( ! captchaUrls.contains(sb.toString())) return true;\n\t\t\n\t\tMap<String, String> params = req.mapData;\n\n\t\tString readcaptcha = null;\n\t\tString encodedCaptcha = null;\n\t\tif ( params.containsKey(\"readcaptcha\") ) \n\t\t\treadcaptcha = req.getString(\"readcaptcha\", true, true, false);\n\n\t\tif ( params.containsKey(\"encodedcaptcha\") ) \n\t\t\tencodedCaptcha = req.getString(\"encodedcaptcha\", true, true, false);\n\t\telse {\n\t\t\tif ( StringUtils.isEmpty(encodedCaptcha)) {\n\t\t\t\tCookie[] cookies = servletReq.getCookies();\n\t\t\t\tif (cookies != null && cookies.length > 0) {\n\t\t\t\t\tfor (Cookie cookie : cookies) {\n\t\t\t\t\t\tif ( cookie.getName().equals(\"encodedcaptcha\")) {\n\t\t\t\t\t\t\tencodedCaptcha = cookie.getValue(); \n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tString captchaTextEncoded = null;\n\t\tif ( null != readcaptcha && null != encodedCaptcha) {\n\t\t\tString secureCaptchaText = servletReq.getRemoteAddr() + readcaptcha;\n\t\t\tcaptchaTextEncoded = Hash.createHex(this.key, secureCaptchaText);\n\t\t\tif (captchaTextEncoded.equals(encodedCaptcha)) return true;\n\t\t}\n\n\t\tres.setErrorCode(\"CAPTCHA_ERROR\", ErrorCodes.CAPTCHA_MISMATCH, user.getLocale(), true);\n\t\treturn false;\n\t}",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (Boolean.TRUE.equals(acc.getBooleanProperty(\"free\"))) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (acc.getType() == AccountType.FREE) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"public interface CaptchaAlgorithm {\n\n Captcha generate();\n\n}",
"private String getDllinkWebsiteCaptcha(final Account account, final DownloadLink link) throws IOException, PluginException, InterruptedException {\n Form captchaform = br.getFormbyActionRegex(\".*/redirect.*\");\r\n if (captchaform == null) {\r\n /* Fallback */\r\n captchaform = br.getForm(0);\r\n }\r\n if (captchaform == null) {\r\n logger.warning(\"captchaform is null\");\r\n }\r\n final String recaptchaV2Response = new CaptchaHelperHostPluginRecaptchaV2(this, br).getToken();\r\n captchaform.put(\"g-recaptcha-response\", recaptchaV2Response);\r\n br.setFollowRedirects(false);\r\n br.submitForm(captchaform);\r\n final String dllink = br.getRedirectLocation();\r\n if (!StringUtils.isEmpty(dllink)) {\r\n /* Store directurl */\r\n link.setProperty(this.getHost() + \"directurl_selfhosted\", dllink);\r\n }\r\n return dllink;\r\n }",
"public void Verify(View view) {\n try {\n if (!appsingleton.isvalidateLength(et_username,6)) {\n tv_validationtext.setText(getResources().getString(R.string.st_errorOtplength));\n rl_validation.setVisibility(View.VISIBLE);\n tv_validationtext.startAnimation(appsingleton.shake_animation);\n return;\n }\n else\n {\n rl_validation.setVisibility(View.GONE);\n }\n\n if (AppUtils.isNetworkAvailable(this)) {\n new OTPVerification(et_username.getText().toString()).execute();\n\n }//end of network if\n else\n {\n appsingleton.SnackbarMessage(getResources().getString(R.string.st_internet_error),\"\",et_username);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Test\n\tpublic void checkconfirmpassword_characters()\n\t{\n\t\t\n\t\tPageFactory.initElements(driver, Resetpassword.class);\n\t\tResetpassword.confirm_password.sendKeys(\"co12!@\");\n\t\tString user_text=Resetpassword.error_message.getText();\n\t\tAssert.assertEquals(user_text,\"co12!@\");\n\t\t\n\t}",
"public static void main(String[] args) throws Exception {\r\n\t\tSystem.out.println(\"Does the captcha contain alphabets (yes or no) :\");\r\n\tScanner sc=new Scanner(System.in);\r\n\tString in=sc.nextLine(); // taking imput (yes or no)\r\n\tif(in.toLowerCase().equals(\"yes\") || in.toLowerCase().equals(\"y\")) // checking if the input is yes\r\n\t{\r\n\t\talpha=true; // if input is yes alpha flag is set to true\r\n\t\tfor (int i=0; i<35; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\")); // taking all the templates along with alphabets into consideration\r\n\t\t}\r\n\r\n\t}\r\n\telse\r\n\t{\r\n\t\talpha=false;// if input is not yes alpha flag is set to true\r\n\t\tfor (int i=0; i<10; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\"));// taking all the templates along with out alphabets into consideration\r\n\t\t}\r\n\t}\r\n\t\tint numTests = 100; // total number of trials\r\n\t\t\r\n\t\t// read in the templates for each character\r\n\t\tfor (int i=0; i<35; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\"));\r\n\t\t}\r\n\r\n\t\tint correct = 0;\r\n\t\tfor (int i=0; i<numTests; i++) {\r\n\t\t\t\r\n\t\t\t// generate a random string\r\n\t\t\tString rightAnswer = randomString(6,alpha);\r\n\t\t\t\r\n\t\t\t// make a captcha from it\r\n\t\t\tBufferedImage captchaImage = generateCaptcha(rightAnswer);\r\n\t\t\t\r\n\t\t\tif (show) {\r\n\t\t\t\tImageIO.write(captchaImage, \"jpeg\", new File(\"see.jpg\"));\r\n\t\t\t\tshow = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// guess the captcha\r\n\t\t\t\r\n\t\t\tString guess = guessCaptcha(captchaImage);\r\n\t\t\t// see if we got it right\r\n\t\t\tif (guess.equals(rightAnswer)) correct++;\r\n\t\t}\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"accuracy: \" + (correct / (double) numTests));\r\n\t}",
"@Test(timeout = 4000)\n public void test12() throws Throwable {\n boolean boolean0 = true;\n UsernamePasswordToken usernamePasswordToken0 = new UsernamePasswordToken(\")PXz-\", (String) null, true);\n byte[] byteArray0 = new byte[9];\n byteArray0[0] = (byte) (-82);\n byteArray0[1] = (byte)0;\n byteArray0[2] = (byte)0;\n byteArray0[3] = (byte)56;\n byteArray0[4] = (byte)78;\n byteArray0[5] = (byte)88;\n byteArray0[6] = (byte)0;\n byteArray0[7] = (byte)84;\n byteArray0[8] = (byte) (-1);\n try { \n MockInetAddress.getByAddress(\"\", byteArray0);\n fail(\"Expecting exception: UnknownHostException\");\n \n } catch(UnknownHostException e) {\n //\n // Not IPv4: [-82, 0, 0, 56, 78, 88, 0, 84, -1]\n //\n verifyException(\"org.evosuite.runtime.mock.java.net.MockInetAddress\", e);\n }\n }",
"@Override\n public void onSuccess(SafetyNetApi.RecaptchaTokenResponse response) {\n userResponseToken = response.getTokenResult();\n if (!userResponseToken.isEmpty()) {\n // Validate the user response token using the\n // reCAPTCHA siteverify API.\n // new SendPostRequest().execute();\n sendRequest();\n }\n }",
"private void validarSinInternet() {\n String email_val = email.getText().toString().trim();\n String password_val = password.getText().toString().trim();\n progressBar.setVisibility(View.VISIBLE);\n if ((Patterns.EMAIL_ADDRESS.matcher(email_val).matches() == false) && (email_val.isEmpty())) {\n mensaje_email();\n progressBar.setVisibility(View.GONE);\n } else if ((password_val.isEmpty())) {\n mensaje_tamaño();\n progressBar.setVisibility(View.GONE);\n } else {\n LoginUser(email_val, password_val);\n progressBar.setVisibility(View.GONE);\n }\n }",
"public static void Android_Invalid_otp() {\n try {\n\n AppiumDriver<MobileElement> driver = getAppiumDriver();\n Thread.sleep(2000);\n MobileElement el1 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[1]/android.widget.EditText\");\n el1.click();\n\n String userName = getData(\"UserName\");\n el1.sendKeys(userName);\n driver.hideKeyboard();\n MobileElement el2 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[3]/android.widget.EditText\");\n String password = getData(\"Password\");\n\n el2.sendKeys(password);\n driver.hideKeyboard();\n ReportHelper.logReportStatus(LogStatus.PASS, \"UserName and Password Given Successfully\");\n\n MobileElement loginBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Login']\");\n loginBtn.click();\n\n Thread.sleep(12000);\n\n driver.findElementByXPath(\"//android.widget.EditText[@text='Confirmation Code']\").sendKeys(\"5252\");\n Thread.sleep(2000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Invalid OTP Given Successfully\");\n driver.hideKeyboard();\n MobileElement continueBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Continue']\");\n continueBtn.click();\n Thread.sleep(15000);\n MobileElement Errormsg = driver.findElementByXPath(\"//android.widget.TextView[@text='Sorry the authentication code you entered is incorrect. Please try again.']\");\n\n if (Errormsg.isDisplayed()) {\n Thread.sleep(3000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Sorry the authentication code you entered is incorrect. Please try again.\");\n MobileElement e2 = driver.findElementByXPath(\"//android.widget.Button[@text='Go To Home']\");\n e2.click();\n Thread.sleep(2000);\n }\n\n\n } catch (Exception e) {\n ReportHelper.logReportStatus(LogStatus.FAIL, \"login into the application\");\n\n }\n }",
"@Override\r\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\t pwd2=new String(jf2.getPassword());\r\n\t\t\t\t\r\n\r\n\t\t\t\tif(is1==true){\r\n\t\t\t\tif(currCard.getPwd().equals(pwd2)){\r\n\t\t\t\t\tjl2.setText(\"新旧密码不能一致\");\r\n\t\t\t\t\t//jf2.requestFocus();\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tis2=true;\r\n\t\t\t\t\tjl2.setText(\"\");\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}",
"private AuthParams getCaptchaAuthParams(final String captchaResponse) {\n AuthParamsCaptcha authParams = new AuthParamsCaptcha();\n authParams.response = captchaResponse;\n return authParams;\n }",
"@Test\n\tpublic void testUnmatchingPasswordNegative2() {\n\t\tfillSignUpForm(\"marius\",\"voda\",\"[email protected]\",\"Parola123\",\"PaR0la123\",\"socialNetworks\");\n\t\tassertEquals(\"Passwords must match\", driver.findElement(By.cssSelector(\"#sign-up-confirm-password-div > app-form-control-error-message > em > span\")).getText());\n\t}",
"public void reEnterAgentPassword(String reAPwd) throws Exception {\n\n\t\twdriver.findElement(By.xpath(\"//input[@placeholder='Please re-enter your password']\")).click();\n\t\twdriver.findElement(By.xpath(\"//input[@placeholder='Please re-enter your password']\")).clear();\n\t\twdriver.findElement(By.xpath(\"//input[@placeholder='Please re-enter your password']\")).sendKeys(reAPwd);\n\t}",
"@Test\n\tpublic void testUnmatchingPasswordNegative1() {\n\t\tfillSignUpForm(\"marius\",\"voda\",\"[email protected]\",\"Parola123\",\"parola123\",\"socialNetworks\");\n\t\tassertEquals(\"Passwords must match\", driver.findElement(By.cssSelector(\"#sign-up-confirm-password-div > app-form-control-error-message > em > span\")).getText());\n\t}",
"public void creditcard() {\n\t\tBy cd=By.xpath(\"//input[@name='creditCard']\");\r\n\t\tWebElement W_cd=wt.WaitForElement(cd, 10);\r\n\t\tW_cd.sendKeys(\"5462897859858\");\r\n\t\t\r\n\t\t}",
"@Override\r\n\tpublic void validate(FacesContext fc, UIComponent arg1, Object arg2)\r\n\t\t\tthrows ValidatorException {\n HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\r\n Boolean isResponseCorrect = Boolean.FALSE;\r\n javax.servlet.http.HttpSession session = request.getSession();\r\n String parm = (String)arg2;\r\n String c = (String) session.getAttribute(MyCaptcha.CAPTCHA_KEY);\r\n if (!parm.equals(c)) {\r\n \tFacesMessage message = new FacesMessage();\r\n \tmessage.setSummary(\"You have entered invalid text for image.\");\r\n \tmessage.setSeverity(FacesMessage.SEVERITY_ERROR);\r\n \tthrow new ValidatorException(message);\r\n\r\n }\r\n\t}",
"@Test\r\n public void positiveRegistration() {\r\n driver.get(\"http://127.0.0.1:8888/wp-login.php?action=register\");\r\n StringBuilder sb = new StringBuilder(len);\r\n for (int i = 0; i < len; i++) {\r\n sb.append(AB.charAt(rnd.nextInt(AB.length())));\r\n }\r\n String charSequence = \"\";\r\n charSequence = sb.toString();\r\n WebElement loginField = driver.findElement(By.xpath(\"//input[@id='user_login']\"));\r\n loginField.sendKeys(charSequence);\r\n WebElement passwdField = driver.findElement(By.xpath(\"//input[@id='user_email']\"));\r\n passwdField.sendKeys(charSequence+\"@gmail.com\");\r\n\r\n WebElement registerButton = driver.findElement(By.xpath(\"//input[@name='wp-submit']\"));\r\n registerButton.click();\r\n\r\n WebElement registrationMessage = driver.findElement(By.xpath(\"//p[@class='message']\"));\r\n Assert.assertEquals(registrationMessage.getText(),\"Регистрация завершена. Проверьте вашу почту.\");\r\n }",
"@Override\r\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\tpwd1=new String(jf1.getPassword());\r\n\t\t\t\tif(currCard.getPwd().equals(pwd1)){\r\n\t\t\t\t\tjl1.setText(\"\");\r\n\t\t\t\t\tis1=true;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tis1=false;\r\n\r\n\t\t\t\t\tjl1.setText(\"密码错误\");\r\n\t\t\t\t\t//jf1.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\t pwd3=new String(jf3.getPassword());\r\n\t\t\t\tif(is2==true){\r\n\t\t\t\tif(pwd3.equals(pwd2)){\r\n\t\t\t\t\tjl3.setText(\"\");\r\n\t\t\t\t\tis3=true;\r\n\t\t\t\t}else\r\n\t\t\t\t\tjl3.setText(\"两次密码不相符\");\r\n\t\t\t\t\tjf3.requestFocus();\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"public static\n void checkExpiringPassword()\n {\n User user = ResourcesMgr.getSessionManager().getUser();\n \n String sPassword = user.getPassword();\n \n // Controllo della scadenza della password al primo accesso\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n // Primo accesso\n boolean boExpiredFA = ResourcesMgr.getBooleanProperty(ResourcesMgr.sGUILOGIN_EXP_FIRSTA, false);\n if(boExpiredFA) {\n GUIMessage.showWarning(\"Questo \\350 il Suo primo accesso. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n \n // Controllo della scadenza della password rispetto a quando e' stata aggiornata l'ultima volta.\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n int iExpirationDays = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_DAYS, 0);\n if(iExpirationDays > 0) {\n int iDays = getDaysFrom(user.getDatePassword());\n if(iExpirationDays <= iDays) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n else {\n int iMonths = getMonthsFrom(user.getDatePassword());\n int iExpirationMonths = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_MONTHS, 0);\n if(iExpirationMonths > 0 && iExpirationMonths <= iMonths) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n }\n }",
"@Test\n public void testCantRegisterInvalidEmailShortPassword() {\n enterValuesAndClick(\"name\", \"invalidemail\", \"124\", \"\");\n checkErrors(nameNoError, emailInvalidError, pwdTooShortError, pwdRepeatRequiredError);\n }",
"public interface OnCaptchaMatchCallback {\n void matchSuccess(CustomerPuzzleCodeView customerPuzzleCodeView);\n void matchFailed(CustomerPuzzleCodeView customerPuzzleCodeView);\n}",
"@Override\n public void onFailure(Call<String> call, Throwable t) {\n dismissProgress();\n SecurityLayer.generateToken(getApplicationContext());\n com.ceva.ubmobile.core.ui.Log.debug(\"otpvalidation\", t.toString());\n //showToast(getString(R.string.error_500));\n // prog.dismiss();\n // startDashBoard();\n }",
"public interface CaptchaService {\n /**\n * 生成验证码图片\n *\n * @param captchaId\n * @return\n */\n BufferedImage buildImage(String captchaId);\n\n /**\n * 验证 验证码\n * @param captchaType\n * @param captchaId\n * @param captcha\n * @return\n */\n boolean isValid(Setting.CaptchaType captchaType, String captchaId, String captcha);\n}",
"public void setCaptchaResponse(final String captchaResponse) {\n mCaptchaResponse = captchaResponse;\n }",
"@Override\n public void timerExpired() {\n //Inform the player they have failed\n if (isEnglish) {\n Toast.makeText(this, LOSS, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, LOSS_CHINESE, Toast.LENGTH_SHORT).show();\n }\n\n //Set visibility for replay button to visible\n replayButton.setVisibility(View.VISIBLE);\n retryButton.setVisibility(View.VISIBLE);\n scoreboardButton.setVisibility(View.VISIBLE);\n }",
"private void validarResp(){\n String respIngresada = txtRespuesta.getText().toString();\n\n if(respIngresada.equals(respuesta)){\n //Habilita el prox paso\n viewFlipper.showNext();\n pasoFlipper = 1;\n } else {\n txtRespuesta.setError(getString(R.string.error_resp_incorrecta));\n txtRespuesta.requestFocus();\n }\n }",
"public static void signUp(String username, String password, String alternativeEmail, String firstName, String lastName) {\n click(REGISTRATION_LINK);\n type(REG_FLOW_USERNAME_FIELD, username);\n click(REG_FLOW_CHECK_BUTTON);\n// if (!REG_FLOW_USERNAME_FREE_MESSAGE.toString().contains(\"Потребителското име е свободно\")) {\n// System.out.println(\"Try another username - the entered one is already in use\");\n// }\n type(REG_FLOW_PASSWORD_FIELD, password);\n type(REG_FLOW_PASSWORD_REENTER_FIELD, password);\n WebElement phoneCheckbox = Browser.driver.findElement(REG_FLOW_PHONE_CHECKBOX);\n if (phoneCheckbox.isEnabled()) {\n phoneCheckbox.click(); //that's how we disable it\n }\n type(REG_FLOW_ALTERNATIVE_EMAIL_FIELD, alternativeEmail);\n type(REG_FLOW_QUESTION_FIELD, \"To be or not to be?\");\n type(REG_FLOW_ANSWER_FIELD, \"To beeee.\");\n type(REG_FLOW_FNAME_FIELD, firstName);\n type(REG_FLOW_LNAME_FIELD, lastName);\n Browser.driver.switchTo().frame(\"abv-GDPR-frame\").manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n // Manually to tap ACCEPT on the GDPR window\n Browser.driver.switchTo().defaultContent();\n click(REG_FLOW_GENDER_RADIOBUTTON); //to choose male\n click(REG_FLOW_DAY_DROPDOWN);\n click(REG_FLOW_DAY_3); // to choose 3th\n click(REG_FLOW_MONTH_DROPDOWN);\n click(REG_FLOW_MONTH_5); // to choose May\n click(REG_FLOW_YEAR_DROPDOWN);\n click(REG_FLOW_YEAR_1998); // to choose 1998\n\n findElement(REG_FLOW_CAPTCHA_FIELD);\n click(REG_FLOW_CAPTCHA_FIELD);\n // Timeout to enter the CAPTCHA manually\n // EXPLICIT WAIT DA MU TURYA\n click(REG_FLOW_CREATE_BUTTON);\n String successfulRegMessage = Browser.driver.findElement(REG_SUCCESS_MESSAGE).getText().trim();\n assertTrue(successfulRegMessage.contains(\"Успешна регистрация.\"), \"No SUCCESS message\");\n click(LOGIN_TO_YOUR_EMAIL_BUTTON);\n }",
"public static void main(String[] args) {\n try {\r\n System.out.println(\"We are trying to do something cool\");\r\n System.setProperty(\"webdriver.chrome.driver\", \"C://chromedriver.exe\");\r\n WebDriver driver = new ChromeDriver();\r\n String gmail = \"https://accounts.google.com/signin/v2/identifier?service=mail&passive=true&rm=false&continue=https%3A%2F%2Fmail.google.com%2Fmail%2F&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin\";\r\n\r\n driver.get(gmail);\r\n\r\n driver.findElement(By.xpath(\"//*[@id=\\\"identifierId\\\"]\")).sendKeys(\"[email protected]\"); //[email protected]\r\n\r\n Thread.sleep(1000);\r\n //This is to click next\r\n driver.findElement(By.xpath(\"//*[@id=\\\"identifierNext\\\"]\")).click();\r\n\r\n Thread.sleep(1000);\r\n //This is to put in the password Cairo2000\r\n driver.findElement(By.cssSelector(\".aCsJod.oJeWuf div div input\" )).sendKeys(\"Cairo2000\");\r\n driver.findElement(By.cssSelector(\"#passwordNext\")).click();\r\n //tempGmail.sendKeys(Keys.SHIFT, Keys.TAB);\r\n //driver.findElement(By.xpath(\"//*[@id=\\\"passwordNext\\\"]\")).sendKeys(\"Awad9911677\");\r\n //driver.findElement(By.xpath(\"//*[@id=\\\"identifierNext\\\"]\")).click();\r\n\r\n\r\n Thread.sleep(1000);\r\n WebElement PageChecker = (new WebDriverWait(driver, 10000)).until(ExpectedConditions.elementToBeClickable(By.xpath(\"//*[@id=\\\":ha\\\"]/div/div\")));\r\n\r\n System.out.println(\"We should be in the email now to check the stuff\");\r\n\r\n\r\n for(int x = 0; x <= 17; x++){\r\n String ca = \"a\";\r\n\r\n switch (x) {\r\n case 0: ca = \"0\";\r\n break;\r\n case 1: ca = \"1\";\r\n break;\r\n case 2: ca = \"2\";\r\n break;\r\n case 3: ca = \"3\";\r\n break;\r\n case 4: ca = \"4\";\r\n break;\r\n case 5: ca = \"5\";\r\n break;\r\n case 6: ca = \"6\";\r\n break;\r\n case 7: ca = \"7\";\r\n break;\r\n case 8: ca = \"8\";\r\n break;\r\n case 9: ca = \"9\";\r\n break;\r\n case 10: ca = \"a\";\r\n break;\r\n case 11: ca = \"b\";\r\n break;\r\n case 12: ca = \"c\";\r\n break;\r\n case 13: ca = \"d\";\r\n break;\r\n case 14: ca = \"e\";\r\n break;\r\n case 15: ca = \"f\";\r\n break;\r\n case 16: ca = \"g\";\r\n break;\r\n default: ca = \"g\";\r\n break;\r\n }\r\n //This is the innerloop\r\n for(int y = 0; y <= 36; y++){\r\n\r\n String da;\r\n //da = checkYValue(y);\r\n switch (y) {\r\n case 0: da = \"0\";\r\n break;\r\n case 1: da = \"1\";\r\n break;\r\n case 2: da = \"2\";\r\n break;\r\n case 3: da = \"3\";\r\n break;\r\n case 4: da = \"4\";\r\n break;\r\n case 5: da = \"5\";\r\n break;\r\n case 6: da = \"6\";\r\n break;\r\n case 7: da = \"7\";\r\n break;\r\n case 8: da = \"8\";\r\n break;\r\n case 9: da = \"9\";\r\n break;\r\n case 10: da = \"a\";\r\n break;\r\n case 11: da = \"b\";\r\n break;\r\n case 12: da = \"c\";\r\n break;\r\n case 13: da = \"d\";\r\n break;\r\n case 14: da = \"e\";\r\n break;\r\n case 15: da = \"f\";\r\n break;\r\n case 16: da = \"g\";\r\n break;\r\n case 17: da = \"h\";\r\n break;\r\n case 18: da = \"i\";\r\n break;\r\n case 19: da = \"j\";\r\n break;\r\n case 20: da = \"k\";\r\n break;\r\n case 21: da = \"l\";\r\n break;\r\n case 22: da = \"m\";\r\n break;\r\n case 23: da = \"n\";\r\n break;\r\n case 24: da = \"o\";\r\n break;\r\n case 25: da = \"p\";\r\n break;\r\n case 26: da = \"q\";\r\n break;\r\n case 27: da = \"r\";\r\n break;\r\n case 28: da = \"s\";\r\n break;\r\n case 29: da = \"t\";\r\n break;\r\n case 30: da = \"u\";\r\n break;\r\n case 31: da = \"v\";\r\n break;\r\n case 32: da = \"w\";\r\n break;\r\n case 33: da = \"x\";\r\n break;\r\n case 34: da = \"y\";\r\n break;\r\n case 35: da = \"z\";\r\n break;\r\n default: da = \"g\";\r\n break;\r\n }\r\n\r\n // System.out.println(\"Check CA and DA \" + ca + \" X\" );\r\n\r\n if( x >= 3 && y >= 2){ // if ID = 31 skip it duh\r\n\r\n if( driver.findElements(By.xpath(\"//*[@id=\\\":\" + ca + da + \"\\\"]\")).size() != 0){\r\n\r\n //System.out.println(\"Check CA and DA\" + ca + \" \" + da);\r\n //*[@id=\":6t\"]\r\n //TODO: Search based on sender of email //*[@id=\\\":\" + ca + da + \"\\\"]\" //*[@id=\":v7\"]/b/text()\r\n\r\n // System.out.println(driver.findElement(By.id(\":\" + ca + da)).getText());\r\n // System.out.println(\"We are here\");\r\n\r\n //if(driver.findElement(By.cssSelector(\".zA.zE\")).getCssValue(gmail)){ //this is to find if it is unread //Old Code .getText().contains(\"Instant payment received from\")\r\n if(driver.findElement(By.id(\":\" + ca + da)).getText().contains(\"Instant payment received from\")) {\r\n WebElement currentEmail = driver.findElement(By.id(\":\" + ca + da));\r\n System.out.println(currentEmail.getCssValue(\"background\"));\r\n if(currentEmail.getCssValue(\"background\").contains(\"rgba(255, 255, 255, 0.9)\")){\r\n //unread click it\r\n System.out.println(\"We are unread now click\");\r\n driver.findElement(By.xpath(\"//*[@id=\\\":\" + ca + da + \"\\\"]\")).click();\r\n System.out.println(\"You Luckly basters\");\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n if(x == 16 && y == 16){ //stop at gg\r\n break;\r\n }\r\n }\r\n if(x == 16){ //stop at gg\r\n break;\r\n }\r\n }\r\n\r\n System.out.println(\"We are in the RIGHT EMAIL ADDRESS\");\r\n Thread.sleep(1000);\r\n WebElement insideEmail = driver.findElement(By.cssSelector(\".acX .aaq, .acX .bsQ\"));\r\n //driver.findElement(By.xpath(\"//*[@id=\\\":k8\\\"]/div[1]/div[2]/div[1]/table/tbody/tr[1]/td[4]/div[1]\")).click();\r\n insideEmail.click();\r\n //insideEmail.sendKeys(\"This is a test\");\r\n driver.findElement(By.cssSelector(\".aO7\")).sendKeys(\"We made it\");\r\n\r\n\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(Ebay.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n\r\n }",
"public void inputRandomEmailToTextbox() {\r\n\t\twaitElementVisible(driver, RegisterForm.EMAIL_TEXTBOX);\r\n\t\tString emailAddress = \"auto06\" + getTodayString(\"ddMMyyHHmmss\")+\"@lv.com\";\r\n\t\tsendKeyElement(driver,RegisterForm.EMAIL_TEXTBOX, emailAddress);\r\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n ip = request.getLocalAddr();\n try {\n Timestamp dataNow = GetNow();\n Timestamp dataPrec = GetDate(request.getParameter(\"email\"),response.getWriter());\n long differenza = (dataNow.getTime()-dataPrec.getTime())/1000;\n \n response.getWriter().println(differenza+\"<br>\");\n \n \n if(differenza>90){\n response.sendRedirect(\"LinkScaduto.html\");\n }\n else{\n \n char[] p = generatePswd(8, 12, 1, 1, 1); \n String password = String.valueOf(p, 0, p.length) ;\n \n String email = request.getParameter(\"email\");\n String ip = request.getLocalAddr();\n \n UpdatePassword(email,password); \n \n\n String ogget = \"Confirm change password\";\n\n String testo = \"Dear \" + email\n + \"\\n This is your new password:\"\n + \"\\n\\n \"+password;\n\n Email send = new Email();\n send.Send(email,ogget,testo);\n \n response.sendRedirect(\"LinkValido.html\");\n }\n \n } catch(IOException e) {}\n }",
"@Override\n public void failure(DigitsException exception) {\n Toast.makeText(ForgotPassword.this, \"Couldn't verify phone number\", Toast.LENGTH_SHORT).show();\n finish();\n }",
"public void recoverPassword(String vEID) {\n\t\tmyD.findElement(By.linkText(\"Forgot Password\")).click();\n\t\t\n\t\t//4\tEnter Email ID EmailID\n\t\tmyD.findElement(By.id(\"forgot_email\")).clear();\n\t\tmyD.findElement(By.id(\"forgot_email\")).sendKeys(vEmailID);\n\t\t\n\t\t//5\tClick on Recover Button\t\t\t\n\t\tmyD.findElement(By.name(\"submit\")).click();\n\t\t\n\t}",
"public static boolean validate(String submittedOTP, byte[] secret, int numDigits) throws GeneralSecurityException {\n Calendar currentDateTime = getCalendar();\n\n String generatedTOTP = TOTP.generateTOTP(new String(secret), numDigits);\n boolean result = generatedTOTP.equals(submittedOTP);\n\n if (!result) {\n // Step back time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis -= TIME_INTERVAL;\n\n String steps = \"0\";\n long T = (timeInMilis - TOTP.TIME_ZERO) / TOTP.TIME_SLICE_X;\n steps = Long.toHexString(T).toUpperCase();\n\n // Just get a 16 digit string\n while (steps.length() < 16)\n steps = \"0\" + steps;\n\n generatedTOTP = TOTP.generateTOTP(new String(secret), \"\" + steps, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n if (!result) {\n // Step ahead time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis += TIME_INTERVAL;\n\n String steps = \"0\";\n long T = (timeInMilis - TOTP.TIME_ZERO) / TOTP.TIME_SLICE_X;\n steps = Long.toHexString(T).toUpperCase();\n\n // Just get a 16 digit string\n while (steps.length() < 16)\n steps = \"0\" + steps;\n\n generatedTOTP = TOTP.generateTOTP(new String(secret), \"\" + steps, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n return result;\n }",
"@Test\n public void testCantRegisterMismatchPassword() {\n enterValuesAndClick(\"name\", \"[email protected]\", \"123456\", \"123478\");\n checkErrors(nameNoError, emailNoError, pwdsDoNotMatchError, pwdsDoNotMatchError);\n }",
"public static boolean validate512(String submittedOTP, byte[] secret, int numDigits) throws GeneralSecurityException {\n Calendar currentDateTime = getCalendar();\n\n String generatedTOTP = TOTP.generateTOTP512(new String(secret), numDigits);\n boolean result = generatedTOTP.equals(submittedOTP);\n\n if (!result) {\n // Step back time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis -= TIME_INTERVAL;\n\n generatedTOTP = TOTP.generateTOTP512(new String(secret), \"\" + timeInMilis, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n if (!result) {\n // Step ahead time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis += TIME_INTERVAL;\n\n generatedTOTP = TOTP.generateTOTP512(new String(secret), \"\" + timeInMilis, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n return result;\n }",
"@Test\n public void testOtp(){\n String secret = \"whatever is here is okay\";\n Totp totp = new Totp(secret);\n String now = totp.now();\n assertThat(totp.verify(now)).isEqualTo(true);\n }",
"@Then(\"^użytkownik wprowadza w pole hasło błędne hasło$\")\n public void użytkownik_wprowadza_w_pole_hasło_błędne_hasło() throws Throwable {\n String Zlehaslo = \"invalidinvalidinvalid\";\n driver.findElement(By.id(\"enp_customer_form_login_password\")).click();\n driver.findElement(By.id(\"enp_customer_form_login_password\")).sendKeys(Zlehaslo);\n czas(1000);\n }",
"public void verifyCodePressed(View view) {\r\n emailTo = String.valueOf(etEmail.getText());\r\n //Generate the random verify code\r\n verifyCode = (int)((Math.random() * 9 + 1) * 100000);\r\n Toast.makeText(ForgetPswActivity.this,\"Sending..... the verify code\", Toast.LENGTH_LONG).show();\r\n Thread thread = new Thread(){\r\n @Override\r\n public void run() {\r\n EmailUtil.getInstance().sendEmail(emailTo,\"Verify Code from Digital Learner Logbook\",\r\n \"DLL send a verify code: \" + verifyCode +\r\n \", This code is for reset the password only!\" );\r\n\r\n Looper.prepare();\r\n Toast.makeText(ForgetPswActivity.this,\"Sent the verify code\", Toast.LENGTH_LONG).show();\r\n Looper.loop();\r\n }\r\n };\r\n thread.start();\r\n\r\n }",
"@Override\r\n\tpublic void onFinishGetVerifyCode(int reg17FoxReturn) {\n\r\n\t\tswitch (reg17FoxReturn) {\r\n\t\tcase 103:\r\n\t\t\tdisplayRegisterResult(\"authKey出错\");\r\n\t\t\tbreak;\r\n\t\tcase 104:\r\n\t\t\tdisplayRegisterResult(\"参数不全\");\r\n\t\t\tbreak;\r\n\t\tcase 105:\r\n\t\t\tdisplayRegisterResult(\"手机格式错误\");\r\n\t\t\tbreak;\r\n\t\tcase 106:\r\n\t\t\tdisplayRegisterResult(\"此手机号已经注册\");\r\n\t\t\tbreak;\r\n\t\tcase 107:\r\n\t\t\tdisplayRegisterResult(\"此手机号不存在\");\r\n\t\t\tbreak;\r\n\t\tcase 108:\r\n\t\t\tToast.makeText(this, \"验证短信稍后发送到您手机\", Toast.LENGTH_LONG).show();\r\n\t\t\tbreak;\r\n\t\tcase 109:\r\n\t\t\tdisplayRegisterResult(\"短信发送失败\");\r\n\t\t\tbreak;\r\n\t\tcase 110:\r\n\t\t\tdisplayRegisterResult(\"短信验证码超时,请重新获取验证码\");\r\n\t\t\tbreak;\r\n\t\tcase 111:\r\n\t\t\tdisplayRegisterResult(\"短信验证码不正确\");\r\n\t\t\tbreak;\r\n\t\tcase 112:\r\n\t\t\tdisplayRegisterResult(\"短信验证通过\");\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tdisplayRegisterResult(\"服务器内部错误\");\r\n\t\t}\r\n\t\tenableYzBtnHandler.sendEmptyMessageDelayed(1, 1000);\r\n\t}",
"@Override\r\n\t\t\tpublic void done(Integer arg0, BmobException arg1) {\n\t\t\t\tif(arg1==null){//验证码发送成功\r\n\t\t \tmyHandler.sendEmptyMessageDelayed(30000, 0);\r\n\t\t }\r\n\t\t\t}",
"public static boolean validate256(String submittedOTP, byte[] secret, int numDigits) throws GeneralSecurityException {\n Calendar currentDateTime = getCalendar();\n\n String generatedTOTP = TOTP.generateTOTP256(new String(secret), numDigits);\n boolean result = generatedTOTP.equals(submittedOTP);\n\n if (!result) {\n // Step back time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis -= TIME_INTERVAL;\n\n generatedTOTP = TOTP.generateTOTP256(new String(secret), \"\" + timeInMilis, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n if (!result) {\n // Step ahead time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis += TIME_INTERVAL;\n\n generatedTOTP = TOTP.generateTOTP256(new String(secret), \"\" + timeInMilis, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n return result;\n }",
"public CaptchaIncorrectoException() {\n super(ERROR_KEY);\n }",
"@Override\n protected Boolean doInBackground(Void... params) {\n\n try {\n // Simulate network access.\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n return false;\n }\n\n /*for (String credential : DUMMY_CREDENTIALS) {\n String[] pieces = credential.split(\":\");\n if (pieces[0].equals(mEmail)) {\n // Account exists, return true if the password matches.\n return pieces[1].equals(mPassword);\n }\n }*/\n\n HostnameVerifier hostnameVerifier = org.apache.http.conn.ssl.SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER;\n\n DefaultHttpClient client = new DefaultHttpClient();\n\n SchemeRegistry registry = new SchemeRegistry();\n SSLSocketFactory socketFactory = SSLSocketFactory.getSocketFactory();\n socketFactory.setHostnameVerifier((X509HostnameVerifier) hostnameVerifier);\n registry.register(new Scheme(\"https\", socketFactory, 443));\n SingleClientConnManager mgr = new SingleClientConnManager(client.getParams(), registry);\n DefaultHttpClient httpClient = new DefaultHttpClient(mgr, client.getParams());\n\n // Set verifier\n HttpsURLConnection.setDefaultHostnameVerifier(hostnameVerifier);\n HttpPost httpPost = new HttpPost(\"https://www.chlife-stat.org/authenticate.php\");\n\n\n List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();\n\n try {\n nameValuePairs.add(new BasicNameValuePair(\"district\", mDistrict));\n nameValuePairs.add(new BasicNameValuePair(\"church_id\", mChurch_id));\n nameValuePairs.add(new BasicNameValuePair(\"account\", mAccount));\n nameValuePairs.add(new BasicNameValuePair(\"pwd\",mPassword));\n nameValuePairs.add(new BasicNameValuePair(\"captcha_code\", mCaptcha_code));\n\n httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs));\n\n Log.e(\"http response:\", httpPost.toString());\n // Execute HTTP Post Request\n HttpResponse response = httpClient.execute(httpPost);\n Log.e(\"http response headers:\", \"\");\n\n java.io.InputStream is = response.getEntity().getContent();\n java.io.BufferedReader rd = new java.io.BufferedReader(new java.io.InputStreamReader(is));\n String line;\n while ((line = rd.readLine()) != null) {\n System.out.println(line);\n }\n } catch (ClientProtocolException e) {\n Log.e(\"ClientProtocolException\",e.getMessage());\n } catch (IOException e) {\n Log.e(\"IOException\",e.getMessage());\n } catch (Error e) {\n Log.e(\"AllErrors\",e.getMessage());\n }\n\n // TODO: register the new account here.\n return true;\n }",
"public void resetForm() {\r\n\t\tfinal CTracked ctracked = UserSettings.ctracked == null ? new CTracked()\r\n\t\t\t\t: UserSettings.ctracked;\r\n\r\n\t\ttxtPassword.setValue(\"\");\r\n\t\ttxtPassword.clearInvalid();\r\n\r\n\t\ttxtPasswordConfirm.setValue(\"\");\r\n\t\ttxtPasswordConfirm.clearInvalid();\r\n\r\n\t\ttxtName.setValue(ctracked.getName() == null ? \"\" : ctracked.getName());\r\n\t\ttxtName.clearInvalid();\r\n\r\n\t\tif (ctracked.getBirthday() != null) {\r\n\t\t\tUserSettings.timerTask.getTaskList().add(new Task(2) {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void execute() {\r\n\t\t\t\t\tdateBirthday.setValue(ctracked.getBirthday());\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tdateBirthday.setValue(\"\");\r\n\t\t}\r\n\t\tdateBirthday.clearInvalid();\r\n\t\t\r\n\t\ttxtUsername.setValue(String.valueOf(ctracked.getUsername()));\r\n\r\n\r\n\t\ttxtMobilePhone.setValue(ctracked.getTel() == null ? \"\" : ctracked\r\n\t\t\t\t.getTel());\r\n\t\ttxtMobilePhone.clearInvalid();\r\n\r\n\t\ttxtEmail.setValue(ctracked.getEmail() == null ? \"\" : ctracked\r\n\t\t\t\t.getEmail());\r\n\t\ttxtEmail.clearInvalid();\r\n\r\n\t\ttxtEmailConfirm.setValue(ctracked.getEmail() == null ? \"\" : ctracked\r\n\t\t\t\t.getEmail());\r\n\t\ttxtEmailConfirm.clearInvalid();\r\n\r\n\t\tif (ctracked.getIntervalGps() != null) {\r\n\t\t\tUserSettings.timerTask.getTaskList().add(new Task(2) {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void execute() {\r\n\t\t\t\t\tcbIntervalGPS.setValue(ctracked.getIntervalGps()+\"\");\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tcbIntervalGPS.setValue(\"10\");\r\n\t\t}\r\n\t\tcbIntervalGPS.clearInvalid();\r\n\r\n\t\ttxtIconPath\r\n\t\t\t\t.setValue(ctracked.getIconPath() == null ? DEFFAULT_ICON_PATH\r\n\t\t\t\t\t\t: ctracked.getIconPath());\r\n\r\n\t\timgIcon.setUrl(txtIconPath.getText());\r\n\r\n\t\tcheckActive.setValue(ctracked.isActive() == null ? false : true);\r\n\r\n\t\tcheckEmbedded.setValue(ctracked.getEmbedded() == null ? false : true);\r\n\r\n\t\tcheckShowInMap.setValue(ctracked.getShowInMap() == null ? false : true);\r\n\r\n\t\tcbLanguage.setValue(ctracked.getLang() == null ? \"vi\" : ctracked\r\n\t\t\t\t.getLang());\r\n\t\tcbCountry.setValue(ctracked.getCountry() == null ? \"VN\" : ctracked\r\n\t\t\t\t.getCountry());\r\n\t\tcbTimeZone.setValue(ctracked.getGmt() == null ? \"7\" : ctracked.getGmt()\r\n\t\t\t\t+ \"\");\r\n\r\n\t\ttxtApiKey.setValue(ctracked.getApiKey() == null ? \"\" : ctracked\r\n\t\t\t\t.getApiKey());\r\n\r\n\t\tpostResetForm();\r\n\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\ttime=30;\n\t\t\t\tverfy_button.setEnabled(false);\n\t\t\t\thandler.postDelayed(runnable, 1000); \n\t\t\t\tinitSDK();\n\t\t\t\tSMSSDK.getVerificationCode(\"86\",textview_phone.getText().toString());\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onCodeSent(@NonNull String s, @NonNull PhoneAuthProvider.ForceResendingToken forceResendingToken) {\n super.onCodeSent(s, forceResendingToken);\n verificationId = s;\n // start showing the pin view and verify button\n Toast.makeText(MainActivity.this, \"Enter OTP to verify\", Toast.LENGTH_SHORT).show();\n OTP.setVisibility(View.VISIBLE);\n verifyButton.setVisibility(View.VISIBLE);\n }",
"@Override\r\n\tpublic void onClick(View v) {\n\t\tswitch(v.getId()){\r\n\t\t case R.id.modifypwd_ensure:\r\n\t\t \tstrNewPasswd = CEnewPasswd.getText().toString();\r\n\t\t \tstrRenewPasswd = CErenewPasswd.getText().toString();\r\n\t\t \t\r\n\t\t \tif (strOldPasswd == null || strNewPasswd == null || strRenewPasswd == null){\r\n\t\t \t\tToast.makeText(ModifyPassword.this, \"请输入密码!\", Toast.LENGTH_SHORT).show();\r\n\t\t \t\treturn;\r\n\t\t \t}\r\n\t\t \tif (!strNewPasswd.equals(strRenewPasswd)){\r\n\t\t \t\tToast.makeText(ModifyPassword.this, \"两次输入的密码不一致,请重新输入!\", Toast.LENGTH_SHORT).show();\r\n\t\t \t\treturn;\r\n\t\t \t}\r\n\t\t \tif (strOldPasswd.equals(strNewPasswd)){\r\n\t\t \t\tToast.makeText(ModifyPassword.this, \"新旧密码一样,请重新输入!\", Toast.LENGTH_SHORT).show();\r\n\t\t \t\treturn;\r\n\t\t \t}\r\n\t\t \t\r\n\t\t \tif ((strNewPasswd.length() < 6) || (strNewPasswd.length() > 16)){\r\n\t\t\t\t\tToast.makeText(ModifyPassword.this, \"密码应为6-16位字母和数字组合!\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} else{\r\n\t\t\t\t\tPattern pN = Pattern.compile(\"[0-9]{6,16}\");\r\n\t\t\t\t Matcher mN = pN.matcher(strNewPasswd);\r\n\t\t\t\t Pattern pS = Pattern.compile(\"[a-zA-Z]{6,16}\");\r\n\t\t\t\t Matcher mS = pS.matcher(strNewPasswd);\r\n\t\t\t\t if((mN.matches()) || (mS.matches())){\r\n\t\t\t\t Toast.makeText(ModifyPassword.this,\"密码应为6-16位字母和数字组合!\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t return;\r\n\t\t\t\t }\r\n\t\t\t\t}\r\n\r\n\t\t \tif (new ConnectionDetector(ModifyPassword.this).isConnectingTOInternet()) {\r\n\t\t \t\tpd = ProgressDialog.show(ModifyPassword.this, \"\", \"正在加载....\");\r\n\t\t \t\tnew RequestTask().execute();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tToast.makeText(ModifyPassword.this, \"网络连接不可用,请检查网络后再试\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t}\r\n\t\t \tbreak;\r\n\t\t case R.id.modify_pwd_back:\r\n\t\t \tstartActivity(new Intent(ModifyPassword.this, ShowUserMessage.class));\r\n\t\t \tthis.finish();\r\n\t\t \tbreak;\r\n\t\t default:\r\n\t\t \tbreak;\r\n\t\t}\r\n\t}",
"void clear()\n {\n captcha.reset();\n requestToken.setEnabled(false);\n username.setValue(\"\");\n greeting.setValue(\"\");\n token.setValue(\"\");\n newPassword.setValue(\"\");\n newPasswordRepeat.setValue(\"\");\n show(REQUEST_TOKEN);\n }",
"public void v_Verify_Guest3_Hidden(){\n\t}",
"public void v_Verify_Guest2_Hidden(){\n\t}",
"@Test\r\n\tpublic void verification(){\n\t\tdriver.findElement(By.className(\"button block\")).click();\r\n\t\t\r\n\t\t//open a new tab\r\n\t\tdriver.findElement(By.cssSelector(\"body\")).sendKeys(Keys.CONTROL +\"t\");\r\n\t\t\r\n\t\t//switch to new tab\r\n\t\tArrayList<String> tabs = new ArrayList<String>(driver.getWindowHandles());\r\n\t\tdriver.switchTo().window(tabs.get(1));\r\n\t driver.get(\"https://www.textnow.com/login\");\r\n\t driver.findElement(By.id(\"loginUsername\")).sendKeys(\"elaineren\");\r\n\t driver.findElement(By.id(\"loginPassword\")).sendKeys(\"5691219-kk\");\r\n\t driver.findElement(By.id(\"submitLogin\")).click();\r\n\t \r\n\t String scode=driver.findElement(By.id(\"new\")).getText();\r\n\t System.out.println(scode);\r\n\t \r\n\t driver.findElement(By.linkText(\"Log Out\"));\r\n\t \r\n\t driver.switchTo().window(tabs.get(0));\r\n\t}",
"public void testOtacTooLong()\n {\n form.setVerificationCode(\"123456789\");\n validator.validate(form, errors);\n assertTrue(errors.hasErrors());\n }",
"public void v_Verify_Guest8_Hidden(){\n\t}",
"@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t\tMobclickAgent.onPageEnd(\"获取验证码\");\r\n\t}",
"private void sendVerificationCode(String phone_number){\n Log.d(TAG, \"sendVerificationCode: SENDING OTP\");\n progressBar.setVisibility(View.VISIBLE);\n PhoneAuthProvider.getInstance().verifyPhoneNumber(\n phone_number,\n 60,\n TimeUnit.SECONDS,\n TaskExecutors.MAIN_THREAD,\n mCallBack\n );\n }",
"private void forgotPassword(final String usertext){\n\n // Tag used to cancel the request\n String cancel_req_tag = \"register\";\n progressbar.setVisibility(View.VISIBLE);\n\n\n StringRequest strReq = new StringRequest(Request.Method.POST, APIURLS.FORGOT_PASSWORD, new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response) {\n Log.e(\"TAG\", \"forgotpassword Response: \" + response.toString());\n //hideDialog();\n progressbar.setVisibility(View.GONE);\n try {\n JSONObject jObj = new JSONObject(response);\n Log.e(\"TAG\", \"json objec is \" + jObj);\n boolean error = jObj.getBoolean(\"error\");\n\n if (!error) {\n String mesage = jObj.getString(\"msg\");\n if (mesage.contains(\"Verification Code\")){\n final String code = jObj.getString(\"code\");\n final Dialog dialog = new Dialog(LoginActivity.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.forgot_password_code);\n final EditText et_verification_code = (EditText) dialog.findViewById(R.id.et_verification_code);\n final Button bt_submit_for_forgot_pass = (Button) dialog.findViewById(R.id.bt_submit_for_forgot_pass);\n bt_submit_for_forgot_pass.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n String mCode = et_verification_code.getText().toString();\n\n Log.e(\"Tag\", \"the code is here \" + mCode);\n\n if (mCode.length()==0)\n {\n et_verification_code.setError(\"Should not be empty\");\n }\n else if (!mCode.matches(code))\n {\n et_verification_code.setError(\"Code Not Match\");\n }\n else {\n dialog.dismiss();\n dialogSettingNewPassword(usertext);\n }\n }\n });\n\n dialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimationTooDouen;\n dialog.show();\n }\n\n } else {\n String errorMsg = jObj.getString(\"msg\");\n Toast.makeText(getApplicationContext(), errorMsg, Toast.LENGTH_LONG).show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"TAG\", \"Registration Error: \" + error.getMessage());\n Toast.makeText(getApplicationContext(),\n error.getMessage(), Toast.LENGTH_LONG).show();\n //hideDialog();\n progressbar.setVisibility(View.GONE);\n }\n }) {\n\n @Override\n protected Map<String, String> getParams() {\n // Posting params to register url\n\n Map<String, String> params = new HashMap<String, String>();\n\n params.put(\"usercredentials\", usertext);\n\n return params;\n }\n };\n\n strReq.setRetryPolicy(new DefaultRetryPolicy(\n 20000,\n DefaultRetryPolicy.DEFAULT_MAX_RETRIES,\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\n\n // Adding request to request queue\n AppSingleton.getInstance(getApplicationContext()).addToRequestQueue(strReq, cancel_req_tag);\n }",
"public void validateAnswers(final String ans1, final String ans2, final String ans3, final String newpass1, final String newpass2) {\n RequestQueue queue = Volley.newRequestQueue(this);\n String url = \"http://\" + Config.getWebServerURL(this) + \"/validateanswers\";\n StringRequest stringRequest = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n startActivity(new Intent(ForgotPassword.this, LoginScreen.class));\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n txtNewPass1.requestFocus();\n txtNewPass1.setError(\"Answers do not match our records, try again\");\n }\n }) {\n protected Map<String, String> getParams() {\n Map<String, String> data = new HashMap<String, String>();\n data.put(\"email\", userEmail);\n data.put(\"answer1\", ans1);\n data.put(\"answer2\", ans2);\n data.put(\"answer3\", ans3);\n data.put(\"newpassword\", newpass1);\n data.put(\"passwordcheck\", newpass2);\n return data;\n }\n };\n queue.add(stringRequest);\n }",
"public void pass1()throws Exception\r\n { \r\n guiframe g=new guiframe();\r\n g.setSize(400,400);\r\n g.setTitle(\"Authentication A\");\r\n g.setVisible(true);\r\n \r\n \r\n \r\n \r\n \r\n /*Scanner s =new Scanner(System.in);\r\n System.out.println(\"Enter the Password:\");\r\n String str=s.nextLine();\r\n DateFormat df=new SimpleDateFormat(\"HH:mm\");\r\n Date d=new Date();\r\n String time=df.format(d);\r\n StringBuffer t1=new StringBuffer(time);\r\n t1=t1.deleteCharAt(2);\r\n time=t1.toString();\r\n System.out.println(t1);\r\n \r\n if(str.equals(time))\r\n System.out.println(\"Access Granted\");\r\n else\r\n System.out.println(\"Access Denied\");*/\r\n }",
"public final void arJ() {\n this.gHW = arl();\n this.gHX = arm();\n if (!C5046bo.isNullOrNil(this.gHW)) {\n if (!this.gHW.equals(this.gHX)) {\n mo53562a(C18796a.TwoPasswordsNotMatch);\n } else if (this.gHW.length() > 16) {\n mo53562a(C18796a.BeyondMaximumLength);\n } else if (C5046bo.amT(this.gHW)) {\n C30379h.m48467g(this, C25738R.string.dkt, C25738R.string.dln);\n } else if (C5046bo.amY(this.gHW)) {\n aqX();\n final C1207m ark = ark();\n C1720g.m3540Rg().mo14541a(ark, 0);\n getString(C25738R.string.f9238tz);\n this.ehJ = mo53561a(this, getString(C25738R.string.dju), new OnCancelListener() {\n public final void onCancel(DialogInterface dialogInterface) {\n AppMethodBeat.m2504i(125566);\n C1720g.m3540Rg().mo14547c(ark);\n AppMethodBeat.m2505o(125566);\n }\n });\n if (aru() && !this.gHY) {\n C4990ab.m7410d(\"MicroMsg.SetPwdUI\", \"cpan settpassword cancel 11868 0\");\n C7060h.pYm.mo8381e(11868, Integer.valueOf(0));\n }\n } else if (this.gHW.length() < 8 || this.gHW.length() >= 16) {\n mo53562a(C18796a.NotReachMinimumLength);\n } else {\n mo53562a(C18796a.DisallowShortNumericPassword);\n }\n }\n }",
"public List<String> passwordMessageValidations() {\n name.sendKeys(\"Karan Prinja\");\n email.sendKeys(\"[email protected]\");\n password.sendKeys(\"12345678\");\n helperMethods.waitForWebElement(smallPassword, 30);\n String sosoPassword = smallPassword.getText();\n password.clear();\n password.sendKeys(\"Randomer12345678\");\n helperMethods.waitForWebElement(smallPassword, 30);\n String goodPassword = smallPassword.getText();\n List<String> passwordValidationText = new ArrayList<>();\n passwordValidationText.add(sosoPassword);\n passwordValidationText.add(goodPassword);\n return passwordValidationText;\n }",
"boolean validate(String name, String email, String password)\n {\n //Check if the name is empty and password field is 8 characters long, also including email check\n if(name.isEmpty() || !rfc2822.matcher(email).matches() || (password.length() < 8))\n {\n Toast.makeText(this, \"Please enter your name and email. Ensure password is more than 8 characters long!\", Toast.LENGTH_SHORT).show();\n\n //reset TextEdits\n eRegName.setText(null);\n eRegEmail.setText(null);\n eRegPassword.setText(null);\n\n return false;\n }\n return true;\n }",
"public void v_Verify_Guest12_Hidden(){\n\t}",
"public void v_Verify_Guest4_Hidden(){\n\t}",
"@Override\n public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {\n String code = phoneAuthCredential.getSmsCode();\n\n Toast.makeText(OTPActivity.this, \"Reached here\", Toast.LENGTH_SHORT).show();\n\n //sometime the code is not detected automatically\n //in this case the code will be null\n //so user has to manually enter the code\n if (code != null) {\n loading.setVisibility(View.VISIBLE);\n etOtp.setText(code);\n etOtp.setEnabled(false);\n Toast.makeText(OTPActivity.this, \"Reached here\", Toast.LENGTH_SHORT).show();\n //verifying the code\n verifyVerificationCode(code);\n }\n }",
"@Test\n\tpublic void savePasswordReplayAttackTest() throws RemoteException, NoSuchAlgorithmException, InvalidKeySpecException, IOException, InvalidKeyException, SignatureException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, UnrecoverableKeyException, KeyStoreException, CertificateException {\n\t\tPasswordManager pm = new PasswordManager(8080);\n\t\tString responseRegister = pm.registerUser(byteToString(cliPubKey.getEncoded()), \n\t\t\t\tDigitalSignature.getSignature(cliPubKey.getEncoded(),cliPrivKey));\n\n\t\t// Set global variables for Secret Key and Server Public Key based on the register\n\t\tbyte[] secretKeyByte = RSAMethods.decipher(responseRegister.split(\"-\")[2], cliPrivKey);\n\t\tString secretKeyStr = new String(secretKeyByte, \"UTF-8\");\n\t\tsecretKey = new SecretKeySpec(stringToByte(secretKeyStr), 0, stringToByte(secretKeyStr).length, \"HmacMD5\");\n\t\tservPubKey = getServerPublicKey(responseRegister.split(\"-\")[0]);\n\t\t\n\t\t// Simulate the request from client\n\t\tString domain = \"facebook\";\n\t\tString username = \"test\";\n\t\tString password = \"123aBc456\";\n\t\tint seqNum = 0;\n\t\tString msg = messageToSend(domain,username,password,\"0\",seqNum);\n\t\t\n\t\t// Simulate a Replay Attack by sending the same message twice\n\t\tpm.savePassword(msg);\n\t\tString saveResponse2 = pm.savePassword(msg.toString()); // Replay attack by sending msg twice\n\t\t\n\t\t// Check the way server deals with freshness of messages\n\t\tbyte[] responseTest = RSAMethods.decipher(saveResponse2.split(\"-\")[0],cliPrivKey);\n\t\tString responseTestStr = new String(responseTest, \"UTF-8\");\n\t\tAssert.assertEquals(\"Error\", responseTestStr);\n\t}",
"private void sendVerificationCode() {\n\n PhoneAuthProvider.getInstance().verifyPhoneNumber(\n \"+91\" + phoneNumber, // Phone number to verify\n 60, // Timeout and unit\n TimeUnit.SECONDS,\n this,\n mCallbacks\n );\n }",
"public void reSend(View view)\n {\n try{\n if (AppUtils.isNetworkAvailable(this)) {\n new ForgotPassword(username).execute();\n }//end of network if\n else\n {\n appsingleton.SnackbarMessage(getResources().getString(R.string.st_internet_error),\"\",et_username);\n }\n }catch(Exception e){\n e.printStackTrace();\n appsingleton.ToastMessage(\"\" + e.getMessage());\n }\n }",
"public static void enterCaptcha(WebElement captchaField) {\n\t\tString captchaVal = JOptionPane.showInputDialog(\"Please enter the captcha value:\");\n\t\tSystem.out.println(captchaVal);\n\t\t// Type the entered captcha to the text box\n\t\tcaptchaField.sendKeys(captchaVal);\n\t}",
"private void btnancSave1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnancSave1MouseClicked\n // TODO add your handling code here:\n \n String status = null;\n try {\n status = validateCode(txtsenderEmail.getText(), \n txtVerificationCode1.getText());\n } catch (IOException ex) {\n Logger.getLogger(ForgetPassword.class.getName()).log(Level.SEVERE, \n null, ex);\n }\n \n if (status == \"success\") {\n resetPassword r = new resetPassword(txtsenderEmail.getText());\n r.setVisible(true);\n searchCode.removeAll(searchCode);\n txtsenderEmail.setText(\"\");\n txtVerificationCode1.setText(\"\");\n this.hide();\n\n } else {\n JOptionPane.showMessageDialog(this, \"Varification code not match\", \n \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"private void checkValidation() {\n // Get email id and password\n MainActivity.EmailAddress = emailid.getText().toString();\n finalPassword = password.getText().toString();\n\n // Check patter for email id\n Pattern p = Pattern.compile(Utils.regEx);\n\n Matcher m = p.matcher(MainActivity.EmailAddress);\n\n // Check for both field is empty or not\n if (MainActivity.EmailAddress.equals(\"\") || MainActivity.EmailAddress.length() == 0\n || finalPassword.equals(\"\") || finalPassword.length() == 0) {\n loginLayout.startAnimation(shakeAnimation);\n new CustomToast().Show_Toast(getActivity(), view,\n \"Enter both credentials.\");\n\n }\n // Check if email id is valid or not\n else if (!m.find())\n new CustomToast().Show_Toast(getActivity(), view,\n \"Your Email Id is Invalid.\");\n // Else do login and do your stuff\n else\n tryLoginUser();\n\n }",
"public void v_Verify_Guest9_Hidden(){\n\t}",
"private boolean validateForm() {\n Boolean validFlag = true;\n String email = emailTxt.getText().toString().trim();\n String name = nameTxt.getText().toString().trim();\n String phone = phoneTxt.getText().toString().trim();\n String password = passwordTxt.getText().toString();\n String confirPassWord = confirmPasswordTxt.getText().toString();\n\n Pattern emailP = Pattern.compile(\"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\\\.[A-Z]{2,6}$\", Pattern.CASE_INSENSITIVE);\n Matcher emailM = emailP.matcher(email);\n boolean emailB = emailM.find();\n\n if (TextUtils.isEmpty(email) || email.equals(\"\") || !emailB) {\n emailTxt.setError(\"Email bị để trống hoặc không dúng định dạng.\");\n validFlag = false;\n } else {\n emailTxt.setError(null);\n }\n\n if (TextUtils.isEmpty(password) || password.length() < 6) {\n passwordTxt.setError(\"Mật khẩu phải 6 ký tự trở lên\");\n validFlag = false;\n } else {\n passwordTxt.setError(null);\n }\n\n Pattern phoneP = Pattern.compile(\"[0-9]{8,15}$\");\n Matcher phoneM = phoneP.matcher(phone);\n boolean phoneB = phoneM.find();\n\n if (TextUtils.isEmpty(phone) || phone.length() < 8 || phone.length() > 15 || !phoneB) {\n phoneTxt.setError(\"Số điện thoại bị để trống hoặc không đúng định dạng\");\n validFlag = false;\n } else {\n phoneTxt.setError(null);\n }\n if (confirPassWord.length() < 6 || !confirPassWord.equals(password)) {\n confirmPasswordTxt.setError(\"Xác nhận mật khẩu không đúng\");\n validFlag = false;\n } else {\n confirmPasswordTxt.setError(null);\n }\n\n Pattern p = Pattern.compile(\"[0-9]\", Pattern.CASE_INSENSITIVE);\n Matcher m = p.matcher(name);\n boolean b = m.find();\n if (b) {\n nameTxt.setError(\"Tên tồn tại ký tự đặc biệt\");\n validFlag = false;\n } else {\n nameTxt.setError(null);\n }\n if (TextUtils.isEmpty(name)) {\n nameTxt.setError(\"Không được để trống tên.\");\n validFlag = false;\n } else {\n nameTxt.setError(null);\n }\n\n return validFlag;\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/plain;charset=UTF-8\");\n Date date = new Date();\n String email = request.getParameter(\"email\");\n boolean valido = false;\n UtenteQueries uq = new UtenteQueries(manager);\n try {\n valido = uq.emailValida(email);\n } catch (SQLException ex) {\n \n }\n if(valido){\n Timestamp time = new Timestamp(date.getTime());\n String timestamp = time.toString();\n MessageDigest md = null;\n try {\n md = MessageDigest.getInstance(\"MD5\");\n } catch (NoSuchAlgorithmException ex) {\n //\n }\n md.update((email + timestamp).getBytes());\n byte[] md5 = md.digest();\n StringBuffer sb = new StringBuffer();\n for (byte b : md5) {\n sb.append(String.format(\"%02x\", b & 0xff));\n }\n String md5Str = sb.toString();\n PasswordRecoveryQueries prq = new PasswordRecoveryQueries(manager);\n try {\n PasswordRecovery pr = new PasswordRecovery();\n pr.setHash(md5Str);\n pr.setEmail(email);\n pr.setTime(time);\n prq.insertRecuperaPassword(pr);\n MailSender instance = new MailSender();\n try {\n instance.changePassword(email, \"http://localhost:8084/Multisala/password-recovery.html?key=\" + md5Str);\n response.getWriter().println(\"success\");\n } catch (MessagingException ex) {\n response.getWriter().println(\"fail\");\n }\n } catch (SQLException ex) {\n response.getWriter().println(\"fail\");\n }\n }else\n response.getWriter().println(\"noemail\"); \n }",
"@Test\n public void incorrectUsernameIncorrectPasswordTest(){\n WebElement userField = driver.findElement(By.name(\"user\"));\n WebElement passwordField = driver.findElement(By.name(\"passwd\"));\n WebElement submitbutton = driver.findElement(By.className(\"submit\"));\n\n userField.sendKeys(Constants.REDDIT_INVALID_ACCT);\n passwordField.sendKeys(Constants.REDDIT_INVALID_PASS);\n submitbutton.click();\n\n WebDriverWait w = new WebDriverWait(driver, 10);\n\n assertTrue(submitbutton.isDisplayed());\n }",
"public String Login_by_entering_credentials_which_do_not_exsist() {\n\temailtextbox.sendKeys(\"User\"+random.nextInt(100000)+\"@gmail.com\");\n\tpasswordtextbox.sendKeys(\"password\"+random.nextInt(100000));\n\tLoginButton.click();\n\twait.TextToBe_Wait(\"//div[text()='Invalid Email or Password']\", \"Invalid Email or Password\");\n\tString text=ErrorMessage.getText();\n\treturn text;\n\t}",
"private void CustCheckLogin() {\n\t\tLoggingUtil.trace(\"Customer log in\");\n\t\tinput = new Scanner(System.in);\n\t\tSystem.out.println(\"Customer Login Page\");\n\t\tString email;\tString pass;\t\n\t\tint i=0;//counter from tries\n\t do { System.out.println(\"Email: \");\n\t\tSystem.out.print(\">>>>>\");email=input.nextLine(); c.setUsername(email);\n\t\tif(email.isEmpty()) {System.out.println(\"\\n\\nNo Dont put empty email\"); break; }\n\t\tSystem.out.println(\"Passowrd\");\n\t\tSystem.out.print(\">>>>>\");pass=input.nextLine();\n\t i++; \n\t if (s.checkUserCust(email, pass)==false) {\n\t \tSystem.out.println(\"Invalid Username or Pass\"); \n\t \tSystem.out.println(i);\n\t }\n\t else { cs.choosechoice();// go to customer screen\n\t \t break; }\t \n\t }while(i<4);\n\t ms.pageoneScreen();\n\t}",
"public void v_Verify_Guest5_Hidden(){\n\t}",
"@Test(timeout = 4000)\n public void test08() throws Throwable {\n InetAddress inetAddress0 = MockInetAddress.anyLocalAddress();\n UsernamePasswordToken usernamePasswordToken0 = new UsernamePasswordToken(\"~8NJRz,KAHG!|q6U\", \"Q\", inetAddress0);\n usernamePasswordToken0.getInetAddress();\n String string0 = usernamePasswordToken0.toString();\n assertEquals(\"org.jsecurity.authc.UsernamePasswordToken - ~8NJRz,KAHG!|q6U, rememberMe=false (/192.168.1.42)\", string0);\n \n usernamePasswordToken0.clear();\n usernamePasswordToken0.isRememberMe();\n usernamePasswordToken0.getUsername();\n char[] charArray0 = new char[0];\n usernamePasswordToken0.setPassword(charArray0);\n String string1 = usernamePasswordToken0.toString();\n assertEquals(\"org.jsecurity.authc.UsernamePasswordToken - null, rememberMe=false\", string1);\n \n usernamePasswordToken0.getUsername();\n assertFalse(usernamePasswordToken0.isRememberMe());\n }",
"public void test8(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getParameter(\"domain\"));\n\n if(addr.getCanonicalHostName().endsWith(\"trustme.com\")){ /* BUG */\n\n }\n }",
"public void v_Verify_Guest6_Hidden(){\n\t}",
"@Override\r\n public void onFailure(Call call, IOException e) {\n closeNetworkCacheCardView();\r\n showErrorCardView(ACCESS_TIMEOUT);\r\n lockPayNowOrHavePayButton(ACCESS_TIMEOUT);\r\n }",
"public void verifyOTP() {\n HashMap<String, String> commonParams = new CommonParams.Builder()\n .add(AppConstant.KEY_COUNTRY_CODE, mCountryCode)\n .add(AppConstant.KEY_PHONE, mPhoneno)\n .add(AppConstant.KEY_OTP, mOTP).build().getMap();\n ApiInterface apiInterface = RestClient.getApiInterface();\n apiInterface.userVerifyOTP(\"bearer\" + \" \" + CommonData.getAccessToken(), commonParams)\n .enqueue(new ResponseResolver<CommonResponse>(OtpActivity.this, true, true) {\n @Override\n public void success(final CommonResponse commonResponse) {\n Log.d(\"debug\", commonResponse.getMessage());\n\n }\n\n @Override\n public void failure(final APIError error) {\n Log.d(\"debug\", error.getMessage());\n\n }\n });\n }",
"private void scanTicket(){\r\n\t\ttext = numberField.getText();\r\n\t\t//Number field text is converted into char \r\n\t\tstringToChar(text);\r\n\t\tif(executed == false){\r\n\t\t\trandom();\r\n\t\t}\r\n\t}",
"public final C5862cv mo12409a() {\n int i = 1;\n AppMethodBeat.m2504i(98676);\n this.f15292m = System.currentTimeMillis();\n this.f1552p = SystemClock.elapsedRealtime();\n this.f1549E.f1563a = this.f1552p;\n this.f1559w = new C5862cv(0, \"\", 0);\n try {\n C5862cv c5862cv;\n if (m9025c()) {\n c5862cv = this.f1559w;\n m9026d();\n this.f1552p = SystemClock.elapsedRealtime() - this.f1552p;\n this.f1549E.mo12412a();\n if (!(this.f1559w.f1540a == 0 || !C31029ce.m49853h() || this.f1559w.f1540a == -20)) {\n if (C24362a.m37665a(\"direct_fail_to_report_dns_ip\", 0, 1, 0) != 1) {\n i = 0;\n }\n if (i != 0) {\n this.f1548D = C24373eu.m37744c(this.f1560x);\n }\n }\n AppMethodBeat.m2505o(98676);\n return c5862cv;\n }\n HttpURLConnection httpURLConnection;\n URL url = new URL(this.f15281b);\n this.f1561y = url.getProtocol().toLowerCase().startsWith(\"https\");\n this.f1562z = C24373eu.m37746d(url.getHost());\n if (this.f1561y) {\n if (!this.f1553q || C31029ce.m49856k() == null) {\n HttpsURLConnection httpURLConnection2 = (HttpsURLConnection) url.openConnection();\n } else {\n httpURLConnection2 = (HttpsURLConnection) url.openConnection(C31029ce.m49856k());\n }\n if (this.f1562z) {\n this.f1551G = new C5861cu(this.f1560x);\n httpURLConnection2.setSSLSocketFactory(this.f1551G);\n httpURLConnection2.setHostnameVerifier(new C5860ct(this.f1560x));\n }\n } else {\n httpURLConnection2 = (!this.f1553q || C31029ce.m49856k() == null) ? (HttpURLConnection) url.openConnection() : (HttpURLConnection) url.openConnection(C31029ce.m49856k());\n }\n this.f1556t = httpURLConnection2;\n this.f1556t.setRequestMethod(this.f15282c ? \"GET\" : \"POST\");\n this.f1556t.setConnectTimeout(this.f15285f);\n this.f1556t.setReadTimeout(this.f15285f);\n this.f1556t.setUseCaches(false);\n this.f1556t.setDoInput(true);\n this.f1556t.setInstanceFollowRedirects(false);\n m9024b();\n if (!(this.f15282c || C24373eu.m37739a(this.f15284e))) {\n this.f1556t.setDoOutput(true);\n this.f1547C = (long) this.f15284e.length;\n }\n this.f1549E.f1564b = SystemClock.elapsedRealtime();\n this.f1556t.connect();\n this.f1549E.f1565c = SystemClock.elapsedRealtime();\n if (m9025c()) {\n c5862cv = this.f1559w;\n m9026d();\n this.f1552p = SystemClock.elapsedRealtime() - this.f1552p;\n this.f1549E.mo12412a();\n if (!(this.f1559w.f1540a == 0 || !C31029ce.m49853h() || this.f1559w.f1540a == -20)) {\n if (C24362a.m37665a(\"direct_fail_to_report_dns_ip\", 0, 1, 0) != 1) {\n i = 0;\n }\n if (i != 0) {\n this.f1548D = C24373eu.m37744c(this.f1560x);\n }\n }\n AppMethodBeat.m2505o(98676);\n return c5862cv;\n }\n if (!(this.f15282c || C24373eu.m37739a(this.f15284e))) {\n this.f1557u = new DataOutputStream(this.f1556t.getOutputStream());\n this.f1557u.write(this.f15284e);\n this.f1557u.flush();\n }\n this.f1549E.f1566d = SystemClock.elapsedRealtime();\n int responseCode = this.f1556t.getResponseCode();\n this.f1549E.f1567e = SystemClock.elapsedRealtime();\n this.f1559w.f1542c = responseCode;\n this.f1545A = this.f1556t.getContentType();\n Map hashMap = new HashMap();\n for (Entry entry : this.f1556t.getHeaderFields().entrySet()) {\n if (entry.getKey() != null) {\n hashMap.put(entry.getKey(), ((List) entry.getValue()).get(0));\n }\n }\n this.f1559w.mo12407a(hashMap);\n if (this.f1559w.f1542c >= 200 && this.f1559w.f1542c < 300) {\n this.f1546B = this.f1556t.getContentLength();\n responseCode = C24362a.m37665a(\"app_receive_pack_size\", (int) SQLiteGlobal.journalSizeLimit, 10485760, 2097152);\n if (this.f1546B < 0) {\n m9023a(responseCode);\n } else if (this.f1546B == 0) {\n this.f1559w.f1543d = new byte[0];\n this.f1549E.f1568f = SystemClock.elapsedRealtime();\n } else if (this.f1546B > responseCode) {\n this.f1559w.f1540a = -303;\n this.f1559w.f1541b = this.f1546B;\n } else {\n try {\n byte[] bArr = new byte[this.f1546B];\n this.f1558v = new DataInputStream(this.f1556t.getInputStream());\n this.f1558v.readFully(bArr);\n this.f1559w.f1543d = bArr;\n this.f1549E.f1568f = SystemClock.elapsedRealtime();\n } catch (OutOfMemoryError e) {\n this.f1559w.f1540a = -306;\n this.f1559w.f1541b = this.f1546B;\n }\n }\n } else if (this.f1559w.f1542c >= 300 && this.f1559w.f1542c < 400) {\n this.f15287h = this.f1559w.mo12406a(C8741b.LOCATION);\n }\n m9026d();\n this.f1552p = SystemClock.elapsedRealtime() - this.f1552p;\n this.f1549E.mo12412a();\n if (!(this.f1559w.f1540a == 0 || !C31029ce.m49853h() || this.f1559w.f1540a == -20)) {\n if (C24362a.m37665a(\"direct_fail_to_report_dns_ip\", 0, 1, 0) != 1) {\n i = 0;\n }\n if (i != 0) {\n this.f1548D = C24373eu.m37744c(this.f1560x);\n }\n }\n c5862cv = this.f1559w;\n AppMethodBeat.m2505o(98676);\n return c5862cv;\n } catch (MalformedURLException e2) {\n this.f1559w.f1540a = -300;\n m9026d();\n this.f1552p = SystemClock.elapsedRealtime() - this.f1552p;\n this.f1549E.mo12412a();\n if (!(this.f1559w.f1540a == 0 || !C31029ce.m49853h() || this.f1559w.f1540a == -20)) {\n if (C24362a.m37665a(\"direct_fail_to_report_dns_ip\", 0, 1, 0) != 1) {\n i = 0;\n }\n if (i != 0) {\n this.f1548D = C24373eu.m37744c(this.f1560x);\n }\n }\n } catch (Throwable th) {\n m9026d();\n this.f1552p = SystemClock.elapsedRealtime() - this.f1552p;\n this.f1549E.mo12412a();\n if (!(this.f1559w.f1540a == 0 || !C31029ce.m49853h() || this.f1559w.f1540a == -20)) {\n if (C24362a.m37665a(\"direct_fail_to_report_dns_ip\", 0, 1, 0) != 1) {\n i = 0;\n }\n if (i != 0) {\n this.f1548D = C24373eu.m37744c(this.f1560x);\n }\n }\n AppMethodBeat.m2505o(98676);\n }\n }",
"public void setVerificationCode(String OTP) {\n\t\thelper.findElementById(otpFieldId).sendKeys(OTP);\n\t}",
"@Override\n public boolean valida() {\n mediatorCredito m = new mediatorCredito();\n try{\n BigInteger dit = new BigInteger(JOptionPane.showInputDialog(null,\"Digite su número de \"\n + \"tarjeta de crédito\",\"\"));\n String pag = JOptionPane.showInputDialog(null,\"Ingrese su medio de pago: (Visa, master Card\"\n + \", American Express)\",\"\");\n if(m.verificarForm(dit, pag)==false){\n JOptionPane.showMessageDialog(null,\"ups, el medio de pago o la tarjeta de crédito no es válido\"\n ,\"Error\",0);\n }\n return m.verificarForm(dit, pag);\n \n }catch(Exception e){\n JOptionPane.showMessageDialog(null,\"Acción cancelada\",\"Advertencia\",2);\n return false;\n }\n }"
]
| [
"0.6244922",
"0.5979733",
"0.58348304",
"0.58192337",
"0.57528645",
"0.5721095",
"0.56280833",
"0.55104834",
"0.5501014",
"0.54174936",
"0.534753",
"0.52118677",
"0.5206154",
"0.5173637",
"0.50519013",
"0.50346607",
"0.5028519",
"0.5021428",
"0.50149906",
"0.50108373",
"0.49955052",
"0.4981884",
"0.49632594",
"0.49588943",
"0.49476653",
"0.49113652",
"0.48888722",
"0.48744965",
"0.4866637",
"0.48635885",
"0.48514304",
"0.4836489",
"0.4834553",
"0.47817385",
"0.47600228",
"0.4753364",
"0.47522968",
"0.47507524",
"0.47500315",
"0.47351074",
"0.4732888",
"0.47320265",
"0.47238222",
"0.4711993",
"0.47096074",
"0.47092214",
"0.47089925",
"0.47051358",
"0.47039983",
"0.46701765",
"0.46604228",
"0.4657506",
"0.4648744",
"0.46390274",
"0.4636201",
"0.46172437",
"0.46127886",
"0.46039048",
"0.45908582",
"0.45899364",
"0.45896536",
"0.45708105",
"0.45576993",
"0.45559096",
"0.45508128",
"0.45454538",
"0.45440647",
"0.45417204",
"0.4539187",
"0.4538533",
"0.4538423",
"0.4516275",
"0.4514351",
"0.45109773",
"0.4506427",
"0.44977447",
"0.44927406",
"0.44907308",
"0.44877917",
"0.448611",
"0.44846064",
"0.44809037",
"0.44791824",
"0.44758856",
"0.44739628",
"0.44738266",
"0.4463973",
"0.4456089",
"0.44556203",
"0.44466913",
"0.44458044",
"0.44412118",
"0.44396138",
"0.44390368",
"0.44374162",
"0.44309196",
"0.4430269",
"0.44292444",
"0.4428711",
"0.44282547",
"0.4428237"
]
| 0.0 | -1 |
captcha expired, wrong city | @Override
public boolean matches(Object list) {
return ((List<String>) list).size() == 2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Captcha() {\n value = generateCaptchaCode();\n id = generateCaptchaID();\n date = System.currentTimeMillis();\n }",
"public void msjereCaptcha(){\r\n click(esperarElementoPresenteEnPagina(locatorMsjeCaptcha));\r\n }",
"@Override\n public boolean validDefaultTime(String code) {\n return kaptcha.validate(code);\n }",
"@Test(dependsOnMethods = {\"register\"})\n void confirmEmailAddressByCaptcha() {\n common.findWebElementByXpath(\"//*[@id=\\\"content\\\"]/fieldset/label/div\").click();\n\n //Click on Send captcha button\n common.timeoutSeconds(2);\n common.findWebElementById(\"send-captcha-button\").click();\n\n //No magic code is set\n common.verifyStatusMessage(\"Det uppstod ett problem med verifieringen av att du är en människa. \" +\n \"Var god försök igen.\");\n }",
"void setCaptcha(ICaptcha captcha);",
"public static String captcha(){\n\t\tString captcha=\"\";\n\t\tfor(int i=0; i<8; i+=2){\n\t\t\tcaptcha+=(char)(65+Math.random()*26)+\" \";\n\t\t\tcaptcha+=(char)(97+Math.random()*26);\n\t\t}\n\t\treturn captcha;\n\n\t}",
"public String getCaptchaCode() {\n HttpGet httpget = new HttpGet(HttpURL.getCaptchaURL());\n try {\n HttpEntity entity = this.client.execute(httpget).getEntity();\n\n if (entity != null) {\n InputStream is = entity.getContent();\n File captchaImage = new File(CaptchaOCR.CAPTCHA_IMAGE_PATH);\n OutputStream os = new FileOutputStream(captchaImage);\n IOUtils.copy(is, os);\n IOUtils.closeQuietly(is);\n IOUtils.closeQuietly(os);\n }\n EntityUtils.consume(entity);\n return CaptchaOCR.doOcr();\n } catch (ClientProtocolException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return null;\n }",
"@Override\r\n public void onClick(View arg0) {\n if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n\r\n //Chaptcha dialog\r\n captchaDialog = new Dialog(CreateAccount.this);\r\n captchaDialog.setContentView(R.layout.captcha_dialog);\r\n captchaDialog.setTitle(\"Please enter captcha\");\r\n\r\n reCaptcha = (ReCaptcha) captchaDialog.findViewById(R.id.recaptcha);\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n\r\n chaptchaAnswer = (EditText) captchaDialog.findViewById(R.id.answer);\r\n\r\n Button captchaVerify = (Button) captchaDialog.findViewById(R.id.verify);\r\n captchaVerify.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n //dialog.dismiss();\r\n reCaptcha.verifyAnswerAsync(\"6LfhQwsTAAAAALJvjUqiurjAdzi4dztuUIGq-NyZ\", chaptchaAnswer.getText().toString(), CreateAccount.this);\r\n }\r\n });\r\n Button captchaReload = (Button) captchaDialog.findViewById(R.id.reload);\r\n captchaReload.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n }\r\n });\r\n captchaDialog.show();\r\n\r\n } else if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n email.setError(\"Invalid e-mail\");\r\n }\r\n }",
"private URL resolveRecaptcha(CharSequence content) {\n\t\treturn null;\n\t}",
"@Override\n public void timerExpired() {\n //Inform the player they have failed\n if (isEnglish) {\n Toast.makeText(this, LOSS, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, LOSS_CHINESE, Toast.LENGTH_SHORT).show();\n }\n\n //Set visibility for replay button to visible\n replayButton.setVisibility(View.VISIBLE);\n retryButton.setVisibility(View.VISIBLE);\n scoreboardButton.setVisibility(View.VISIBLE);\n }",
"public Bitmap getCaptcha(String devKey) throws CaptchaException {\n\t\tBitmap image = null;\n\t\ttry {\n\t\t\tString getTokenURL = CAPTCHA_URL + \"/get?key=\" + devKey;\n\n\t\t\tURL getUrl = new URL(getTokenURL);\n\n\t\t\tHttpURLConnection httpURLConnection = (HttpURLConnection) getUrl.openConnection();\n\n\t\t\thttpURLConnection.connect();\n\n\t\t\tint code = httpURLConnection.getResponseCode();\n\t\t\tSystem.out.println(code);\n\t\t\tif (code == 200) {\n\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));\n\t\t\t\tString jsonString = reader.readLine();\n\n\t\t\t\tJSONObject jsonObject = new JSONObject(jsonString);\n\t\t\t\tString imageURL = jsonObject.getString(\"image\");\n\t\t\t\tthis.token = jsonObject.getString(\"token\");\n\t\t\t\tthis.verifyURL = jsonObject.getString(\"verify\");\n\t\t\t\tthis.adid = jsonObject.getString(\"adid\");\n\t\t\t\tthis.adurl = jsonObject.getString(\"adurl\");\n\t\t\t\tthis.audioURL = jsonObject.getString(\"audio\");\n\n\t\t\t\treader.close();\n\n\n\t\t\t\t//ini cara defaultnya\n\t\t\t\t/*URL getImageURL = new URL(imageURL);\n\t\t\t\thttpURLConnection = (HttpURLConnection) getImageURL.openConnection();\n\t\t\t\tInputStream imageStream = httpURLConnection.getInputStream();\n\t\t\t\tcode = httpURLConnection.getResponseCode();\n\t\t\t\tif(code == 200){\n\t\t\t\t\timage = BitmapFactory.decodeStream(imageStream);\n\t\t\t\t\timageStream.close();\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"img response http status code is:\" + code);\n\t\t\t\t}\n\t\t\t\thttpURLConnection.disconnect(); */\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//ini pake method bantu\n\t\t\t\timage = loadImageFromUrl(imageURL);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"get response http status code is:\" + code);\n\t\t\t}\t\t\t\n\n\t\t\thttpURLConnection.disconnect();\n\n\t\t} catch(MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch(JSONException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t}\n\n\t\treturn image;\n\t}",
"public interface CaptchaAlgorithm {\n\n Captcha generate();\n\n}",
"public void creditcard() {\n\t\tBy cd=By.xpath(\"//input[@name='creditCard']\");\r\n\t\tWebElement W_cd=wt.WaitForElement(cd, 10);\r\n\t\tW_cd.sendKeys(\"5462897859858\");\r\n\t\t\r\n\t\t}",
"private void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int width = 250;\n int height = 100;\n //vectorul de captcha-uri\n// char data[][] = {\n// { 'm', 'a', 'n', 'c', 'a', 'r', 'e' },\n// { 'b', 'e', 't', 'o', 'n' },\n// { 'f', 'r', 'i', 'g', 'i', 'd', 'e', 'r' },\n// { 's', 'u', 'p', 'e', 'r', 'm', 'a', 'n' },\n// { 'j', 'e', 't' }\n// };\n\n //folosim o imagine buffer pentru a desena captcha-ul\n BufferedImage bufImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n Graphics2D g2d = bufImg.createGraphics();\n Font font = new Font(\"Georgia\", Font.BOLD, 18);\n g2d.setFont(font);\n g2d.setColor(Color.WHITE);\n\n //folosim hint-uri ca sa crestam calitatea textului din poza\n RenderingHints rHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n rHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n g2d.setRenderingHints(rHints);\n\n //desenam gradientul, pentru fundalul imaginii\n GradientPaint gPaint = new GradientPaint(0, 0, Color.BLUE, 0, height/2, Color.black, true);\n g2d.setPaint(gPaint);\n g2d.fillRect(0, 0, width, height);\n g2d.setColor(new Color(255, 153, 0));\n\n //numar random pt vectorul de captcha-uri\n Random rand = new Random();\n char data[][] = {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}};\n for (int i = 0; i < 8; i++) {\n char r = rndChar();\n data[0][i] = r;\n }\n //int index = Math.abs(rand.nextInt()) % 5;\n int index = 0;\n //trimitem stringul la user sa stie sa compare input-ul de la user\n String captcha = String.copyValueOf(data[index]);\n request.getSession().setAttribute(\"captcha\", captcha);\n\n //desenam captcha-ul ales in imagine\n int x = 0, y = 0;\n for (int i = 0; i < data[index].length; i++) {\n x += 15 + Math.abs(rand.nextInt()) % 15;\n y = 45 + Math.abs(rand.nextInt()) % 20;\n g2d.drawChars(data[index], i, 1, x, y);\n }\n g2d.dispose();\n\n response.setContentType(\"image/png\");\n OutputStream os = response.getOutputStream();\n ImageIO.write(bufImg, \"png\", os);\n os.close();\n }",
"public static\n void checkExpiringPassword()\n {\n User user = ResourcesMgr.getSessionManager().getUser();\n \n String sPassword = user.getPassword();\n \n // Controllo della scadenza della password al primo accesso\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n // Primo accesso\n boolean boExpiredFA = ResourcesMgr.getBooleanProperty(ResourcesMgr.sGUILOGIN_EXP_FIRSTA, false);\n if(boExpiredFA) {\n GUIMessage.showWarning(\"Questo \\350 il Suo primo accesso. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n \n // Controllo della scadenza della password rispetto a quando e' stata aggiornata l'ultima volta.\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n int iExpirationDays = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_DAYS, 0);\n if(iExpirationDays > 0) {\n int iDays = getDaysFrom(user.getDatePassword());\n if(iExpirationDays <= iDays) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n else {\n int iMonths = getMonthsFrom(user.getDatePassword());\n int iExpirationMonths = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_MONTHS, 0);\n if(iExpirationMonths > 0 && iExpirationMonths <= iMonths) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n }\n }",
"public boolean verifyCaptcha(HttpServletRequest servletReq, Request req, Response res, PrintWriter out)\n\t{\n\t\tif ( null == captchaUrls) return true;\n\t\t\n\t\tUserProfile user = req.getUser();\n\t\t\n\t\tStringBuilder sb = new StringBuilder(24);\n\t\tsb.append(req.sensorId).append('.').append(req.action);\n\t\tif ( ! captchaUrls.contains(sb.toString())) return true;\n\t\t\n\t\tMap<String, String> params = req.mapData;\n\n\t\tString readcaptcha = null;\n\t\tString encodedCaptcha = null;\n\t\tif ( params.containsKey(\"readcaptcha\") ) \n\t\t\treadcaptcha = req.getString(\"readcaptcha\", true, true, false);\n\n\t\tif ( params.containsKey(\"encodedcaptcha\") ) \n\t\t\tencodedCaptcha = req.getString(\"encodedcaptcha\", true, true, false);\n\t\telse {\n\t\t\tif ( StringUtils.isEmpty(encodedCaptcha)) {\n\t\t\t\tCookie[] cookies = servletReq.getCookies();\n\t\t\t\tif (cookies != null && cookies.length > 0) {\n\t\t\t\t\tfor (Cookie cookie : cookies) {\n\t\t\t\t\t\tif ( cookie.getName().equals(\"encodedcaptcha\")) {\n\t\t\t\t\t\t\tencodedCaptcha = cookie.getValue(); \n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tString captchaTextEncoded = null;\n\t\tif ( null != readcaptcha && null != encodedCaptcha) {\n\t\t\tString secureCaptchaText = servletReq.getRemoteAddr() + readcaptcha;\n\t\t\tcaptchaTextEncoded = Hash.createHex(this.key, secureCaptchaText);\n\t\t\tif (captchaTextEncoded.equals(encodedCaptcha)) return true;\n\t\t}\n\n\t\tres.setErrorCode(\"CAPTCHA_ERROR\", ErrorCodes.CAPTCHA_MISMATCH, user.getLocale(), true);\n\t\treturn false;\n\t}",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (Boolean.TRUE.equals(acc.getBooleanProperty(\"free\"))) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isCredentialsNonExpired() {\r\n return true;\r\n }",
"@Override\r\n\tpublic void validate(FacesContext fc, UIComponent arg1, Object arg2)\r\n\t\t\tthrows ValidatorException {\n HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\r\n Boolean isResponseCorrect = Boolean.FALSE;\r\n javax.servlet.http.HttpSession session = request.getSession();\r\n String parm = (String)arg2;\r\n String c = (String) session.getAttribute(MyCaptcha.CAPTCHA_KEY);\r\n if (!parm.equals(c)) {\r\n \tFacesMessage message = new FacesMessage();\r\n \tmessage.setSummary(\"You have entered invalid text for image.\");\r\n \tmessage.setSeverity(FacesMessage.SEVERITY_ERROR);\r\n \tthrow new ValidatorException(message);\r\n\r\n }\r\n\t}",
"public static void enterCaptcha(WebElement captchaField) {\n\t\tString captchaVal = JOptionPane.showInputDialog(\"Please enter the captcha value:\");\n\t\tSystem.out.println(captchaVal);\n\t\t// Type the entered captcha to the text box\n\t\tcaptchaField.sendKeys(captchaVal);\n\t}",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (acc.getType() == AccountType.FREE) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"public void setCaptchaResponse(final String captchaResponse) {\n mCaptchaResponse = captchaResponse;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return true;\n }",
"boolean expired();",
"@Then(\"^użytkownik wprowadza w pole hasło błędne hasło$\")\n public void użytkownik_wprowadza_w_pole_hasło_błędne_hasło() throws Throwable {\n String Zlehaslo = \"invalidinvalidinvalid\";\n driver.findElement(By.id(\"enp_customer_form_login_password\")).click();\n driver.findElement(By.id(\"enp_customer_form_login_password\")).sendKeys(Zlehaslo);\n czas(1000);\n }",
"public void expiredate() {\n\t\tdr.findElement(By.xpath(\"//input[@id='expiryDate']\")).sendKeys(\"05/2028\");\r\n\t\t\r\n\t\t\r\n\t\t}",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"public interface CaptchaService {\n /**\n * 生成验证码图片\n *\n * @param captchaId\n * @return\n */\n BufferedImage buildImage(String captchaId);\n\n /**\n * 验证 验证码\n * @param captchaType\n * @param captchaId\n * @param captcha\n * @return\n */\n boolean isValid(Setting.CaptchaType captchaType, String captchaId, String captcha);\n}",
"@Override\r\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\tpwd1=new String(jf1.getPassword());\r\n\t\t\t\tif(currCard.getPwd().equals(pwd1)){\r\n\t\t\t\t\tjl1.setText(\"\");\r\n\t\t\t\t\tis1=true;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tis1=false;\r\n\r\n\t\t\t\t\tjl1.setText(\"密码错误\");\r\n\t\t\t\t\t//jf1.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\npublic boolean isCredentialsNonExpired() {\n\treturn true;\n}",
"public CaptchaIncorrectoException() {\n super(ERROR_KEY);\n }",
"public interface OnCaptchaMatchCallback {\n void matchSuccess(CustomerPuzzleCodeView customerPuzzleCodeView);\n void matchFailed(CustomerPuzzleCodeView customerPuzzleCodeView);\n}",
"private void fillCity() {\n \n if(postalCodeTF.getText().length() == 4){\n City city = memberConnection.getCity(postalCodeTF.getText());\n cityTF.setText(city.getCity().replaceAll(\"_\", \" \"));\n municipalTF.setText(city.getMunicipal().replaceAll(\"_\", \" \"));\n }\n }",
"public void inputRandomEmailToTextbox() {\r\n\t\twaitElementVisible(driver, RegisterForm.EMAIL_TEXTBOX);\r\n\t\tString emailAddress = \"auto06\" + getTodayString(\"ddMMyyHHmmss\")+\"@lv.com\";\r\n\t\tsendKeyElement(driver,RegisterForm.EMAIL_TEXTBOX, emailAddress);\r\n\t}",
"private void timerExpired() {\r\n timer.stop();\r\n mainFrame.setEnabled(true);\r\n inputPanel.addKits(receivedKits);\r\n messageSent = false;\r\n setMessage(finishedReceivingMessage, Color.BLUE);\r\n receivedKits.clear();\r\n }",
"@Override\npublic boolean isCredentialsNonExpired() {\n\treturn false;\n}",
"private AuthParams getCaptchaAuthParams(final String captchaResponse) {\n AuthParamsCaptcha authParams = new AuthParamsCaptcha();\n authParams.response = captchaResponse;\n return authParams;\n }",
"@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t\tMobclickAgent.onPageEnd(\"获取验证码\");\r\n\t}",
"public void cacheResult(com.inikah.slayer.model.MMCity mmCity);",
"@Override\n public boolean isCredentialsNonExpired() {\n return Boolean.TRUE;\n }",
"@Override\n\t\t\t\tpublic boolean isCredentialsNonExpired() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"boolean hasExpiredTrialLicense() {\n return false;\n }",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"@Test\n\tpublic void testUnmatchingPasswordNegative2() {\n\t\tfillSignUpForm(\"marius\",\"voda\",\"[email protected]\",\"Parola123\",\"PaR0la123\",\"socialNetworks\");\n\t\tassertEquals(\"Passwords must match\", driver.findElement(By.cssSelector(\"#sign-up-confirm-password-div > app-form-control-error-message > em > span\")).getText());\n\t}",
"private void onChangeBanner() {\n double latitude = 0.0, longitude = 0.0;\n if (mGpsTracker != null) {\n latitude = mGpsTracker.getLatitude();\n longitude = mGpsTracker.getLongitude();\n Log.e(\"Error on Valid City\", \"\" + latitude);\n }\n\n if (Utility.isConnectingToInternet(getActivity())) {\n try {\n Map<String, String> param = new HashMap<>(3);\n param.put(\"city\", AppConstants.getCityByLocation(getActivity(), latitude, longitude));\n Log.e(\"Valid City\", \"\" + AppConstants.getCityByLocation(getActivity(), latitude, longitude));\n param.put(\"size\", getResources().getString(R.string.device_reso));\n RequestHandler.getInstance().stringRequestVolley(getActivity(), AppConstants.getBaseUrl(SharedPref.getInstance().getBooleanValue(getActivity(), isStaging)) + validCity, param, this, 5);\n\n } catch (Exception e) {\n e.printStackTrace();\n Log.e(\"Error on Valid City\", \"\" + e.toString());\n }\n\n } else {\n Utility.showInternetError(getActivity());\n }\n }",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\r\n\t}",
"void clear()\n {\n captcha.reset();\n requestToken.setEnabled(false);\n username.setValue(\"\");\n greeting.setValue(\"\");\n token.setValue(\"\");\n newPassword.setValue(\"\");\n newPasswordRepeat.setValue(\"\");\n show(REQUEST_TOKEN);\n }",
"@Test\n public void testOtp(){\n String secret = \"whatever is here is okay\";\n Totp totp = new Totp(secret);\n String now = totp.now();\n assertThat(totp.verify(now)).isEqualTo(true);\n }",
"public static String cleanRequest(String city){\n if(hasSpecialCharacters(city)){\n //if it has special characters return invalid\n return \"invalid\";\n }\n //return the un-altered version if no special characters\n return city;\n }",
"@Override\n\tpublic boolean isCredentialsNonExpired()\n\t{\n\t\treturn true;\n\t}",
"@Test\n\tpublic void testUnmatchingPasswordNegative1() {\n\t\tfillSignUpForm(\"marius\",\"voda\",\"[email protected]\",\"Parola123\",\"parola123\",\"socialNetworks\");\n\t\tassertEquals(\"Passwords must match\", driver.findElement(By.cssSelector(\"#sign-up-confirm-password-div > app-form-control-error-message > em > span\")).getText());\n\t}",
"@Override\n public void onSuccess(SafetyNetApi.RecaptchaTokenResponse response) {\n userResponseToken = response.getTokenResult();\n if (!userResponseToken.isEmpty()) {\n // Validate the user response token using the\n // reCAPTCHA siteverify API.\n // new SendPostRequest().execute();\n sendRequest();\n }\n }",
"@SuppressWarnings(\"unused\")\n void expire();",
"public void Verify(View view) {\n try {\n if (!appsingleton.isvalidateLength(et_username,6)) {\n tv_validationtext.setText(getResources().getString(R.string.st_errorOtplength));\n rl_validation.setVisibility(View.VISIBLE);\n tv_validationtext.startAnimation(appsingleton.shake_animation);\n return;\n }\n else\n {\n rl_validation.setVisibility(View.GONE);\n }\n\n if (AppUtils.isNetworkAvailable(this)) {\n new OTPVerification(et_username.getText().toString()).execute();\n\n }//end of network if\n else\n {\n appsingleton.SnackbarMessage(getResources().getString(R.string.st_internet_error),\"\",et_username);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void resetForm() {\r\n\t\tfinal CTracked ctracked = UserSettings.ctracked == null ? new CTracked()\r\n\t\t\t\t: UserSettings.ctracked;\r\n\r\n\t\ttxtPassword.setValue(\"\");\r\n\t\ttxtPassword.clearInvalid();\r\n\r\n\t\ttxtPasswordConfirm.setValue(\"\");\r\n\t\ttxtPasswordConfirm.clearInvalid();\r\n\r\n\t\ttxtName.setValue(ctracked.getName() == null ? \"\" : ctracked.getName());\r\n\t\ttxtName.clearInvalid();\r\n\r\n\t\tif (ctracked.getBirthday() != null) {\r\n\t\t\tUserSettings.timerTask.getTaskList().add(new Task(2) {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void execute() {\r\n\t\t\t\t\tdateBirthday.setValue(ctracked.getBirthday());\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tdateBirthday.setValue(\"\");\r\n\t\t}\r\n\t\tdateBirthday.clearInvalid();\r\n\t\t\r\n\t\ttxtUsername.setValue(String.valueOf(ctracked.getUsername()));\r\n\r\n\r\n\t\ttxtMobilePhone.setValue(ctracked.getTel() == null ? \"\" : ctracked\r\n\t\t\t\t.getTel());\r\n\t\ttxtMobilePhone.clearInvalid();\r\n\r\n\t\ttxtEmail.setValue(ctracked.getEmail() == null ? \"\" : ctracked\r\n\t\t\t\t.getEmail());\r\n\t\ttxtEmail.clearInvalid();\r\n\r\n\t\ttxtEmailConfirm.setValue(ctracked.getEmail() == null ? \"\" : ctracked\r\n\t\t\t\t.getEmail());\r\n\t\ttxtEmailConfirm.clearInvalid();\r\n\r\n\t\tif (ctracked.getIntervalGps() != null) {\r\n\t\t\tUserSettings.timerTask.getTaskList().add(new Task(2) {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void execute() {\r\n\t\t\t\t\tcbIntervalGPS.setValue(ctracked.getIntervalGps()+\"\");\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tcbIntervalGPS.setValue(\"10\");\r\n\t\t}\r\n\t\tcbIntervalGPS.clearInvalid();\r\n\r\n\t\ttxtIconPath\r\n\t\t\t\t.setValue(ctracked.getIconPath() == null ? DEFFAULT_ICON_PATH\r\n\t\t\t\t\t\t: ctracked.getIconPath());\r\n\r\n\t\timgIcon.setUrl(txtIconPath.getText());\r\n\r\n\t\tcheckActive.setValue(ctracked.isActive() == null ? false : true);\r\n\r\n\t\tcheckEmbedded.setValue(ctracked.getEmbedded() == null ? false : true);\r\n\r\n\t\tcheckShowInMap.setValue(ctracked.getShowInMap() == null ? false : true);\r\n\r\n\t\tcbLanguage.setValue(ctracked.getLang() == null ? \"vi\" : ctracked\r\n\t\t\t\t.getLang());\r\n\t\tcbCountry.setValue(ctracked.getCountry() == null ? \"VN\" : ctracked\r\n\t\t\t\t.getCountry());\r\n\t\tcbTimeZone.setValue(ctracked.getGmt() == null ? \"7\" : ctracked.getGmt()\r\n\t\t\t\t+ \"\");\r\n\r\n\t\ttxtApiKey.setValue(ctracked.getApiKey() == null ? \"\" : ctracked\r\n\t\t\t\t.getApiKey());\r\n\r\n\t\tpostResetForm();\r\n\t}",
"public static void main(String[] args) throws Exception {\r\n\t\tSystem.out.println(\"Does the captcha contain alphabets (yes or no) :\");\r\n\tScanner sc=new Scanner(System.in);\r\n\tString in=sc.nextLine(); // taking imput (yes or no)\r\n\tif(in.toLowerCase().equals(\"yes\") || in.toLowerCase().equals(\"y\")) // checking if the input is yes\r\n\t{\r\n\t\talpha=true; // if input is yes alpha flag is set to true\r\n\t\tfor (int i=0; i<35; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\")); // taking all the templates along with alphabets into consideration\r\n\t\t}\r\n\r\n\t}\r\n\telse\r\n\t{\r\n\t\talpha=false;// if input is not yes alpha flag is set to true\r\n\t\tfor (int i=0; i<10; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\"));// taking all the templates along with out alphabets into consideration\r\n\t\t}\r\n\t}\r\n\t\tint numTests = 100; // total number of trials\r\n\t\t\r\n\t\t// read in the templates for each character\r\n\t\tfor (int i=0; i<35; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\"));\r\n\t\t}\r\n\r\n\t\tint correct = 0;\r\n\t\tfor (int i=0; i<numTests; i++) {\r\n\t\t\t\r\n\t\t\t// generate a random string\r\n\t\t\tString rightAnswer = randomString(6,alpha);\r\n\t\t\t\r\n\t\t\t// make a captcha from it\r\n\t\t\tBufferedImage captchaImage = generateCaptcha(rightAnswer);\r\n\t\t\t\r\n\t\t\tif (show) {\r\n\t\t\t\tImageIO.write(captchaImage, \"jpeg\", new File(\"see.jpg\"));\r\n\t\t\t\tshow = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// guess the captcha\r\n\t\t\t\r\n\t\t\tString guess = guessCaptcha(captchaImage);\r\n\t\t\t// see if we got it right\r\n\t\t\tif (guess.equals(rightAnswer)) correct++;\r\n\t\t}\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"accuracy: \" + (correct / (double) numTests));\r\n\t}",
"private void validarSinInternet() {\n String email_val = email.getText().toString().trim();\n String password_val = password.getText().toString().trim();\n progressBar.setVisibility(View.VISIBLE);\n if ((Patterns.EMAIL_ADDRESS.matcher(email_val).matches() == false) && (email_val.isEmpty())) {\n mensaje_email();\n progressBar.setVisibility(View.GONE);\n } else if ((password_val.isEmpty())) {\n mensaje_tamaño();\n progressBar.setVisibility(View.GONE);\n } else {\n LoginUser(email_val, password_val);\n progressBar.setVisibility(View.GONE);\n }\n }",
"@Override\n public void run() {\n codeTime--;\n get_code_btn.setText(codeTime + \"s\");\n if (codeTime <= 0) {\n if (timer != null) {\n timer.cancel();\n }\n get_code_btn.setText(\"获取验证码\");\n isGetVerification=false;\n }\n }",
"public String termsValidation() {\n name.sendKeys(\"Karan Prinja\");\n email.sendKeys(\"[email protected]\");\n password.sendKeys(\"termsnotmet\");\n this.scrollBy(submit);\n submit.click();\n helperMethods.waitForWebElement(termsError, 30);\n this.scrollBy(termsError);\n return termsError.getText();\n }",
"@Test\r\n public void positiveRegistration() {\r\n driver.get(\"http://127.0.0.1:8888/wp-login.php?action=register\");\r\n StringBuilder sb = new StringBuilder(len);\r\n for (int i = 0; i < len; i++) {\r\n sb.append(AB.charAt(rnd.nextInt(AB.length())));\r\n }\r\n String charSequence = \"\";\r\n charSequence = sb.toString();\r\n WebElement loginField = driver.findElement(By.xpath(\"//input[@id='user_login']\"));\r\n loginField.sendKeys(charSequence);\r\n WebElement passwdField = driver.findElement(By.xpath(\"//input[@id='user_email']\"));\r\n passwdField.sendKeys(charSequence+\"@gmail.com\");\r\n\r\n WebElement registerButton = driver.findElement(By.xpath(\"//input[@name='wp-submit']\"));\r\n registerButton.click();\r\n\r\n WebElement registrationMessage = driver.findElement(By.xpath(\"//p[@class='message']\"));\r\n Assert.assertEquals(registrationMessage.getText(),\"Регистрация завершена. Проверьте вашу почту.\");\r\n }",
"boolean isCredentialsNonExpired();",
"boolean isCredentialsNonExpired();",
"@Override\r\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\t pwd2=new String(jf2.getPassword());\r\n\t\t\t\t\r\n\r\n\t\t\t\tif(is1==true){\r\n\t\t\t\tif(currCard.getPwd().equals(pwd2)){\r\n\t\t\t\t\tjl2.setText(\"新旧密码不能一致\");\r\n\t\t\t\t\t//jf2.requestFocus();\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tis2=true;\r\n\t\t\t\t\tjl2.setText(\"\");\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\n\t}",
"@Test\n public void cidade_invalida(){\n\n assertThat(cache.isValid(\"Alentejo\")).isEqualTo(false);\n }",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn false;\n\t}",
"@Override\r\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\t pwd3=new String(jf3.getPassword());\r\n\t\t\t\tif(is2==true){\r\n\t\t\t\tif(pwd3.equals(pwd2)){\r\n\t\t\t\t\tjl3.setText(\"\");\r\n\t\t\t\t\tis3=true;\r\n\t\t\t\t}else\r\n\t\t\t\t\tjl3.setText(\"两次密码不相符\");\r\n\t\t\t\t\tjf3.requestFocus();\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"@Test\n\tpublic void checkconfirmpassword_characters()\n\t{\n\t\t\n\t\tPageFactory.initElements(driver, Resetpassword.class);\n\t\tResetpassword.confirm_password.sendKeys(\"co12!@\");\n\t\tString user_text=Resetpassword.error_message.getText();\n\t\tAssert.assertEquals(user_text,\"co12!@\");\n\t\t\n\t}",
"void abortChallenge();",
"@Override\n public void onFailure(Call<String> call, Throwable t) {\n dismissProgress();\n SecurityLayer.generateToken(getApplicationContext());\n com.ceva.ubmobile.core.ui.Log.debug(\"otpvalidation\", t.toString());\n //showToast(getString(R.string.error_500));\n // prog.dismiss();\n // startDashBoard();\n }",
"public void setVerificationCode(String OTP) {\n\t\thelper.findElementById(otpFieldId).sendKeys(OTP);\n\t}",
"public void SetCheckoutRegistrationCity(String city){\r\n\t\tString City = getValue(city);\r\n\t\tString countrygroup_city=\"Netherland\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Registration City should be entered as \"+City);\r\n\t\ttry{\r\n\t\t\tif(!(countrygroup_city).contains(countries.get(countrycount)))\r\n\t\t\t{\r\n\t\t\t\tsendKeys(locator_split(\"txtcheckoutregistrationCity\"),City);\r\n\t\t\t\tSystem.out.println(\"Registration City is entered as \"+City);\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Registration house number is entered as \"+City);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Registration City is not applicable to \" +countrygroup_city);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Registration City is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtcheckoutregistrationCity\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}",
"private String getDllinkWebsiteCaptcha(final Account account, final DownloadLink link) throws IOException, PluginException, InterruptedException {\n Form captchaform = br.getFormbyActionRegex(\".*/redirect.*\");\r\n if (captchaform == null) {\r\n /* Fallback */\r\n captchaform = br.getForm(0);\r\n }\r\n if (captchaform == null) {\r\n logger.warning(\"captchaform is null\");\r\n }\r\n final String recaptchaV2Response = new CaptchaHelperHostPluginRecaptchaV2(this, br).getToken();\r\n captchaform.put(\"g-recaptcha-response\", recaptchaV2Response);\r\n br.setFollowRedirects(false);\r\n br.submitForm(captchaform);\r\n final String dllink = br.getRedirectLocation();\r\n if (!StringUtils.isEmpty(dllink)) {\r\n /* Store directurl */\r\n link.setProperty(this.getHost() + \"directurl_selfhosted\", dllink);\r\n }\r\n return dllink;\r\n }",
"boolean isExpired();",
"public boolean verifyPasswordExpiration(){\n throw new UnsupportedOperationException();\n }",
"public boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"public boolean isCredentialsNonExpired() {\n\t\treturn false;\r\n\t}",
"public static void Android_Invalid_otp() {\n try {\n\n AppiumDriver<MobileElement> driver = getAppiumDriver();\n Thread.sleep(2000);\n MobileElement el1 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[1]/android.widget.EditText\");\n el1.click();\n\n String userName = getData(\"UserName\");\n el1.sendKeys(userName);\n driver.hideKeyboard();\n MobileElement el2 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[3]/android.widget.EditText\");\n String password = getData(\"Password\");\n\n el2.sendKeys(password);\n driver.hideKeyboard();\n ReportHelper.logReportStatus(LogStatus.PASS, \"UserName and Password Given Successfully\");\n\n MobileElement loginBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Login']\");\n loginBtn.click();\n\n Thread.sleep(12000);\n\n driver.findElementByXPath(\"//android.widget.EditText[@text='Confirmation Code']\").sendKeys(\"5252\");\n Thread.sleep(2000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Invalid OTP Given Successfully\");\n driver.hideKeyboard();\n MobileElement continueBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Continue']\");\n continueBtn.click();\n Thread.sleep(15000);\n MobileElement Errormsg = driver.findElementByXPath(\"//android.widget.TextView[@text='Sorry the authentication code you entered is incorrect. Please try again.']\");\n\n if (Errormsg.isDisplayed()) {\n Thread.sleep(3000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Sorry the authentication code you entered is incorrect. Please try again.\");\n MobileElement e2 = driver.findElementByXPath(\"//android.widget.Button[@text='Go To Home']\");\n e2.click();\n Thread.sleep(2000);\n }\n\n\n } catch (Exception e) {\n ReportHelper.logReportStatus(LogStatus.FAIL, \"login into the application\");\n\n }\n }",
"public void setStateToExpired() {\n state = VALID_STATES[1];\n }",
"public static boolean validate(String submittedOTP, byte[] secret, int numDigits) throws GeneralSecurityException {\n Calendar currentDateTime = getCalendar();\n\n String generatedTOTP = TOTP.generateTOTP(new String(secret), numDigits);\n boolean result = generatedTOTP.equals(submittedOTP);\n\n if (!result) {\n // Step back time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis -= TIME_INTERVAL;\n\n String steps = \"0\";\n long T = (timeInMilis - TOTP.TIME_ZERO) / TOTP.TIME_SLICE_X;\n steps = Long.toHexString(T).toUpperCase();\n\n // Just get a 16 digit string\n while (steps.length() < 16)\n steps = \"0\" + steps;\n\n generatedTOTP = TOTP.generateTOTP(new String(secret), \"\" + steps, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n if (!result) {\n // Step ahead time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis += TIME_INTERVAL;\n\n String steps = \"0\";\n long T = (timeInMilis - TOTP.TIME_ZERO) / TOTP.TIME_SLICE_X;\n steps = Long.toHexString(T).toUpperCase();\n\n // Just get a 16 digit string\n while (steps.length() < 16)\n steps = \"0\" + steps;\n\n generatedTOTP = TOTP.generateTOTP(new String(secret), \"\" + steps, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n return result;\n }",
"public void v_Verify_Guest12_Hidden(){\n\t}",
"public static boolean validate512(String submittedOTP, byte[] secret, int numDigits) throws GeneralSecurityException {\n Calendar currentDateTime = getCalendar();\n\n String generatedTOTP = TOTP.generateTOTP512(new String(secret), numDigits);\n boolean result = generatedTOTP.equals(submittedOTP);\n\n if (!result) {\n // Step back time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis -= TIME_INTERVAL;\n\n generatedTOTP = TOTP.generateTOTP512(new String(secret), \"\" + timeInMilis, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n if (!result) {\n // Step ahead time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis += TIME_INTERVAL;\n\n generatedTOTP = TOTP.generateTOTP512(new String(secret), \"\" + timeInMilis, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n return result;\n }"
]
| [
"0.6015176",
"0.59446806",
"0.57409155",
"0.5657792",
"0.56457597",
"0.5616923",
"0.56110907",
"0.5300934",
"0.5238246",
"0.51847446",
"0.5177945",
"0.5033383",
"0.49517235",
"0.4930033",
"0.48413017",
"0.48200563",
"0.47646192",
"0.4763153",
"0.47484058",
"0.474811",
"0.47151765",
"0.47119623",
"0.46939498",
"0.46884447",
"0.46810496",
"0.4673937",
"0.46627167",
"0.46627167",
"0.46627167",
"0.46621722",
"0.4636546",
"0.46349326",
"0.46199518",
"0.46026197",
"0.45877916",
"0.458141",
"0.45760763",
"0.4573072",
"0.45605442",
"0.4554259",
"0.45531195",
"0.4535176",
"0.45298657",
"0.45267934",
"0.45221576",
"0.45221576",
"0.45221448",
"0.45155868",
"0.45129555",
"0.45064792",
"0.45063737",
"0.45018452",
"0.44986555",
"0.44949654",
"0.44888642",
"0.44844985",
"0.4476465",
"0.4475394",
"0.4474278",
"0.4473515",
"0.44622427",
"0.4458307",
"0.44578302",
"0.4448524",
"0.4448524",
"0.4440469",
"0.4435108",
"0.4435108",
"0.4435108",
"0.4435108",
"0.4435108",
"0.4435108",
"0.4435108",
"0.4435108",
"0.4435108",
"0.4435108",
"0.4435108",
"0.4435108",
"0.4435108",
"0.4435108",
"0.4435108",
"0.4430195",
"0.44291773",
"0.44291773",
"0.44291773",
"0.4428232",
"0.4427384",
"0.44269532",
"0.4425521",
"0.44176784",
"0.44144428",
"0.44088522",
"0.43973094",
"0.43892342",
"0.43882605",
"0.43870088",
"0.43854836",
"0.43538013",
"0.4340693",
"0.433591",
"0.43257397"
]
| 0.0 | -1 |
captcha expired, wrong postcode | @Override
public boolean matches(Object list) {
return ((List<String>) list).size() == 2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Captcha() {\n value = generateCaptchaCode();\n id = generateCaptchaID();\n date = System.currentTimeMillis();\n }",
"@Override\n public boolean validDefaultTime(String code) {\n return kaptcha.validate(code);\n }",
"public String getCaptchaCode() {\n HttpGet httpget = new HttpGet(HttpURL.getCaptchaURL());\n try {\n HttpEntity entity = this.client.execute(httpget).getEntity();\n\n if (entity != null) {\n InputStream is = entity.getContent();\n File captchaImage = new File(CaptchaOCR.CAPTCHA_IMAGE_PATH);\n OutputStream os = new FileOutputStream(captchaImage);\n IOUtils.copy(is, os);\n IOUtils.closeQuietly(is);\n IOUtils.closeQuietly(os);\n }\n EntityUtils.consume(entity);\n return CaptchaOCR.doOcr();\n } catch (ClientProtocolException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return null;\n }",
"public void msjereCaptcha(){\r\n click(esperarElementoPresenteEnPagina(locatorMsjeCaptcha));\r\n }",
"public static String captcha(){\n\t\tString captcha=\"\";\n\t\tfor(int i=0; i<8; i+=2){\n\t\t\tcaptcha+=(char)(65+Math.random()*26)+\" \";\n\t\t\tcaptcha+=(char)(97+Math.random()*26);\n\t\t}\n\t\treturn captcha;\n\n\t}",
"void setCaptcha(ICaptcha captcha);",
"@Test(dependsOnMethods = {\"register\"})\n void confirmEmailAddressByCaptcha() {\n common.findWebElementByXpath(\"//*[@id=\\\"content\\\"]/fieldset/label/div\").click();\n\n //Click on Send captcha button\n common.timeoutSeconds(2);\n common.findWebElementById(\"send-captcha-button\").click();\n\n //No magic code is set\n common.verifyStatusMessage(\"Det uppstod ett problem med verifieringen av att du är en människa. \" +\n \"Var god försök igen.\");\n }",
"public Bitmap getCaptcha(String devKey) throws CaptchaException {\n\t\tBitmap image = null;\n\t\ttry {\n\t\t\tString getTokenURL = CAPTCHA_URL + \"/get?key=\" + devKey;\n\n\t\t\tURL getUrl = new URL(getTokenURL);\n\n\t\t\tHttpURLConnection httpURLConnection = (HttpURLConnection) getUrl.openConnection();\n\n\t\t\thttpURLConnection.connect();\n\n\t\t\tint code = httpURLConnection.getResponseCode();\n\t\t\tSystem.out.println(code);\n\t\t\tif (code == 200) {\n\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));\n\t\t\t\tString jsonString = reader.readLine();\n\n\t\t\t\tJSONObject jsonObject = new JSONObject(jsonString);\n\t\t\t\tString imageURL = jsonObject.getString(\"image\");\n\t\t\t\tthis.token = jsonObject.getString(\"token\");\n\t\t\t\tthis.verifyURL = jsonObject.getString(\"verify\");\n\t\t\t\tthis.adid = jsonObject.getString(\"adid\");\n\t\t\t\tthis.adurl = jsonObject.getString(\"adurl\");\n\t\t\t\tthis.audioURL = jsonObject.getString(\"audio\");\n\n\t\t\t\treader.close();\n\n\n\t\t\t\t//ini cara defaultnya\n\t\t\t\t/*URL getImageURL = new URL(imageURL);\n\t\t\t\thttpURLConnection = (HttpURLConnection) getImageURL.openConnection();\n\t\t\t\tInputStream imageStream = httpURLConnection.getInputStream();\n\t\t\t\tcode = httpURLConnection.getResponseCode();\n\t\t\t\tif(code == 200){\n\t\t\t\t\timage = BitmapFactory.decodeStream(imageStream);\n\t\t\t\t\timageStream.close();\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"img response http status code is:\" + code);\n\t\t\t\t}\n\t\t\t\thttpURLConnection.disconnect(); */\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//ini pake method bantu\n\t\t\t\timage = loadImageFromUrl(imageURL);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"get response http status code is:\" + code);\n\t\t\t}\t\t\t\n\n\t\t\thttpURLConnection.disconnect();\n\n\t\t} catch(MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch(JSONException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t}\n\n\t\treturn image;\n\t}",
"@Override\n public void run() {\n codeTime--;\n get_code_btn.setText(codeTime + \"s\");\n if (codeTime <= 0) {\n if (timer != null) {\n timer.cancel();\n }\n get_code_btn.setText(\"获取验证码\");\n isGetVerification=false;\n }\n }",
"@Override\r\n public void onClick(View arg0) {\n if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n\r\n //Chaptcha dialog\r\n captchaDialog = new Dialog(CreateAccount.this);\r\n captchaDialog.setContentView(R.layout.captcha_dialog);\r\n captchaDialog.setTitle(\"Please enter captcha\");\r\n\r\n reCaptcha = (ReCaptcha) captchaDialog.findViewById(R.id.recaptcha);\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n\r\n chaptchaAnswer = (EditText) captchaDialog.findViewById(R.id.answer);\r\n\r\n Button captchaVerify = (Button) captchaDialog.findViewById(R.id.verify);\r\n captchaVerify.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n //dialog.dismiss();\r\n reCaptcha.verifyAnswerAsync(\"6LfhQwsTAAAAALJvjUqiurjAdzi4dztuUIGq-NyZ\", chaptchaAnswer.getText().toString(), CreateAccount.this);\r\n }\r\n });\r\n Button captchaReload = (Button) captchaDialog.findViewById(R.id.reload);\r\n captchaReload.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n }\r\n });\r\n captchaDialog.show();\r\n\r\n } else if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n email.setError(\"Invalid e-mail\");\r\n }\r\n }",
"public void creditcard() {\n\t\tBy cd=By.xpath(\"//input[@name='creditCard']\");\r\n\t\tWebElement W_cd=wt.WaitForElement(cd, 10);\r\n\t\tW_cd.sendKeys(\"5462897859858\");\r\n\t\t\r\n\t\t}",
"public interface CaptchaAlgorithm {\n\n Captcha generate();\n\n}",
"@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t\tMobclickAgent.onPageEnd(\"获取验证码\");\r\n\t}",
"@Override\n public void timerExpired() {\n //Inform the player they have failed\n if (isEnglish) {\n Toast.makeText(this, LOSS, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, LOSS_CHINESE, Toast.LENGTH_SHORT).show();\n }\n\n //Set visibility for replay button to visible\n replayButton.setVisibility(View.VISIBLE);\n retryButton.setVisibility(View.VISIBLE);\n scoreboardButton.setVisibility(View.VISIBLE);\n }",
"private URL resolveRecaptcha(CharSequence content) {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic void validate(FacesContext fc, UIComponent arg1, Object arg2)\r\n\t\t\tthrows ValidatorException {\n HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\r\n Boolean isResponseCorrect = Boolean.FALSE;\r\n javax.servlet.http.HttpSession session = request.getSession();\r\n String parm = (String)arg2;\r\n String c = (String) session.getAttribute(MyCaptcha.CAPTCHA_KEY);\r\n if (!parm.equals(c)) {\r\n \tFacesMessage message = new FacesMessage();\r\n \tmessage.setSummary(\"You have entered invalid text for image.\");\r\n \tmessage.setSeverity(FacesMessage.SEVERITY_ERROR);\r\n \tthrow new ValidatorException(message);\r\n\r\n }\r\n\t}",
"public void setVerificationCode(String OTP) {\n\t\thelper.findElementById(otpFieldId).sendKeys(OTP);\n\t}",
"@Override\n public void onSuccess(SafetyNetApi.RecaptchaTokenResponse response) {\n userResponseToken = response.getTokenResult();\n if (!userResponseToken.isEmpty()) {\n // Validate the user response token using the\n // reCAPTCHA siteverify API.\n // new SendPostRequest().execute();\n sendRequest();\n }\n }",
"private long verifyRenewalCode(int pCipher, String pRenewalCode)\n{\n\n //remove all non-numeric characters from the string - this allows the user\n //to enter the number with separator spaces, dashes, etc.\n\n String stripped = \"\";\n for (int i = 0; i < pRenewalCode.length(); i++) {\n if (isNumeric(pRenewalCode.charAt(i))) {\n stripped += pRenewalCode.charAt(i);\n }\n }\n\n //convert to an integer ~ set to -1 if invalid to force failure\n long renewalCode;\n try{renewalCode = Long.valueOf(stripped);}\n catch(NumberFormatException e){\n displayErrorMessage(\"Error L9001: Invalid entry.\");\n return (-1);\n }\n\n //verify that the last byte of the integer is the checksum of the first\n //seven, i.e. adding all the bytes together should equal 0x100\n\n int checksum = 0;\n for (int i=0; i<8; i++) {\n checksum += (renewalCode>>(i*8)) & 0xff;\n }\n\n checksum &= 0xff; //mask off upper bits\n\n if(checksum != 0){\n displayErrorMessage(\"Error L9002: Invalid checksum.\");\n return (-1);\n }\n\n //snip off the checksum\n renewalCode = renewalCode >> 8;\n\n //decode the renewal code\n renewalCode = encodeDecode(renewalCode);\n\n //the number of days to renew is in the lower four decimal digits\n //the remaining digits are the code which matches the cipher\n //parse the renewal code into the days and match code\n\n //get the renewal length in days\n long renewalLength = renewalCode % 10000; //get four lower digits\n //get the match code\n renewalCode /= 10000; //strip off lower four decimal digits\n\n if (renewalCode != pCipher){\n displayErrorMessage(\"Error L9003: Invalid code.\");\n return (-1);\n }\n\n //get current date/time\n long nowTime = System.currentTimeMillis();\n //convert the number of days for renewal to milliseconds\n long renewalTime = renewalLength * 24 * 3600 * 1000;\n //add renewal time to now time to get the expiration date\n long expireTime = nowTime + renewalTime;\n\n return(expireTime);\n\n}",
"private void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int width = 250;\n int height = 100;\n //vectorul de captcha-uri\n// char data[][] = {\n// { 'm', 'a', 'n', 'c', 'a', 'r', 'e' },\n// { 'b', 'e', 't', 'o', 'n' },\n// { 'f', 'r', 'i', 'g', 'i', 'd', 'e', 'r' },\n// { 's', 'u', 'p', 'e', 'r', 'm', 'a', 'n' },\n// { 'j', 'e', 't' }\n// };\n\n //folosim o imagine buffer pentru a desena captcha-ul\n BufferedImage bufImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n Graphics2D g2d = bufImg.createGraphics();\n Font font = new Font(\"Georgia\", Font.BOLD, 18);\n g2d.setFont(font);\n g2d.setColor(Color.WHITE);\n\n //folosim hint-uri ca sa crestam calitatea textului din poza\n RenderingHints rHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n rHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n g2d.setRenderingHints(rHints);\n\n //desenam gradientul, pentru fundalul imaginii\n GradientPaint gPaint = new GradientPaint(0, 0, Color.BLUE, 0, height/2, Color.black, true);\n g2d.setPaint(gPaint);\n g2d.fillRect(0, 0, width, height);\n g2d.setColor(new Color(255, 153, 0));\n\n //numar random pt vectorul de captcha-uri\n Random rand = new Random();\n char data[][] = {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}};\n for (int i = 0; i < 8; i++) {\n char r = rndChar();\n data[0][i] = r;\n }\n //int index = Math.abs(rand.nextInt()) % 5;\n int index = 0;\n //trimitem stringul la user sa stie sa compare input-ul de la user\n String captcha = String.copyValueOf(data[index]);\n request.getSession().setAttribute(\"captcha\", captcha);\n\n //desenam captcha-ul ales in imagine\n int x = 0, y = 0;\n for (int i = 0; i < data[index].length; i++) {\n x += 15 + Math.abs(rand.nextInt()) % 15;\n y = 45 + Math.abs(rand.nextInt()) % 20;\n g2d.drawChars(data[index], i, 1, x, y);\n }\n g2d.dispose();\n\n response.setContentType(\"image/png\");\n OutputStream os = response.getOutputStream();\n ImageIO.write(bufImg, \"png\", os);\n os.close();\n }",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (Boolean.TRUE.equals(acc.getBooleanProperty(\"free\"))) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"@Override\n public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {\n String code = phoneAuthCredential.getSmsCode();\n\n Toast.makeText(OTPActivity.this, \"Reached here\", Toast.LENGTH_SHORT).show();\n\n //sometime the code is not detected automatically\n //in this case the code will be null\n //so user has to manually enter the code\n if (code != null) {\n loading.setVisibility(View.VISIBLE);\n etOtp.setText(code);\n etOtp.setEnabled(false);\n Toast.makeText(OTPActivity.this, \"Reached here\", Toast.LENGTH_SHORT).show();\n //verifying the code\n verifyVerificationCode(code);\n }\n }",
"public static boolean validate512(String submittedOTP, byte[] secret, int numDigits) throws GeneralSecurityException {\n Calendar currentDateTime = getCalendar();\n\n String generatedTOTP = TOTP.generateTOTP512(new String(secret), numDigits);\n boolean result = generatedTOTP.equals(submittedOTP);\n\n if (!result) {\n // Step back time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis -= TIME_INTERVAL;\n\n generatedTOTP = TOTP.generateTOTP512(new String(secret), \"\" + timeInMilis, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n if (!result) {\n // Step ahead time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis += TIME_INTERVAL;\n\n generatedTOTP = TOTP.generateTOTP512(new String(secret), \"\" + timeInMilis, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n return result;\n }",
"public void setCaptchaResponse(final String captchaResponse) {\n mCaptchaResponse = captchaResponse;\n }",
"public String CheckPostCode (HashMap<String, ?> InputObj) throws NoSuchElementException {\n\t\tString outRetVal = \"-1\";\n\t\t\n\t\tString inCountryCode = InputObj.get(\"CountryCode\").toString();\n\t\tString inPostCode = InputObj.get(\"PostCode\").toString();\n\t\t\n\t\tCustSiteEditorObj Obj = new CustSiteEditorObj(webdriver);\n\t\t\n\t\tWebElement TxtCountryCode = Obj.getTxtCountryCode();\n\t\tif (!TxtCountryCode.getAttribute(\"value\").equals(inCountryCode)) {\n\t\t\tTxtCountryCode.clear();\n\t\t\tTxtCountryCode.sendKeys(inCountryCode);\n\t\t\tWebElement TxtPostCode = Obj.getTxtPostCode();\n\t\t\tTxtPostCode.click();\n\t\t}\n\t\t\n\t\tboolean isCountryCodeMsgExist = SeleniumUtil.isWebElementExist(webdriver, Obj.getLblCountryCodeMessageLocator(), 1);\n\t\tif (isCountryCodeMsgExist) {\n\t\t\tWebElement LblCountryCodeMessage = Obj.getLblCountryCodeMessage();\n\t\t\tboolean isVisible = LblCountryCodeMessage.isDisplayed();\n\t\t\tif (isVisible) {\n\t\t\t\tCommUtil.logger.info(\" > Msg: \"+LblCountryCodeMessage.getText());\n\t\t\t\tif (CommUtil.isMatchByReg(LblCountryCodeMessage.getText(), \"Only 2 characters\")) {\n\t\t\t\t\toutRetVal = \"1\";\n\t\t\t\t\treturn outRetVal;\n\t\t\t\t} else {\n\t\t\t\t\tCommUtil.logger.info(\" > Unhandled message.\");\n\t\t\t\t\treturn outRetVal;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tWebElement TxtPostCode = Obj.getTxtPostCode();\n\t\tif (!TxtPostCode.getAttribute(\"value\").equals(inPostCode)) {\n\t\t\tTxtPostCode.clear();\n\t\t\tTxtPostCode.sendKeys(inPostCode);\n\t\t\tTxtCountryCode = Obj.getTxtCountryCode();\n\t\t\tTxtCountryCode.click();\n\t\t}\t\n\t\t\n\t\tboolean isPostCodeMsgExist = SeleniumUtil.isWebElementExist(webdriver, Obj.getLblPostCodeMessageLocator(), 1);\n\t\tif (isPostCodeMsgExist) {\n\t\t\tWebElement LblPostCodeMessage = Obj.getLblPostCodeMessage();\n\t\t\tboolean isVisible = LblPostCodeMessage.isDisplayed();\n\t\t\tif (isVisible) {\n\t\t\t\tCommUtil.logger.info(\" > Msg: \"+LblPostCodeMessage.getText());\n\t\t\t\tif (CommUtil.isMatchByReg(LblPostCodeMessage.getText(), \"Only 5 digits\")) {\n\t\t\t\t\toutRetVal = \"2\";\n\t\t\t\t\treturn outRetVal;\n\t\t\t\t} else if (CommUtil.isMatchByReg(LblPostCodeMessage.getText(), \"Only alpha numeric dash space\")) {\n\t\t\t\t\toutRetVal = \"3\";\n\t\t\t\t\treturn outRetVal;\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tCommUtil.logger.info(\" > Unhandled message.\");\n\t\t\t\t\treturn outRetVal;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\toutRetVal = \"0\";\n\t\treturn outRetVal;\n\t\t\n\t}",
"public static\n void checkExpiringPassword()\n {\n User user = ResourcesMgr.getSessionManager().getUser();\n \n String sPassword = user.getPassword();\n \n // Controllo della scadenza della password al primo accesso\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n // Primo accesso\n boolean boExpiredFA = ResourcesMgr.getBooleanProperty(ResourcesMgr.sGUILOGIN_EXP_FIRSTA, false);\n if(boExpiredFA) {\n GUIMessage.showWarning(\"Questo \\350 il Suo primo accesso. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n \n // Controllo della scadenza della password rispetto a quando e' stata aggiornata l'ultima volta.\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n int iExpirationDays = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_DAYS, 0);\n if(iExpirationDays > 0) {\n int iDays = getDaysFrom(user.getDatePassword());\n if(iExpirationDays <= iDays) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n else {\n int iMonths = getMonthsFrom(user.getDatePassword());\n int iExpirationMonths = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_MONTHS, 0);\n if(iExpirationMonths > 0 && iExpirationMonths <= iMonths) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n }\n }",
"@Nullable\n private String getCaptchaPublicKey() {\n return RegistrationToolsKt.getCaptchaPublicKey(mRegistrationResponse);\n }",
"@Override\n public void onFailure(Call<String> call, Throwable t) {\n dismissProgress();\n SecurityLayer.generateToken(getApplicationContext());\n com.ceva.ubmobile.core.ui.Log.debug(\"otpvalidation\", t.toString());\n //showToast(getString(R.string.error_500));\n // prog.dismiss();\n // startDashBoard();\n }",
"private void scanTicket(){\r\n\t\ttext = numberField.getText();\r\n\t\t//Number field text is converted into char \r\n\t\tstringToChar(text);\r\n\t\tif(executed == false){\r\n\t\t\trandom();\r\n\t\t}\r\n\t}",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (acc.getType() == AccountType.FREE) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"public void verifyCodePressed(View view) {\r\n emailTo = String.valueOf(etEmail.getText());\r\n //Generate the random verify code\r\n verifyCode = (int)((Math.random() * 9 + 1) * 100000);\r\n Toast.makeText(ForgetPswActivity.this,\"Sending..... the verify code\", Toast.LENGTH_LONG).show();\r\n Thread thread = new Thread(){\r\n @Override\r\n public void run() {\r\n EmailUtil.getInstance().sendEmail(emailTo,\"Verify Code from Digital Learner Logbook\",\r\n \"DLL send a verify code: \" + verifyCode +\r\n \", This code is for reset the password only!\" );\r\n\r\n Looper.prepare();\r\n Toast.makeText(ForgetPswActivity.this,\"Sent the verify code\", Toast.LENGTH_LONG).show();\r\n Looper.loop();\r\n }\r\n };\r\n thread.start();\r\n\r\n }",
"private String getDllinkWebsiteCaptcha(final Account account, final DownloadLink link) throws IOException, PluginException, InterruptedException {\n Form captchaform = br.getFormbyActionRegex(\".*/redirect.*\");\r\n if (captchaform == null) {\r\n /* Fallback */\r\n captchaform = br.getForm(0);\r\n }\r\n if (captchaform == null) {\r\n logger.warning(\"captchaform is null\");\r\n }\r\n final String recaptchaV2Response = new CaptchaHelperHostPluginRecaptchaV2(this, br).getToken();\r\n captchaform.put(\"g-recaptcha-response\", recaptchaV2Response);\r\n br.setFollowRedirects(false);\r\n br.submitForm(captchaform);\r\n final String dllink = br.getRedirectLocation();\r\n if (!StringUtils.isEmpty(dllink)) {\r\n /* Store directurl */\r\n link.setProperty(this.getHost() + \"directurl_selfhosted\", dllink);\r\n }\r\n return dllink;\r\n }",
"public static boolean validate(String submittedOTP, byte[] secret, int numDigits) throws GeneralSecurityException {\n Calendar currentDateTime = getCalendar();\n\n String generatedTOTP = TOTP.generateTOTP(new String(secret), numDigits);\n boolean result = generatedTOTP.equals(submittedOTP);\n\n if (!result) {\n // Step back time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis -= TIME_INTERVAL;\n\n String steps = \"0\";\n long T = (timeInMilis - TOTP.TIME_ZERO) / TOTP.TIME_SLICE_X;\n steps = Long.toHexString(T).toUpperCase();\n\n // Just get a 16 digit string\n while (steps.length() < 16)\n steps = \"0\" + steps;\n\n generatedTOTP = TOTP.generateTOTP(new String(secret), \"\" + steps, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n if (!result) {\n // Step ahead time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis += TIME_INTERVAL;\n\n String steps = \"0\";\n long T = (timeInMilis - TOTP.TIME_ZERO) / TOTP.TIME_SLICE_X;\n steps = Long.toHexString(T).toUpperCase();\n\n // Just get a 16 digit string\n while (steps.length() < 16)\n steps = \"0\" + steps;\n\n generatedTOTP = TOTP.generateTOTP(new String(secret), \"\" + steps, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n return result;\n }",
"public boolean verifyCaptcha(HttpServletRequest servletReq, Request req, Response res, PrintWriter out)\n\t{\n\t\tif ( null == captchaUrls) return true;\n\t\t\n\t\tUserProfile user = req.getUser();\n\t\t\n\t\tStringBuilder sb = new StringBuilder(24);\n\t\tsb.append(req.sensorId).append('.').append(req.action);\n\t\tif ( ! captchaUrls.contains(sb.toString())) return true;\n\t\t\n\t\tMap<String, String> params = req.mapData;\n\n\t\tString readcaptcha = null;\n\t\tString encodedCaptcha = null;\n\t\tif ( params.containsKey(\"readcaptcha\") ) \n\t\t\treadcaptcha = req.getString(\"readcaptcha\", true, true, false);\n\n\t\tif ( params.containsKey(\"encodedcaptcha\") ) \n\t\t\tencodedCaptcha = req.getString(\"encodedcaptcha\", true, true, false);\n\t\telse {\n\t\t\tif ( StringUtils.isEmpty(encodedCaptcha)) {\n\t\t\t\tCookie[] cookies = servletReq.getCookies();\n\t\t\t\tif (cookies != null && cookies.length > 0) {\n\t\t\t\t\tfor (Cookie cookie : cookies) {\n\t\t\t\t\t\tif ( cookie.getName().equals(\"encodedcaptcha\")) {\n\t\t\t\t\t\t\tencodedCaptcha = cookie.getValue(); \n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tString captchaTextEncoded = null;\n\t\tif ( null != readcaptcha && null != encodedCaptcha) {\n\t\t\tString secureCaptchaText = servletReq.getRemoteAddr() + readcaptcha;\n\t\t\tcaptchaTextEncoded = Hash.createHex(this.key, secureCaptchaText);\n\t\t\tif (captchaTextEncoded.equals(encodedCaptcha)) return true;\n\t\t}\n\n\t\tres.setErrorCode(\"CAPTCHA_ERROR\", ErrorCodes.CAPTCHA_MISMATCH, user.getLocale(), true);\n\t\treturn false;\n\t}",
"boolean isCardApiTicketExpired(String appId);",
"@Override\n public void onCodeSent(@NonNull String s, @NonNull PhoneAuthProvider.ForceResendingToken forceResendingToken) {\n super.onCodeSent(s, forceResendingToken);\n verificationId = s;\n // start showing the pin view and verify button\n Toast.makeText(MainActivity.this, \"Enter OTP to verify\", Toast.LENGTH_SHORT).show();\n OTP.setVisibility(View.VISIBLE);\n verifyButton.setVisibility(View.VISIBLE);\n }",
"@Override\n public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {\n code = phoneAuthCredential.getSmsCode();\n\n //sometimes the code is not detected automatically\n //in this case the code will be null\n //so user has to manually enter the code\n if (code != null) {\n\n codeValues_into_views(code);\n\n stop_timer();\n //verify the code\n verifyVerificationCode(code);\n }\n }",
"public CaptchaIncorrectoException() {\n super(ERROR_KEY);\n }",
"private AuthParams getCaptchaAuthParams(final String captchaResponse) {\n AuthParamsCaptcha authParams = new AuthParamsCaptcha();\n authParams.response = captchaResponse;\n return authParams;\n }",
"public interface OnCaptchaMatchCallback {\n void matchSuccess(CustomerPuzzleCodeView customerPuzzleCodeView);\n void matchFailed(CustomerPuzzleCodeView customerPuzzleCodeView);\n}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\ttime=30;\n\t\t\t\tverfy_button.setEnabled(false);\n\t\t\t\thandler.postDelayed(runnable, 1000); \n\t\t\t\tinitSDK();\n\t\t\t\tSMSSDK.getVerificationCode(\"86\",textview_phone.getText().toString());\n\t\t\t\t\n\t\t\t}",
"public static void Android_Invalid_otp() {\n try {\n\n AppiumDriver<MobileElement> driver = getAppiumDriver();\n Thread.sleep(2000);\n MobileElement el1 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[1]/android.widget.EditText\");\n el1.click();\n\n String userName = getData(\"UserName\");\n el1.sendKeys(userName);\n driver.hideKeyboard();\n MobileElement el2 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[3]/android.widget.EditText\");\n String password = getData(\"Password\");\n\n el2.sendKeys(password);\n driver.hideKeyboard();\n ReportHelper.logReportStatus(LogStatus.PASS, \"UserName and Password Given Successfully\");\n\n MobileElement loginBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Login']\");\n loginBtn.click();\n\n Thread.sleep(12000);\n\n driver.findElementByXPath(\"//android.widget.EditText[@text='Confirmation Code']\").sendKeys(\"5252\");\n Thread.sleep(2000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Invalid OTP Given Successfully\");\n driver.hideKeyboard();\n MobileElement continueBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Continue']\");\n continueBtn.click();\n Thread.sleep(15000);\n MobileElement Errormsg = driver.findElementByXPath(\"//android.widget.TextView[@text='Sorry the authentication code you entered is incorrect. Please try again.']\");\n\n if (Errormsg.isDisplayed()) {\n Thread.sleep(3000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Sorry the authentication code you entered is incorrect. Please try again.\");\n MobileElement e2 = driver.findElementByXPath(\"//android.widget.Button[@text='Go To Home']\");\n e2.click();\n Thread.sleep(2000);\n }\n\n\n } catch (Exception e) {\n ReportHelper.logReportStatus(LogStatus.FAIL, \"login into the application\");\n\n }\n }",
"public static boolean validate256(String submittedOTP, byte[] secret, int numDigits) throws GeneralSecurityException {\n Calendar currentDateTime = getCalendar();\n\n String generatedTOTP = TOTP.generateTOTP256(new String(secret), numDigits);\n boolean result = generatedTOTP.equals(submittedOTP);\n\n if (!result) {\n // Step back time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis -= TIME_INTERVAL;\n\n generatedTOTP = TOTP.generateTOTP256(new String(secret), \"\" + timeInMilis, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n if (!result) {\n // Step ahead time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis += TIME_INTERVAL;\n\n generatedTOTP = TOTP.generateTOTP256(new String(secret), \"\" + timeInMilis, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n return result;\n }",
"@RequestMapping(\"/user.imagecode\")\n public void getImageCode(HttpSession session, HttpServletResponse response) throws Exception {\n String vericode = VerificationCode.getSecurityCode();\n session.setAttribute(\"verityCode\", vericode);\n // 设置返回的内容\n response.setContentType(\"img/jpeg\");\n // 浏览器不缓存响应内容--验证码图片,点一次就要刷新一次,所以不能有缓存出现\n response.setHeader(\"Pragma\", \"No-cache\");\n response.setHeader(\"Cache-Control\", \"no-cache\");\n // 设置验证码失效时间\n response.setDateHeader(\"Expires\", 0);\n // 以字节流发过去,交给img的src属性去解析即可\n ImageIO.write(new CreateVerificationCodeImage(vericode).createImage(), \"JPEG\", response.getOutputStream());\n }",
"@Override\n\n public void onCodeSent(String verificationId,\n PhoneAuthProvider.ForceResendingToken token) {\n\n Toast.makeText(otpsignin.this, verificationId, Toast.LENGTH_SHORT).show();\n\n Log.d(TAG, \"onCodeSent:\" + verificationId);\n\n Toast.makeText(otpsignin.this,\"On code sent meathod\",Toast.LENGTH_SHORT).show();\n\n // Save verification ID and resending token so we can use them later\n\n btntype=1;\n\n\n mVerificationId = verificationId;\n\n mResendToken = token;\n\n btnOTP.setText(\"Verify code\");\n\n // ...\n }",
"@Test\n public void testOtp(){\n String secret = \"whatever is here is okay\";\n Totp totp = new Totp(secret);\n String now = totp.now();\n assertThat(totp.verify(now)).isEqualTo(true);\n }",
"boolean expired();",
"@Test\n\tpublic void checkconfirmpassword_characters()\n\t{\n\t\t\n\t\tPageFactory.initElements(driver, Resetpassword.class);\n\t\tResetpassword.confirm_password.sendKeys(\"co12!@\");\n\t\tString user_text=Resetpassword.error_message.getText();\n\t\tAssert.assertEquals(user_text,\"co12!@\");\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\tpwd1=new String(jf1.getPassword());\r\n\t\t\t\tif(currCard.getPwd().equals(pwd1)){\r\n\t\t\t\t\tjl1.setText(\"\");\r\n\t\t\t\t\tis1=true;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tis1=false;\r\n\r\n\t\t\t\t\tjl1.setText(\"密码错误\");\r\n\t\t\t\t\t//jf1.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\n public void failure(DigitsException exception) {\n Toast.makeText(ForgotPassword.this, \"Couldn't verify phone number\", Toast.LENGTH_SHORT).show();\n finish();\n }",
"String getPasswordExpiredMailBody( );",
"Duration getTokenExpiredIn();",
"private void sendVerificationCode(String phone_number){\n Log.d(TAG, \"sendVerificationCode: SENDING OTP\");\n progressBar.setVisibility(View.VISIBLE);\n PhoneAuthProvider.getInstance().verifyPhoneNumber(\n phone_number,\n 60,\n TimeUnit.SECONDS,\n TaskExecutors.MAIN_THREAD,\n mCallBack\n );\n }",
"public boolean verifyPasswordExpiration(){\n throw new UnsupportedOperationException();\n }",
"private void timerExpired() {\r\n timer.stop();\r\n mainFrame.setEnabled(true);\r\n inputPanel.addKits(receivedKits);\r\n messageSent = false;\r\n setMessage(finishedReceivingMessage, Color.BLUE);\r\n receivedKits.clear();\r\n }",
"public static void main(String[] args) throws Exception {\r\n\t\tSystem.out.println(\"Does the captcha contain alphabets (yes or no) :\");\r\n\tScanner sc=new Scanner(System.in);\r\n\tString in=sc.nextLine(); // taking imput (yes or no)\r\n\tif(in.toLowerCase().equals(\"yes\") || in.toLowerCase().equals(\"y\")) // checking if the input is yes\r\n\t{\r\n\t\talpha=true; // if input is yes alpha flag is set to true\r\n\t\tfor (int i=0; i<35; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\")); // taking all the templates along with alphabets into consideration\r\n\t\t}\r\n\r\n\t}\r\n\telse\r\n\t{\r\n\t\talpha=false;// if input is not yes alpha flag is set to true\r\n\t\tfor (int i=0; i<10; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\"));// taking all the templates along with out alphabets into consideration\r\n\t\t}\r\n\t}\r\n\t\tint numTests = 100; // total number of trials\r\n\t\t\r\n\t\t// read in the templates for each character\r\n\t\tfor (int i=0; i<35; i++) { // for each possible character\r\n\t\t\ttemplates[i] = ImageIO.read(new File(\"template\" + i+ \".gif\"));\r\n\t\t}\r\n\r\n\t\tint correct = 0;\r\n\t\tfor (int i=0; i<numTests; i++) {\r\n\t\t\t\r\n\t\t\t// generate a random string\r\n\t\t\tString rightAnswer = randomString(6,alpha);\r\n\t\t\t\r\n\t\t\t// make a captcha from it\r\n\t\t\tBufferedImage captchaImage = generateCaptcha(rightAnswer);\r\n\t\t\t\r\n\t\t\tif (show) {\r\n\t\t\t\tImageIO.write(captchaImage, \"jpeg\", new File(\"see.jpg\"));\r\n\t\t\t\tshow = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// guess the captcha\r\n\t\t\t\r\n\t\t\tString guess = guessCaptcha(captchaImage);\r\n\t\t\t// see if we got it right\r\n\t\t\tif (guess.equals(rightAnswer)) correct++;\r\n\t\t}\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"accuracy: \" + (correct / (double) numTests));\r\n\t}",
"public void expiredate() {\n\t\tdr.findElement(By.xpath(\"//input[@id='expiryDate']\")).sendKeys(\"05/2028\");\r\n\t\t\r\n\t\t\r\n\t\t}",
"public static void enterCaptcha(WebElement captchaField) {\n\t\tString captchaVal = JOptionPane.showInputDialog(\"Please enter the captcha value:\");\n\t\tSystem.out.println(captchaVal);\n\t\t// Type the entered captcha to the text box\n\t\tcaptchaField.sendKeys(captchaVal);\n\t}",
"private void sendVerificationCode() {\n\n PhoneAuthProvider.getInstance().verifyPhoneNumber(\n \"+91\" + phoneNumber, // Phone number to verify\n 60, // Timeout and unit\n TimeUnit.SECONDS,\n this,\n mCallbacks\n );\n }",
"public void v_Verify_Guest12_Hidden(){\n\t}",
"@Override\r\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\t pwd2=new String(jf2.getPassword());\r\n\t\t\t\t\r\n\r\n\t\t\t\tif(is1==true){\r\n\t\t\t\tif(currCard.getPwd().equals(pwd2)){\r\n\t\t\t\t\tjl2.setText(\"新旧密码不能一致\");\r\n\t\t\t\t\t//jf2.requestFocus();\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tis2=true;\r\n\t\t\t\t\tjl2.setText(\"\");\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}",
"public void v_Verify_Guest9_Hidden(){\n\t}",
"public void resendOTP(View view) {\n showSnackbar(\"Resending OTP\");\n\n PhoneAuthOptions authOptions = PhoneAuthOptions.newBuilder(mFirebaseAuth)\n .setPhoneNumber(getString(R.string.country_code) + mPhoneNumber)\n .setTimeout(60L, TimeUnit.SECONDS).setActivity(this).setForceResendingToken(mToken)\n .setCallbacks(mCallBacks).build();\n\n PhoneAuthProvider.verifyPhoneNumber(authOptions);\n }",
"@Test\r\n\tpublic void verification(){\n\t\tdriver.findElement(By.className(\"button block\")).click();\r\n\t\t\r\n\t\t//open a new tab\r\n\t\tdriver.findElement(By.cssSelector(\"body\")).sendKeys(Keys.CONTROL +\"t\");\r\n\t\t\r\n\t\t//switch to new tab\r\n\t\tArrayList<String> tabs = new ArrayList<String>(driver.getWindowHandles());\r\n\t\tdriver.switchTo().window(tabs.get(1));\r\n\t driver.get(\"https://www.textnow.com/login\");\r\n\t driver.findElement(By.id(\"loginUsername\")).sendKeys(\"elaineren\");\r\n\t driver.findElement(By.id(\"loginPassword\")).sendKeys(\"5691219-kk\");\r\n\t driver.findElement(By.id(\"submitLogin\")).click();\r\n\t \r\n\t String scode=driver.findElement(By.id(\"new\")).getText();\r\n\t System.out.println(scode);\r\n\t \r\n\t driver.findElement(By.linkText(\"Log Out\"));\r\n\t \r\n\t driver.switchTo().window(tabs.get(0));\r\n\t}",
"public String getCusNoPass() {\r\n return cusNoPass;\r\n }",
"boolean hasExpiredTrialLicense() {\n return false;\n }",
"public interface CaptchaService {\n /**\n * 生成验证码图片\n *\n * @param captchaId\n * @return\n */\n BufferedImage buildImage(String captchaId);\n\n /**\n * 验证 验证码\n * @param captchaType\n * @param captchaId\n * @param captcha\n * @return\n */\n boolean isValid(Setting.CaptchaType captchaType, String captchaId, String captcha);\n}",
"public final C5862cv mo12409a() {\n int i = 1;\n AppMethodBeat.m2504i(98676);\n this.f15292m = System.currentTimeMillis();\n this.f1552p = SystemClock.elapsedRealtime();\n this.f1549E.f1563a = this.f1552p;\n this.f1559w = new C5862cv(0, \"\", 0);\n try {\n C5862cv c5862cv;\n if (m9025c()) {\n c5862cv = this.f1559w;\n m9026d();\n this.f1552p = SystemClock.elapsedRealtime() - this.f1552p;\n this.f1549E.mo12412a();\n if (!(this.f1559w.f1540a == 0 || !C31029ce.m49853h() || this.f1559w.f1540a == -20)) {\n if (C24362a.m37665a(\"direct_fail_to_report_dns_ip\", 0, 1, 0) != 1) {\n i = 0;\n }\n if (i != 0) {\n this.f1548D = C24373eu.m37744c(this.f1560x);\n }\n }\n AppMethodBeat.m2505o(98676);\n return c5862cv;\n }\n HttpURLConnection httpURLConnection;\n URL url = new URL(this.f15281b);\n this.f1561y = url.getProtocol().toLowerCase().startsWith(\"https\");\n this.f1562z = C24373eu.m37746d(url.getHost());\n if (this.f1561y) {\n if (!this.f1553q || C31029ce.m49856k() == null) {\n HttpsURLConnection httpURLConnection2 = (HttpsURLConnection) url.openConnection();\n } else {\n httpURLConnection2 = (HttpsURLConnection) url.openConnection(C31029ce.m49856k());\n }\n if (this.f1562z) {\n this.f1551G = new C5861cu(this.f1560x);\n httpURLConnection2.setSSLSocketFactory(this.f1551G);\n httpURLConnection2.setHostnameVerifier(new C5860ct(this.f1560x));\n }\n } else {\n httpURLConnection2 = (!this.f1553q || C31029ce.m49856k() == null) ? (HttpURLConnection) url.openConnection() : (HttpURLConnection) url.openConnection(C31029ce.m49856k());\n }\n this.f1556t = httpURLConnection2;\n this.f1556t.setRequestMethod(this.f15282c ? \"GET\" : \"POST\");\n this.f1556t.setConnectTimeout(this.f15285f);\n this.f1556t.setReadTimeout(this.f15285f);\n this.f1556t.setUseCaches(false);\n this.f1556t.setDoInput(true);\n this.f1556t.setInstanceFollowRedirects(false);\n m9024b();\n if (!(this.f15282c || C24373eu.m37739a(this.f15284e))) {\n this.f1556t.setDoOutput(true);\n this.f1547C = (long) this.f15284e.length;\n }\n this.f1549E.f1564b = SystemClock.elapsedRealtime();\n this.f1556t.connect();\n this.f1549E.f1565c = SystemClock.elapsedRealtime();\n if (m9025c()) {\n c5862cv = this.f1559w;\n m9026d();\n this.f1552p = SystemClock.elapsedRealtime() - this.f1552p;\n this.f1549E.mo12412a();\n if (!(this.f1559w.f1540a == 0 || !C31029ce.m49853h() || this.f1559w.f1540a == -20)) {\n if (C24362a.m37665a(\"direct_fail_to_report_dns_ip\", 0, 1, 0) != 1) {\n i = 0;\n }\n if (i != 0) {\n this.f1548D = C24373eu.m37744c(this.f1560x);\n }\n }\n AppMethodBeat.m2505o(98676);\n return c5862cv;\n }\n if (!(this.f15282c || C24373eu.m37739a(this.f15284e))) {\n this.f1557u = new DataOutputStream(this.f1556t.getOutputStream());\n this.f1557u.write(this.f15284e);\n this.f1557u.flush();\n }\n this.f1549E.f1566d = SystemClock.elapsedRealtime();\n int responseCode = this.f1556t.getResponseCode();\n this.f1549E.f1567e = SystemClock.elapsedRealtime();\n this.f1559w.f1542c = responseCode;\n this.f1545A = this.f1556t.getContentType();\n Map hashMap = new HashMap();\n for (Entry entry : this.f1556t.getHeaderFields().entrySet()) {\n if (entry.getKey() != null) {\n hashMap.put(entry.getKey(), ((List) entry.getValue()).get(0));\n }\n }\n this.f1559w.mo12407a(hashMap);\n if (this.f1559w.f1542c >= 200 && this.f1559w.f1542c < 300) {\n this.f1546B = this.f1556t.getContentLength();\n responseCode = C24362a.m37665a(\"app_receive_pack_size\", (int) SQLiteGlobal.journalSizeLimit, 10485760, 2097152);\n if (this.f1546B < 0) {\n m9023a(responseCode);\n } else if (this.f1546B == 0) {\n this.f1559w.f1543d = new byte[0];\n this.f1549E.f1568f = SystemClock.elapsedRealtime();\n } else if (this.f1546B > responseCode) {\n this.f1559w.f1540a = -303;\n this.f1559w.f1541b = this.f1546B;\n } else {\n try {\n byte[] bArr = new byte[this.f1546B];\n this.f1558v = new DataInputStream(this.f1556t.getInputStream());\n this.f1558v.readFully(bArr);\n this.f1559w.f1543d = bArr;\n this.f1549E.f1568f = SystemClock.elapsedRealtime();\n } catch (OutOfMemoryError e) {\n this.f1559w.f1540a = -306;\n this.f1559w.f1541b = this.f1546B;\n }\n }\n } else if (this.f1559w.f1542c >= 300 && this.f1559w.f1542c < 400) {\n this.f15287h = this.f1559w.mo12406a(C8741b.LOCATION);\n }\n m9026d();\n this.f1552p = SystemClock.elapsedRealtime() - this.f1552p;\n this.f1549E.mo12412a();\n if (!(this.f1559w.f1540a == 0 || !C31029ce.m49853h() || this.f1559w.f1540a == -20)) {\n if (C24362a.m37665a(\"direct_fail_to_report_dns_ip\", 0, 1, 0) != 1) {\n i = 0;\n }\n if (i != 0) {\n this.f1548D = C24373eu.m37744c(this.f1560x);\n }\n }\n c5862cv = this.f1559w;\n AppMethodBeat.m2505o(98676);\n return c5862cv;\n } catch (MalformedURLException e2) {\n this.f1559w.f1540a = -300;\n m9026d();\n this.f1552p = SystemClock.elapsedRealtime() - this.f1552p;\n this.f1549E.mo12412a();\n if (!(this.f1559w.f1540a == 0 || !C31029ce.m49853h() || this.f1559w.f1540a == -20)) {\n if (C24362a.m37665a(\"direct_fail_to_report_dns_ip\", 0, 1, 0) != 1) {\n i = 0;\n }\n if (i != 0) {\n this.f1548D = C24373eu.m37744c(this.f1560x);\n }\n }\n } catch (Throwable th) {\n m9026d();\n this.f1552p = SystemClock.elapsedRealtime() - this.f1552p;\n this.f1549E.mo12412a();\n if (!(this.f1559w.f1540a == 0 || !C31029ce.m49853h() || this.f1559w.f1540a == -20)) {\n if (C24362a.m37665a(\"direct_fail_to_report_dns_ip\", 0, 1, 0) != 1) {\n i = 0;\n }\n if (i != 0) {\n this.f1548D = C24373eu.m37744c(this.f1560x);\n }\n }\n AppMethodBeat.m2505o(98676);\n }\n }",
"public void clearOTP(String key){\n otpCache.invalidate(key);\n }",
"private String m50428v() {\n if (TextUtils.isEmpty(this.f30737h0.getText().toString())) {\n return this.f30720S.getString(C10232R.string.payment_error_blank_field);\n }\n return !CardPaymentParams.m53958j(this.f30737h0.getText().toString().trim()) ? this.f30720S.getString(C10232R.string.payment_error_security_code_invalid) : \"\";\n }",
"private String generateNewPassword() throws Exception\n {\n if(this.weblisketSession != null && \n this.weblisketSession.getId() != null)\n {\n int startIndex = this.weblisketSession.getId().length();\n if(startIndex >= 8)\n {\n return this.weblisketSession.getId().substring(startIndex - 8);\n }\n else\n {\n throw new Exception(\"Error Generating New Password\");\n }\n }\n else\n {\n throw new Exception(\"No Session Available For Generating New Password\");\n }\n }",
"void mo33731Pw();",
"public void v_Verify_Guest8_Hidden(){\n\t}",
"BigInteger getCEP();",
"public void Verify(View view) {\n try {\n if (!appsingleton.isvalidateLength(et_username,6)) {\n tv_validationtext.setText(getResources().getString(R.string.st_errorOtplength));\n rl_validation.setVisibility(View.VISIBLE);\n tv_validationtext.startAnimation(appsingleton.shake_animation);\n return;\n }\n else\n {\n rl_validation.setVisibility(View.GONE);\n }\n\n if (AppUtils.isNetworkAvailable(this)) {\n new OTPVerification(et_username.getText().toString()).execute();\n\n }//end of network if\n else\n {\n appsingleton.SnackbarMessage(getResources().getString(R.string.st_internet_error),\"\",et_username);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n\tpublic void onFinishGetVerifyCode(int reg17FoxReturn) {\n\r\n\t\tswitch (reg17FoxReturn) {\r\n\t\tcase 103:\r\n\t\t\tdisplayRegisterResult(\"authKey出错\");\r\n\t\t\tbreak;\r\n\t\tcase 104:\r\n\t\t\tdisplayRegisterResult(\"参数不全\");\r\n\t\t\tbreak;\r\n\t\tcase 105:\r\n\t\t\tdisplayRegisterResult(\"手机格式错误\");\r\n\t\t\tbreak;\r\n\t\tcase 106:\r\n\t\t\tdisplayRegisterResult(\"此手机号已经注册\");\r\n\t\t\tbreak;\r\n\t\tcase 107:\r\n\t\t\tdisplayRegisterResult(\"此手机号不存在\");\r\n\t\t\tbreak;\r\n\t\tcase 108:\r\n\t\t\tToast.makeText(this, \"验证短信稍后发送到您手机\", Toast.LENGTH_LONG).show();\r\n\t\t\tbreak;\r\n\t\tcase 109:\r\n\t\t\tdisplayRegisterResult(\"短信发送失败\");\r\n\t\t\tbreak;\r\n\t\tcase 110:\r\n\t\t\tdisplayRegisterResult(\"短信验证码超时,请重新获取验证码\");\r\n\t\t\tbreak;\r\n\t\tcase 111:\r\n\t\t\tdisplayRegisterResult(\"短信验证码不正确\");\r\n\t\t\tbreak;\r\n\t\tcase 112:\r\n\t\t\tdisplayRegisterResult(\"短信验证通过\");\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tdisplayRegisterResult(\"服务器内部错误\");\r\n\t\t}\r\n\t\tenableYzBtnHandler.sendEmptyMessageDelayed(1, 1000);\r\n\t}",
"@Override\n\tpublic void challenge12() {\n\n\t}",
"public void v_Verify_Guest3_Hidden(){\n\t}",
"public void reEnterAgentPassword(String reAPwd) throws Exception {\n\n\t\twdriver.findElement(By.xpath(\"//input[@placeholder='Please re-enter your password']\")).click();\n\t\twdriver.findElement(By.xpath(\"//input[@placeholder='Please re-enter your password']\")).clear();\n\t\twdriver.findElement(By.xpath(\"//input[@placeholder='Please re-enter your password']\")).sendKeys(reAPwd);\n\t}",
"boolean isJsapiTicketExpired(String appId);",
"@Override\n public void on_Result(int code, String value) {\n Log.e(\"debug\", code + \",value=\" + value);\n if (code == 0) {// 充值成功\n SPUtil.putInt(PayActivity.this, Consts.SP.VIP, vip);\n finish();\n Toast.makeText(PayActivity.this, \"充值成功!\", Toast.LENGTH_LONG).show();\n } else {// 充值失败\n Toast.makeText(PayActivity.this, \"充值失败!\", Toast.LENGTH_LONG).show();\n }\n }",
"public final void cpk() {\n String gj;\n LayoutParams layoutParams;\n AppMethodBeat.m2504i(37315);\n View findViewById = this.contentView.findViewById(2131821333);\n findViewById.setBackgroundColor(WebView.NIGHT_MODE_COLOR);\n int i = this.ieu;\n int i2 = this.iev;\n if (((C3947z) this.qZo).qXw == 1) {\n if (((int) ((C3947z) this.qZo).width) > 0) {\n i2 = (i * ((int) ((C3947z) this.qZo).height)) / ((int) ((C3947z) this.qZo).width);\n }\n findViewById.setLayoutParams(new LayoutParams(i, i2));\n findViewById.setMinimumHeight(i2);\n this.raL = (AdLandingVideoWrapper) findViewById.findViewById(2131821402);\n this.raL.setIMMVideoViewCallback(this);\n this.raL.setOnClickListener(this.rbm);\n this.raL.mo9063c(false, ((C3947z) this.qZo).qWH, 0);\n this.raL.setIsShowBasicControls(true);\n this.gtI = (ProgressBar) findViewById.findViewById(2131821219);\n this.mOX = (ImageView) findViewById.findViewById(2131821511);\n gj = C13473h.m21625gj(\"adId\", ((C3947z) this.qZo).qXv);\n if (!C5730e.m8628ct(gj)) {\n this.rbb = false;\n }\n if (this.rbb) {\n C13473h.m21623c(\"adId\", ((C3947z) this.qZo).qXv, false, 1000000001, new C134585());\n } else {\n this.mOX.setImageBitmap(MMBitmapFactory.decodeFile(gj));\n }\n this.raQ = (TextView) findViewById.findViewById(2131827572);\n this.raQ.setText(this.context.getString(C25738R.string.b6p));\n this.iVh = findViewById.findViewById(2131827636);\n this.iVh.setVisibility(4);\n this.raM = new VideoPlayerSeekBar(this.context);\n this.raM.setVisibility(4);\n if (this.rbi != null) {\n this.rbi.mo15469lb(this.raM.getVisibility() == 0);\n }\n this.raM.setIplaySeekCallback(this);\n this.raM.setOnPlayButtonClickListener(this.rbj);\n layoutParams = new LayoutParams(i - C1338a.fromDPToPix(this.context, 30), -2);\n layoutParams.addRule(12);\n this.raM.setLayoutParams(layoutParams);\n this.raL.setVideoFooterView(this.raM);\n this.raN = (ImageView) findViewById.findViewById(2131827637);\n this.raN.setVisibility(4);\n this.raN.setOnClickListener(this.rbk);\n this.raN.setPadding(0, 0, C1338a.fromDPToPix(this.context, 8), 0);\n this.raP = (ImageView) findViewById.findViewById(2131820981);\n this.raP.setImageDrawable(C1338a.m2864g(this.context, C1318a.shortvideo_play_btn));\n this.raP.setVisibility(8);\n this.raP.setOnClickListener(this.rbl);\n ((ViewGroup) this.raM.getParent()).removeView(this.raM);\n layoutParams.bottomMargin = 0;\n ((ViewGroup) findViewById).addView(this.raM, layoutParams);\n this.raL.setVideoPlayCallback(new C134676());\n AppMethodBeat.m2505o(37315);\n }\n findViewById.setPadding((int) ((C3947z) this.qZo).qWS, (int) ((C3947z) this.qZo).qWQ, (int) ((C3947z) this.qZo).qWT, (int) ((C3947z) this.qZo).qWR);\n findViewById.setLayoutParams(new LayoutParams(i, i2));\n findViewById.setMinimumHeight(i2);\n this.raL = (AdLandingVideoWrapper) findViewById.findViewById(2131821402);\n this.raL.setIMMVideoViewCallback(this);\n this.raL.setOnClickListener(this.rbm);\n this.raL.mo9063c(false, ((C3947z) this.qZo).qWH, 0);\n this.raL.setIsShowBasicControls(true);\n this.gtI = (ProgressBar) findViewById.findViewById(2131821219);\n this.mOX = (ImageView) findViewById.findViewById(2131821511);\n gj = C13473h.m21625gj(\"adId\", ((C3947z) this.qZo).qXv);\n if (C5730e.m8628ct(gj)) {\n }\n if (this.rbb) {\n }\n this.raQ = (TextView) findViewById.findViewById(2131827572);\n this.raQ.setText(this.context.getString(C25738R.string.b6p));\n this.iVh = findViewById.findViewById(2131827636);\n this.iVh.setVisibility(4);\n this.raM = new VideoPlayerSeekBar(this.context);\n this.raM.setVisibility(4);\n if (this.rbi != null) {\n }\n this.raM.setIplaySeekCallback(this);\n this.raM.setOnPlayButtonClickListener(this.rbj);\n layoutParams = new LayoutParams(i - C1338a.fromDPToPix(this.context, 30), -2);\n layoutParams.addRule(12);\n this.raM.setLayoutParams(layoutParams);\n this.raL.setVideoFooterView(this.raM);\n this.raN = (ImageView) findViewById.findViewById(2131827637);\n this.raN.setVisibility(4);\n this.raN.setOnClickListener(this.rbk);\n this.raN.setPadding(0, 0, C1338a.fromDPToPix(this.context, 8), 0);\n this.raP = (ImageView) findViewById.findViewById(2131820981);\n this.raP.setImageDrawable(C1338a.m2864g(this.context, C1318a.shortvideo_play_btn));\n this.raP.setVisibility(8);\n this.raP.setOnClickListener(this.rbl);\n ((ViewGroup) this.raM.getParent()).removeView(this.raM);\n layoutParams.bottomMargin = 0;\n ((ViewGroup) findViewById).addView(this.raM, layoutParams);\n this.raL.setVideoPlayCallback(new C134676());\n AppMethodBeat.m2505o(37315);\n }",
"public void verifyOTP() {\n HashMap<String, String> commonParams = new CommonParams.Builder()\n .add(AppConstant.KEY_COUNTRY_CODE, mCountryCode)\n .add(AppConstant.KEY_PHONE, mPhoneno)\n .add(AppConstant.KEY_OTP, mOTP).build().getMap();\n ApiInterface apiInterface = RestClient.getApiInterface();\n apiInterface.userVerifyOTP(\"bearer\" + \" \" + CommonData.getAccessToken(), commonParams)\n .enqueue(new ResponseResolver<CommonResponse>(OtpActivity.this, true, true) {\n @Override\n public void success(final CommonResponse commonResponse) {\n Log.d(\"debug\", commonResponse.getMessage());\n\n }\n\n @Override\n public void failure(final APIError error) {\n Log.d(\"debug\", error.getMessage());\n\n }\n });\n }",
"@SuppressWarnings(\"unused\")\n void expire();",
"public static String CrackThisFixedlen(String input, int pwlength)\n {\n \n System.out.println(\"Started at \" + ShowDate());\n\n String chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890,./;'<>?:@[]\\\\{}|!\\\"`¬~#£$%^&*()_+-=\";\n \n // init array\n int[] ticker = new int[pwlength]; // arrays of int are automatically filled with zeroes\n int i = pwlength-1;\n \n while(i >= 0){\n // set up my attempt\n String attempt = \"\";\n for(int a=0; a<pwlength;a++) attempt += chars.charAt(ticker[a]);\n \n // attempt is in 'attempt' - now see if it matches\n \n if(DigestUtils.sha1Hex(attempt).equals(input)){\n System.out.println(\"Finished with positive result at \" + ShowDate());\n return attempt;\n }\n \n //increment the characters in the attempt\n \n if(ticker[i] == chars.length()-1){\n // reset and move left\n ticker[i] = 0;\n i--;\n } else{\n // increment and ensure i is looking at the end of the string\n ticker[i]++;\n i = pwlength-1;\n }\n }\n System.out.println(\"Finished with null result at \" + ShowDate());\n return null;\n }",
"public void v_Verify_Guest5_Hidden(){\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tresp.setCharacterEncoding(\"utf-8\");\n\t\tresp.setContentType(\"text/html;charset=utf-8\");\n\t\tout=resp.getWriter();\n\t\tsession=req.getSession();\n\t\t//读取表单数据\n\t\tString usname=req.getParameter(\"usname\");\n\t\tString psword=req.getParameter(\"psword\");\n\t\tString yzm=req.getParameter(\"randomCode\");\n\t\t//是否Cookie登录\n\t\tString ck=req.getParameter(\"login\");\n\t\tif(ck==null){\n\t\t\tck=\"\";\n\t\t}\n\n\t\tif(\"ck\".equals(ck)){\n\t\t\tthis.loginNoCokie(usname, psword);\n\t\t\t//System.out.println(usname+\" \"+psword);\n\t\t\treturn;\n\t\t}\n\t\t//System.out.println(yzm);\n\t\t\n\t\tif(usname==null || psword==null || yzm==null){\n\t\t\tout.println(\"<script>\");\n\t\t\tout.println(\"alert(\\\"输入信息不能为空!\\\");\");\n\t\t\tout.println(\"window.location.href=\\\"login.jsp\\\";\");\n\t\t\tout.println(\"</script>\");\n\t\t\treturn;\n\t\t}\n\t\tif(\"\".equals(yzm) || \"\".equals(usname)){\n\t\t\tout.println(\"<script>\");\n\t\t\tout.println(\"alert(\\\"输入信息不能为空!\\\");\");\n\t\t\tout.println(\"window.location.href=\\\"login.jsp\\\";\");\n\t\t\tout.println(\"</script>\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//判断验证码,不正确直接pass\n\t\t\n\t\tString yzm2=(String)session.getAttribute(\"randomCode\");\n\t\t\n\t\tif(!(yzm.equals(yzm2))){\n\t\t\tout.println(\"<script>\");\n\t\t\tout.println(\"alert(\\\"验证码输入有误!\\\");\");\n\t\t\tout.println(\"window.location.href=\\\"login.jsp\\\";\");\n\t\t\tout.println(\"</script>\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//获取Cookie时效的参数\n\t\tString shixiao=req.getParameter(\"shixiao\");\n\t\t//处理有效性\n\t\tif(shixiao==null){\n\t\t\tshixiao=\"now\";\n\t\t}\n\t\t\n\t\t//根据不同的cookie时效,进行处理\n\t\tif(\"now\".equals(shixiao)){\n\t\t\tthis.loginNoCokie(usname, psword);\n\t\t}\n\t\t\n\t\tint age=0;\n\t\tif(\"week\".equals(shixiao)){\n\t\t\tage=60*60*24*7;\n\t\t\tthis.loginAddCokie(usname, psword, age, resp);\n\t\t}\n\t\t\n\t\tif(\"month\".equals(shixiao)){\n\t\t\tage=60*60*24*30;\n\t\t\tthis.loginAddCokie(usname, psword, age, resp);\n\t\t}\n\n\t\t\n\t}",
"@Override\n public String getPostCode() {\n\n if(this.postCode == null){\n\n this.postCode = TestDatabase.getInstance().getClientField(token, id, \"postCode\");\n }\n\n return postCode;\n }",
"public void testLoginWithWrongPUK() {\r\n short i;\r\n byte[] modifiedPuk = new byte[pukCode.length];\r\n for (i = 0; i < pukCode.length; i++) {\r\n modifiedPuk[i] = (byte) (pukCode[i] ^ 0xFF);\r\n }\r\n\r\n try {\r\n tokenHandler.loginPUK(modifiedPuk);\r\n fail(\"Logging in with wrong PUK did not cause an exception\");\r\n } catch (TokenException e) {\r\n assertEquals(ReturnCodes.SW_PUK_VALIDATION_FAILED, e.getSW());\r\n }\r\n }",
"public void user_lost() {\n\tresetExpComp();\r\n }",
"@Override\r\n public boolean isCredentialsNonExpired() {\r\n return true;\r\n }",
"String getExpiry();",
"public int generateOTP(String key){\n int len =4;\n\n int OTP;\n String numbers = \"0123456789\";\n Random rndm_method = new Random();\n\n char[] otp = new char[len];\n\n for (int i = 0; i < len; i++)\n {\n otp[i] =\n numbers.charAt(rndm_method.nextInt(numbers.length()));\n }\n OTP = Integer.parseInt(String.valueOf(otp));\n otpCache.put(key, OTP);\n return OTP;\n }",
"public ErrorMessage verifyCode(String code, Integer year, Long exception);",
"@Override\n public boolean validateOTP(SmsCode smsCode) {\n Object principal = SecurityContextHolder.getContext().getAuthentication();\n SmsCodeDTO auth = (SmsCodeDTO) principal;\n// if (principal instanceof SmsCodeDTO) {\n// String phoneNumberKey = String.valueOf(auth.getPrincipal());\n//// int cachedOTP = this.getOTP(phoneNumberKey);\n// if (String.valueOf(cachedOTP).equals(smsCode.getCode())) {\n// this.clearOTP(String.valueOf(auth.getPrincipal()));\n// List<GrantedAuthority> grantedAuthorities = new ArrayList<GrantedAuthority>\n// (Collections.singleton(new SimpleGrantedAuthority(\"ROLE_USER\")));\n// SmsCodeDTO smsCodeDTO = new SmsCodeDTO(phoneNumberKey, auth.getOtp(), grantedAuthorities);\n// SecurityContextHolder.getContext().setAuthentication(smsCodeDTO);\n// return true;\n// } else {\n// return false;\n// }\n// } else return false;\n return false;\n }",
"private String m50432x() {\n if (TextUtils.isEmpty(this.f30736g0.getText().toString())) {\n return this.f30720S.getString(C10232R.string.payment_error_blank_field);\n }\n return !m50362A() ? this.f30720S.getString(C10232R.string.checkout_error_expiration_date_invalid) : \"\";\n }",
"public void v_Verify_Guest4_Hidden(){\n\t}",
"private String m50433y() {\n if (TextUtils.isEmpty(this.f30738i0.getText().toString().trim())) {\n return this.f30720S.getString(C10232R.string.payment_error_blank_field);\n }\n return !CardPaymentParams.m53961m(this.f30738i0.getText().toString().trim()) ? this.f30720S.getString(C10232R.string.checkout_error_card_holder_invalid) : \"\";\n }",
"@Override\r\n\t\t\tpublic void done(Integer arg0, BmobException arg1) {\n\t\t\t\tif(arg1==null){//验证码发送成功\r\n\t\t \tmyHandler.sendEmptyMessageDelayed(30000, 0);\r\n\t\t }\r\n\t\t\t}",
"@Override\n\tpublic void challenge13() {\n\n\t}",
"@Test\n\tpublic void testUnmatchingPasswordNegative2() {\n\t\tfillSignUpForm(\"marius\",\"voda\",\"[email protected]\",\"Parola123\",\"PaR0la123\",\"socialNetworks\");\n\t\tassertEquals(\"Passwords must match\", driver.findElement(By.cssSelector(\"#sign-up-confirm-password-div > app-form-control-error-message > em > span\")).getText());\n\t}"
]
| [
"0.64009285",
"0.6108579",
"0.6030325",
"0.59501547",
"0.57136077",
"0.56483984",
"0.5546185",
"0.5509822",
"0.5299662",
"0.5261107",
"0.5244211",
"0.52343726",
"0.5166857",
"0.5165088",
"0.5134629",
"0.4927954",
"0.4925316",
"0.48908857",
"0.48907438",
"0.48900735",
"0.48771885",
"0.4864423",
"0.486222",
"0.486123",
"0.48604292",
"0.4857397",
"0.48567483",
"0.48554927",
"0.4846951",
"0.48339662",
"0.48309845",
"0.4820951",
"0.47842658",
"0.47840816",
"0.47765908",
"0.47578046",
"0.47535127",
"0.47531852",
"0.4745502",
"0.47449076",
"0.47222742",
"0.47108525",
"0.47097784",
"0.47025824",
"0.46954465",
"0.46870106",
"0.46854487",
"0.46781838",
"0.46745548",
"0.46738288",
"0.46558136",
"0.46539488",
"0.46522346",
"0.46338853",
"0.4621186",
"0.46146777",
"0.45867708",
"0.4583138",
"0.45815194",
"0.45791748",
"0.45741957",
"0.45733163",
"0.4573242",
"0.4564399",
"0.45613992",
"0.45602766",
"0.45571384",
"0.4556821",
"0.4555031",
"0.45532805",
"0.45480576",
"0.4545209",
"0.45240933",
"0.4523172",
"0.4522217",
"0.45206016",
"0.45160717",
"0.45153216",
"0.4512832",
"0.45105347",
"0.4505422",
"0.44969463",
"0.449572",
"0.44943833",
"0.44810712",
"0.44754907",
"0.44749454",
"0.44708648",
"0.44662368",
"0.4463288",
"0.44615617",
"0.44612688",
"0.44611552",
"0.44516954",
"0.44486246",
"0.4447129",
"0.4443794",
"0.44429496",
"0.44382066",
"0.44320908",
"0.44312343"
]
| 0.0 | -1 |
captcha expired, wrong phone | @Override
public boolean matches(Object list) {
return ((List<String>) list).size() == 2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Captcha() {\n value = generateCaptchaCode();\n id = generateCaptchaID();\n date = System.currentTimeMillis();\n }",
"public void msjereCaptcha(){\r\n click(esperarElementoPresenteEnPagina(locatorMsjeCaptcha));\r\n }",
"@Override\n public boolean validDefaultTime(String code) {\n return kaptcha.validate(code);\n }",
"public static String captcha(){\n\t\tString captcha=\"\";\n\t\tfor(int i=0; i<8; i+=2){\n\t\t\tcaptcha+=(char)(65+Math.random()*26)+\" \";\n\t\t\tcaptcha+=(char)(97+Math.random()*26);\n\t\t}\n\t\treturn captcha;\n\n\t}",
"@Override\r\n public void onClick(View arg0) {\n if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n\r\n //Chaptcha dialog\r\n captchaDialog = new Dialog(CreateAccount.this);\r\n captchaDialog.setContentView(R.layout.captcha_dialog);\r\n captchaDialog.setTitle(\"Please enter captcha\");\r\n\r\n reCaptcha = (ReCaptcha) captchaDialog.findViewById(R.id.recaptcha);\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n\r\n chaptchaAnswer = (EditText) captchaDialog.findViewById(R.id.answer);\r\n\r\n Button captchaVerify = (Button) captchaDialog.findViewById(R.id.verify);\r\n captchaVerify.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n //dialog.dismiss();\r\n reCaptcha.verifyAnswerAsync(\"6LfhQwsTAAAAALJvjUqiurjAdzi4dztuUIGq-NyZ\", chaptchaAnswer.getText().toString(), CreateAccount.this);\r\n }\r\n });\r\n Button captchaReload = (Button) captchaDialog.findViewById(R.id.reload);\r\n captchaReload.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n reCaptcha.showChallengeAsync(\"6LfhQwsTAAAAAL-OKNTUPccd13dyQtwwd09uWFJb\", CreateAccount.this);\r\n }\r\n });\r\n captchaDialog.show();\r\n\r\n } else if (android.util.Patterns.EMAIL_ADDRESS.matcher(email.getText().toString()).matches()) {\r\n email.setError(\"Invalid e-mail\");\r\n }\r\n }",
"public String getCaptchaCode() {\n HttpGet httpget = new HttpGet(HttpURL.getCaptchaURL());\n try {\n HttpEntity entity = this.client.execute(httpget).getEntity();\n\n if (entity != null) {\n InputStream is = entity.getContent();\n File captchaImage = new File(CaptchaOCR.CAPTCHA_IMAGE_PATH);\n OutputStream os = new FileOutputStream(captchaImage);\n IOUtils.copy(is, os);\n IOUtils.closeQuietly(is);\n IOUtils.closeQuietly(os);\n }\n EntityUtils.consume(entity);\n return CaptchaOCR.doOcr();\n } catch (ClientProtocolException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return null;\n }",
"public Bitmap getCaptcha(String devKey) throws CaptchaException {\n\t\tBitmap image = null;\n\t\ttry {\n\t\t\tString getTokenURL = CAPTCHA_URL + \"/get?key=\" + devKey;\n\n\t\t\tURL getUrl = new URL(getTokenURL);\n\n\t\t\tHttpURLConnection httpURLConnection = (HttpURLConnection) getUrl.openConnection();\n\n\t\t\thttpURLConnection.connect();\n\n\t\t\tint code = httpURLConnection.getResponseCode();\n\t\t\tSystem.out.println(code);\n\t\t\tif (code == 200) {\n\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));\n\t\t\t\tString jsonString = reader.readLine();\n\n\t\t\t\tJSONObject jsonObject = new JSONObject(jsonString);\n\t\t\t\tString imageURL = jsonObject.getString(\"image\");\n\t\t\t\tthis.token = jsonObject.getString(\"token\");\n\t\t\t\tthis.verifyURL = jsonObject.getString(\"verify\");\n\t\t\t\tthis.adid = jsonObject.getString(\"adid\");\n\t\t\t\tthis.adurl = jsonObject.getString(\"adurl\");\n\t\t\t\tthis.audioURL = jsonObject.getString(\"audio\");\n\n\t\t\t\treader.close();\n\n\n\t\t\t\t//ini cara defaultnya\n\t\t\t\t/*URL getImageURL = new URL(imageURL);\n\t\t\t\thttpURLConnection = (HttpURLConnection) getImageURL.openConnection();\n\t\t\t\tInputStream imageStream = httpURLConnection.getInputStream();\n\t\t\t\tcode = httpURLConnection.getResponseCode();\n\t\t\t\tif(code == 200){\n\t\t\t\t\timage = BitmapFactory.decodeStream(imageStream);\n\t\t\t\t\timageStream.close();\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"img response http status code is:\" + code);\n\t\t\t\t}\n\t\t\t\thttpURLConnection.disconnect(); */\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//ini pake method bantu\n\t\t\t\timage = loadImageFromUrl(imageURL);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"get response http status code is:\" + code);\n\t\t\t}\t\t\t\n\n\t\t\thttpURLConnection.disconnect();\n\n\t\t} catch(MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch(JSONException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new CaptchaException(e.getMessage());\n\t\t}\n\n\t\treturn image;\n\t}",
"void setCaptcha(ICaptcha captcha);",
"@Test(dependsOnMethods = {\"register\"})\n void confirmEmailAddressByCaptcha() {\n common.findWebElementByXpath(\"//*[@id=\\\"content\\\"]/fieldset/label/div\").click();\n\n //Click on Send captcha button\n common.timeoutSeconds(2);\n common.findWebElementById(\"send-captcha-button\").click();\n\n //No magic code is set\n common.verifyStatusMessage(\"Det uppstod ett problem med verifieringen av att du är en människa. \" +\n \"Var god försök igen.\");\n }",
"@Override\n public void onFailure(Call<String> call, Throwable t) {\n dismissProgress();\n SecurityLayer.generateToken(getApplicationContext());\n com.ceva.ubmobile.core.ui.Log.debug(\"otpvalidation\", t.toString());\n //showToast(getString(R.string.error_500));\n // prog.dismiss();\n // startDashBoard();\n }",
"@Override\n public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {\n String code = phoneAuthCredential.getSmsCode();\n\n Toast.makeText(OTPActivity.this, \"Reached here\", Toast.LENGTH_SHORT).show();\n\n //sometime the code is not detected automatically\n //in this case the code will be null\n //so user has to manually enter the code\n if (code != null) {\n loading.setVisibility(View.VISIBLE);\n etOtp.setText(code);\n etOtp.setEnabled(false);\n Toast.makeText(OTPActivity.this, \"Reached here\", Toast.LENGTH_SHORT).show();\n //verifying the code\n verifyVerificationCode(code);\n }\n }",
"public void resendOTP(View view) {\n showSnackbar(\"Resending OTP\");\n\n PhoneAuthOptions authOptions = PhoneAuthOptions.newBuilder(mFirebaseAuth)\n .setPhoneNumber(getString(R.string.country_code) + mPhoneNumber)\n .setTimeout(60L, TimeUnit.SECONDS).setActivity(this).setForceResendingToken(mToken)\n .setCallbacks(mCallBacks).build();\n\n PhoneAuthProvider.verifyPhoneNumber(authOptions);\n }",
"@Override\n public void failure(DigitsException exception) {\n Toast.makeText(ForgotPassword.this, \"Couldn't verify phone number\", Toast.LENGTH_SHORT).show();\n finish();\n }",
"@Override\n public void timerExpired() {\n //Inform the player they have failed\n if (isEnglish) {\n Toast.makeText(this, LOSS, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, LOSS_CHINESE, Toast.LENGTH_SHORT).show();\n }\n\n //Set visibility for replay button to visible\n replayButton.setVisibility(View.VISIBLE);\n retryButton.setVisibility(View.VISIBLE);\n scoreboardButton.setVisibility(View.VISIBLE);\n }",
"public static void Android_Invalid_otp() {\n try {\n\n AppiumDriver<MobileElement> driver = getAppiumDriver();\n Thread.sleep(2000);\n MobileElement el1 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[1]/android.widget.EditText\");\n el1.click();\n\n String userName = getData(\"UserName\");\n el1.sendKeys(userName);\n driver.hideKeyboard();\n MobileElement el2 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[3]/android.widget.EditText\");\n String password = getData(\"Password\");\n\n el2.sendKeys(password);\n driver.hideKeyboard();\n ReportHelper.logReportStatus(LogStatus.PASS, \"UserName and Password Given Successfully\");\n\n MobileElement loginBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Login']\");\n loginBtn.click();\n\n Thread.sleep(12000);\n\n driver.findElementByXPath(\"//android.widget.EditText[@text='Confirmation Code']\").sendKeys(\"5252\");\n Thread.sleep(2000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Invalid OTP Given Successfully\");\n driver.hideKeyboard();\n MobileElement continueBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Continue']\");\n continueBtn.click();\n Thread.sleep(15000);\n MobileElement Errormsg = driver.findElementByXPath(\"//android.widget.TextView[@text='Sorry the authentication code you entered is incorrect. Please try again.']\");\n\n if (Errormsg.isDisplayed()) {\n Thread.sleep(3000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Sorry the authentication code you entered is incorrect. Please try again.\");\n MobileElement e2 = driver.findElementByXPath(\"//android.widget.Button[@text='Go To Home']\");\n e2.click();\n Thread.sleep(2000);\n }\n\n\n } catch (Exception e) {\n ReportHelper.logReportStatus(LogStatus.FAIL, \"login into the application\");\n\n }\n }",
"@Override\n public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {\n code = phoneAuthCredential.getSmsCode();\n\n //sometimes the code is not detected automatically\n //in this case the code will be null\n //so user has to manually enter the code\n if (code != null) {\n\n codeValues_into_views(code);\n\n stop_timer();\n //verify the code\n verifyVerificationCode(code);\n }\n }",
"private void sendVerificationCode(String phone_number){\n Log.d(TAG, \"sendVerificationCode: SENDING OTP\");\n progressBar.setVisibility(View.VISIBLE);\n PhoneAuthProvider.getInstance().verifyPhoneNumber(\n phone_number,\n 60,\n TimeUnit.SECONDS,\n TaskExecutors.MAIN_THREAD,\n mCallBack\n );\n }",
"public void creditcard() {\n\t\tBy cd=By.xpath(\"//input[@name='creditCard']\");\r\n\t\tWebElement W_cd=wt.WaitForElement(cd, 10);\r\n\t\tW_cd.sendKeys(\"5462897859858\");\r\n\t\t\r\n\t\t}",
"public void verifyOTP() {\n HashMap<String, String> commonParams = new CommonParams.Builder()\n .add(AppConstant.KEY_COUNTRY_CODE, mCountryCode)\n .add(AppConstant.KEY_PHONE, mPhoneno)\n .add(AppConstant.KEY_OTP, mOTP).build().getMap();\n ApiInterface apiInterface = RestClient.getApiInterface();\n apiInterface.userVerifyOTP(\"bearer\" + \" \" + CommonData.getAccessToken(), commonParams)\n .enqueue(new ResponseResolver<CommonResponse>(OtpActivity.this, true, true) {\n @Override\n public void success(final CommonResponse commonResponse) {\n Log.d(\"debug\", commonResponse.getMessage());\n\n }\n\n @Override\n public void failure(final APIError error) {\n Log.d(\"debug\", error.getMessage());\n\n }\n });\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\ttime=30;\n\t\t\t\tverfy_button.setEnabled(false);\n\t\t\t\thandler.postDelayed(runnable, 1000); \n\t\t\t\tinitSDK();\n\t\t\t\tSMSSDK.getVerificationCode(\"86\",textview_phone.getText().toString());\n\t\t\t\t\n\t\t\t}",
"private void sendVerificationCode() {\n\n PhoneAuthProvider.getInstance().verifyPhoneNumber(\n \"+91\" + phoneNumber, // Phone number to verify\n 60, // Timeout and unit\n TimeUnit.SECONDS,\n this,\n mCallbacks\n );\n }",
"public void Verify(View view) {\n try {\n if (!appsingleton.isvalidateLength(et_username,6)) {\n tv_validationtext.setText(getResources().getString(R.string.st_errorOtplength));\n rl_validation.setVisibility(View.VISIBLE);\n tv_validationtext.startAnimation(appsingleton.shake_animation);\n return;\n }\n else\n {\n rl_validation.setVisibility(View.GONE);\n }\n\n if (AppUtils.isNetworkAvailable(this)) {\n new OTPVerification(et_username.getText().toString()).execute();\n\n }//end of network if\n else\n {\n appsingleton.SnackbarMessage(getResources().getString(R.string.st_internet_error),\"\",et_username);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t\tMobclickAgent.onPageEnd(\"获取验证码\");\r\n\t}",
"public void getVerified() {\n Toast.makeText(this, \"Enter your registered mobile number\", Toast.LENGTH_LONG).show();\n\n authCallback = new AuthCallback() {\n\n @Override\n public void success(DigitsSession session, final String phoneNumber) {\n\n //In case phone number gets verified.. call successMethod() function..\n h.post(new Runnable() {\n @Override\n public void run() {\n\n successMethod(phoneNumber);\n containerForgotPassword.setVisibility(View.VISIBLE);\n\n }\n });\n }\n\n @Override\n public void failure(DigitsException exception) {\n //In case phone number isn't verified, finish() this activity displaying appropriate toast..\n Toast.makeText(ForgotPassword.this, \"Couldn't verify phone number\", Toast.LENGTH_SHORT).show();\n finish();\n }\n };\n\n Digits.clearActiveSession();\n getAuthCallback();\n AuthConfig.Builder authConfigBuilder = new AuthConfig.Builder()\n .withAuthCallBack(authCallback)\n .withPhoneNumber(\"+91\");\n Digits.authenticate(authConfigBuilder.build());\n }",
"@Override\n public void success(DigitsSession session, final String phoneNumber) {\n h.post(new Runnable() {\n @Override\n public void run() {\n\n successMethod(phoneNumber);\n containerForgotPassword.setVisibility(View.VISIBLE);\n\n }\n });\n }",
"private URL resolveRecaptcha(CharSequence content) {\n\t\treturn null;\n\t}",
"public interface CaptchaAlgorithm {\n\n Captcha generate();\n\n}",
"public static boolean validate(String submittedOTP, byte[] secret, int numDigits) throws GeneralSecurityException {\n Calendar currentDateTime = getCalendar();\n\n String generatedTOTP = TOTP.generateTOTP(new String(secret), numDigits);\n boolean result = generatedTOTP.equals(submittedOTP);\n\n if (!result) {\n // Step back time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis -= TIME_INTERVAL;\n\n String steps = \"0\";\n long T = (timeInMilis - TOTP.TIME_ZERO) / TOTP.TIME_SLICE_X;\n steps = Long.toHexString(T).toUpperCase();\n\n // Just get a 16 digit string\n while (steps.length() < 16)\n steps = \"0\" + steps;\n\n generatedTOTP = TOTP.generateTOTP(new String(secret), \"\" + steps, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n if (!result) {\n // Step ahead time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis += TIME_INTERVAL;\n\n String steps = \"0\";\n long T = (timeInMilis - TOTP.TIME_ZERO) / TOTP.TIME_SLICE_X;\n steps = Long.toHexString(T).toUpperCase();\n\n // Just get a 16 digit string\n while (steps.length() < 16)\n steps = \"0\" + steps;\n\n generatedTOTP = TOTP.generateTOTP(new String(secret), \"\" + steps, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n return result;\n }",
"public static void RegisterPhone(final Activity activity,final String phoneNumber,final Dialog dialog,final EditText input,final Button send,final Button resend,final GifImageView counter){\n smsCode = phoneVerificationId;\n\n\n FirebaseAuth firebaseAuth = FirebaseAuth.getInstance();\n FirebaseAuthSettings firebaseAuthSettings = firebaseAuth.getFirebaseAuthSettings();\n\n// Configure faking the auto-retrieval with the whitelisted numbers.\n firebaseAuthSettings.setAutoRetrievedSmsCodeForPhoneNumber(phoneNumber, smsCode);\n\n PhoneAuthProvider phoneAuthProvider = PhoneAuthProvider.getInstance();\n phoneAuthProvider.verifyPhoneNumber(\n phoneNumber,\n 60L,\n TimeUnit.SECONDS,\n activity, /* activity */\n mCallbacks = new PhoneAuthProvider.OnVerificationStateChangedCallbacks() {\n @Override\n public void onVerificationCompleted(PhoneAuthCredential credential) {\n // Instant verification is applied and a credential is directly returned.\n // ...\n //SignInWithPhoneAuthCredential(activity,credential,dialog,input,send,resend,counter);\n Toast.makeText(activity, \"credentials : \"+credential, Toast.LENGTH_SHORT).show();\n Toast.makeText(activity, \"Sms : \"+smsCode, Toast.LENGTH_SHORT).show();\n Toast.makeText(activity, \"phone verification Id : \"+phoneVerificationId, Toast.LENGTH_SHORT).show();\n smsMessage = credential.getSmsCode();\n }\n\n @Override\n public void onVerificationFailed(FirebaseException e) {\n Log.e(TAG, \"Error adding document\", e);\n if (e instanceof FirebaseAuthInvalidCredentialsException) {\n Log.d(constants.PhoneRegTag, \"Invalid Credentials\");\n } else if (e instanceof FirebaseTooManyRequestsException) {\n Log.d(constants.PhoneRegTag, \"SMS Verification Pin needed\");\n }\n }\n\n @Override\n public void onCodeSent(String verificationId, PhoneAuthProvider.ForceResendingToken token) {\n phoneVerificationId = verificationId;\n resendingToken = token;\n //PhoneAuthCredential credential = PhoneAuthProvider.getCredential(phoneVerificationId,token.toString());\n //smsMessage = credential.getSmsCode();\n counter.setVisibility(View.GONE);\n input.setVisibility(View.VISIBLE);\n input.requestFocus();\n send.setVisibility(View.VISIBLE);\n resend.setVisibility(View.VISIBLE);\n // The SMS verification code has been sent to the provided phone number, we\n // now need to ask the user to enter the code and then construct a credential\n //and then execute your method if number entered is correct.\n }\n\n\n });\n\n }",
"public boolean verifyCaptcha(HttpServletRequest servletReq, Request req, Response res, PrintWriter out)\n\t{\n\t\tif ( null == captchaUrls) return true;\n\t\t\n\t\tUserProfile user = req.getUser();\n\t\t\n\t\tStringBuilder sb = new StringBuilder(24);\n\t\tsb.append(req.sensorId).append('.').append(req.action);\n\t\tif ( ! captchaUrls.contains(sb.toString())) return true;\n\t\t\n\t\tMap<String, String> params = req.mapData;\n\n\t\tString readcaptcha = null;\n\t\tString encodedCaptcha = null;\n\t\tif ( params.containsKey(\"readcaptcha\") ) \n\t\t\treadcaptcha = req.getString(\"readcaptcha\", true, true, false);\n\n\t\tif ( params.containsKey(\"encodedcaptcha\") ) \n\t\t\tencodedCaptcha = req.getString(\"encodedcaptcha\", true, true, false);\n\t\telse {\n\t\t\tif ( StringUtils.isEmpty(encodedCaptcha)) {\n\t\t\t\tCookie[] cookies = servletReq.getCookies();\n\t\t\t\tif (cookies != null && cookies.length > 0) {\n\t\t\t\t\tfor (Cookie cookie : cookies) {\n\t\t\t\t\t\tif ( cookie.getName().equals(\"encodedcaptcha\")) {\n\t\t\t\t\t\t\tencodedCaptcha = cookie.getValue(); \n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tString captchaTextEncoded = null;\n\t\tif ( null != readcaptcha && null != encodedCaptcha) {\n\t\t\tString secureCaptchaText = servletReq.getRemoteAddr() + readcaptcha;\n\t\t\tcaptchaTextEncoded = Hash.createHex(this.key, secureCaptchaText);\n\t\t\tif (captchaTextEncoded.equals(encodedCaptcha)) return true;\n\t\t}\n\n\t\tres.setErrorCode(\"CAPTCHA_ERROR\", ErrorCodes.CAPTCHA_MISMATCH, user.getLocale(), true);\n\t\treturn false;\n\t}",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (Boolean.TRUE.equals(acc.getBooleanProperty(\"free\"))) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"public void setVerificationCode(String OTP) {\n\t\thelper.findElementById(otpFieldId).sendKeys(OTP);\n\t}",
"@Override\n public void run() {\n codeTime--;\n get_code_btn.setText(codeTime + \"s\");\n if (codeTime <= 0) {\n if (timer != null) {\n timer.cancel();\n }\n get_code_btn.setText(\"获取验证码\");\n isGetVerification=false;\n }\n }",
"public static\n void checkExpiringPassword()\n {\n User user = ResourcesMgr.getSessionManager().getUser();\n \n String sPassword = user.getPassword();\n \n // Controllo della scadenza della password al primo accesso\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n // Primo accesso\n boolean boExpiredFA = ResourcesMgr.getBooleanProperty(ResourcesMgr.sGUILOGIN_EXP_FIRSTA, false);\n if(boExpiredFA) {\n GUIMessage.showWarning(\"Questo \\350 il Suo primo accesso. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n \n // Controllo della scadenza della password rispetto a quando e' stata aggiornata l'ultima volta.\n if(user.getDateLastAccess() == null && sPassword != null && sPassword.length() > 0) {\n int iExpirationDays = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_DAYS, 0);\n if(iExpirationDays > 0) {\n int iDays = getDaysFrom(user.getDatePassword());\n if(iExpirationDays <= iDays) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n else {\n int iMonths = getMonthsFrom(user.getDatePassword());\n int iExpirationMonths = ResourcesMgr.getIntProperty(ResourcesMgr.sGUILOGIN_EXP_MONTHS, 0);\n if(iExpirationMonths > 0 && iExpirationMonths <= iMonths) {\n GUIMessage.showWarning(\"La Sua password risulta scaduta. Il sistema Le richieder\\340 di cambiare la password.\");\n try {\n ResourcesMgr.getGUIManager().showGUIChangePassword(ResourcesMgr.mainFrame, true);\n }\n catch(Exception ex) {\n ex.printStackTrace();\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" exit application\");\n System.exit(1);\n }\n return;\n }\n }\n }\n }",
"@Override\n public void onRequestToken() {\n Toast.makeText(getApplicationContext(), \"Your token has expired\", Toast.LENGTH_LONG).show();\n Log.i(\"Video_Call_Tele\", \"The token as expired..\");\n // mRtcEngine.renewToken(token);\n // https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#af1428905e5778a9ca209f64592b5bf80\n // Renew token - TODO\n }",
"@Override\n public void onSuccess(SafetyNetApi.RecaptchaTokenResponse response) {\n userResponseToken = response.getTokenResult();\n if (!userResponseToken.isEmpty()) {\n // Validate the user response token using the\n // reCAPTCHA siteverify API.\n // new SendPostRequest().execute();\n sendRequest();\n }\n }",
"public boolean hasCaptcha(DownloadLink link, jd.plugins.Account acc) {\r\n if (acc == null) {\r\n /* no account, yes we can expect captcha */\r\n return true;\r\n }\r\n if (acc.getType() == AccountType.FREE) {\r\n /* free accounts also have captchas */\r\n return true;\r\n }\r\n return false;\r\n }",
"@Override\n\n public void onCodeSent(String verificationId,\n PhoneAuthProvider.ForceResendingToken token) {\n\n Toast.makeText(otpsignin.this, verificationId, Toast.LENGTH_SHORT).show();\n\n Log.d(TAG, \"onCodeSent:\" + verificationId);\n\n Toast.makeText(otpsignin.this,\"On code sent meathod\",Toast.LENGTH_SHORT).show();\n\n // Save verification ID and resending token so we can use them later\n\n btntype=1;\n\n\n mVerificationId = verificationId;\n\n mResendToken = token;\n\n btnOTP.setText(\"Verify code\");\n\n // ...\n }",
"public static boolean validate512(String submittedOTP, byte[] secret, int numDigits) throws GeneralSecurityException {\n Calendar currentDateTime = getCalendar();\n\n String generatedTOTP = TOTP.generateTOTP512(new String(secret), numDigits);\n boolean result = generatedTOTP.equals(submittedOTP);\n\n if (!result) {\n // Step back time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis -= TIME_INTERVAL;\n\n generatedTOTP = TOTP.generateTOTP512(new String(secret), \"\" + timeInMilis, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n if (!result) {\n // Step ahead time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis += TIME_INTERVAL;\n\n generatedTOTP = TOTP.generateTOTP512(new String(secret), \"\" + timeInMilis, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n return result;\n }",
"@Override\n public void onCodeSent(@NonNull String s, @NonNull PhoneAuthProvider.ForceResendingToken forceResendingToken) {\n super.onCodeSent(s, forceResendingToken);\n verificationId = s;\n // start showing the pin view and verify button\n Toast.makeText(MainActivity.this, \"Enter OTP to verify\", Toast.LENGTH_SHORT).show();\n OTP.setVisibility(View.VISIBLE);\n verifyButton.setVisibility(View.VISIBLE);\n }",
"@Test\n public void testOtp(){\n String secret = \"whatever is here is okay\";\n Totp totp = new Totp(secret);\n String now = totp.now();\n assertThat(totp.verify(now)).isEqualTo(true);\n }",
"private void verifyPhoneNumber() {\n showSnackbar(\"Verifying Phone Number\");\n\n //Remove Social Sign-ins\n// disableViews(mBinding.imageButtonFacebook, mBinding.imageButtonGoogle);\n //Remove Login Button\n disableViews(mBinding.buttonLogin);\n\n mPhoneNumber = getTextFromTextInputLayout(mBinding.textPhoneNumber);\n PhoneAuthOptions authOptions = PhoneAuthOptions.newBuilder(mFirebaseAuth)\n .setPhoneNumber(getString(R.string.country_code) + mPhoneNumber)\n .setTimeout(60L, TimeUnit.SECONDS).setActivity(this).setCallbacks(mCallBacks).build();\n\n PhoneAuthProvider.verifyPhoneNumber(authOptions);\n }",
"boolean isCardApiTicketExpired(String appId);",
"@Override\r\n public void onFailure(Call call, IOException e) {\n closeNetworkCacheCardView();\r\n showErrorCardView(ACCESS_TIMEOUT);\r\n lockPayNowOrHavePayButton(ACCESS_TIMEOUT);\r\n }",
"@Override\n public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {\n String code = phoneAuthCredential.getSmsCode();\n Log.d(TAG, \"onVerificationCompleted: RECEIVED OTP \"+code);\n if(code != null){\n code_received.setText(code);\n verifyCode(code);\n }\n }",
"public void clearOTP(String key){\n otpCache.invalidate(key);\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(edittext_phone.length()!=11)\n\t\t\t\t{\n\t\t\t\t\tToast.makeText(getBaseContext(), \"手机号码有误!\", Toast.LENGTH_LONG).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(edittext_pas.length()<1)\n\t\t\t\t{\n\t\t\t\t\tToast.makeText(getBaseContext(), \"请输入密码!\", Toast.LENGTH_LONG).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tverfy_button.setEnabled(false);\n\t\t\t\ttime=30;\n\t\t\t\trelativeLayoutregist.setVisibility(View.INVISIBLE);\n\t\t\t\trelativeLayouttijiao.setVisibility(View.VISIBLE);\n\t\t\t\t//传电话号码\n\t\t\t\ttextview_phone.setText(edittext_phone.getText().toString());\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Todo 发送短信,获取验证码\n\t\t\t\tinitSDK();\n\t\t\t\tSMSSDK.getVerificationCode(\"86\",textview_phone.getText().toString());\n\t\t\t\t\t\n\t\t\t\thandler.postDelayed(runnable, 1000); \n\t\t\t\t \n\t\t\t}",
"@Override\n public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {\n final String code = phoneAuthCredential.getSmsCode();\n if (code != null) {\n OTP.setText(code);\n verifyCode(code);\n }\n }",
"private void scanTicket(){\r\n\t\ttext = numberField.getText();\r\n\t\t//Number field text is converted into char \r\n\t\tstringToChar(text);\r\n\t\tif(executed == false){\r\n\t\t\trandom();\r\n\t\t}\r\n\t}",
"public void setCaptchaResponse(final String captchaResponse) {\n mCaptchaResponse = captchaResponse;\n }",
"public void verifyCodePressed(View view) {\r\n emailTo = String.valueOf(etEmail.getText());\r\n //Generate the random verify code\r\n verifyCode = (int)((Math.random() * 9 + 1) * 100000);\r\n Toast.makeText(ForgetPswActivity.this,\"Sending..... the verify code\", Toast.LENGTH_LONG).show();\r\n Thread thread = new Thread(){\r\n @Override\r\n public void run() {\r\n EmailUtil.getInstance().sendEmail(emailTo,\"Verify Code from Digital Learner Logbook\",\r\n \"DLL send a verify code: \" + verifyCode +\r\n \", This code is for reset the password only!\" );\r\n\r\n Looper.prepare();\r\n Toast.makeText(ForgetPswActivity.this,\"Sent the verify code\", Toast.LENGTH_LONG).show();\r\n Looper.loop();\r\n }\r\n };\r\n thread.start();\r\n\r\n }",
"public boolean verifyPasswordExpiration(){\n throw new UnsupportedOperationException();\n }",
"@Override\n public boolean validateOTP(SmsCode smsCode) {\n Object principal = SecurityContextHolder.getContext().getAuthentication();\n SmsCodeDTO auth = (SmsCodeDTO) principal;\n// if (principal instanceof SmsCodeDTO) {\n// String phoneNumberKey = String.valueOf(auth.getPrincipal());\n//// int cachedOTP = this.getOTP(phoneNumberKey);\n// if (String.valueOf(cachedOTP).equals(smsCode.getCode())) {\n// this.clearOTP(String.valueOf(auth.getPrincipal()));\n// List<GrantedAuthority> grantedAuthorities = new ArrayList<GrantedAuthority>\n// (Collections.singleton(new SimpleGrantedAuthority(\"ROLE_USER\")));\n// SmsCodeDTO smsCodeDTO = new SmsCodeDTO(phoneNumberKey, auth.getOtp(), grantedAuthorities);\n// SecurityContextHolder.getContext().setAuthentication(smsCodeDTO);\n// return true;\n// } else {\n// return false;\n// }\n// } else return false;\n return false;\n }",
"public static boolean validate256(String submittedOTP, byte[] secret, int numDigits) throws GeneralSecurityException {\n Calendar currentDateTime = getCalendar();\n\n String generatedTOTP = TOTP.generateTOTP256(new String(secret), numDigits);\n boolean result = generatedTOTP.equals(submittedOTP);\n\n if (!result) {\n // Step back time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis -= TIME_INTERVAL;\n\n generatedTOTP = TOTP.generateTOTP256(new String(secret), \"\" + timeInMilis, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n if (!result) {\n // Step ahead time interval\n long timeInMilis = currentDateTime.getTimeInMillis();\n timeInMilis += TIME_INTERVAL;\n\n generatedTOTP = TOTP.generateTOTP256(new String(secret), \"\" + timeInMilis, numDigits);\n result = generatedTOTP.equals(submittedOTP);\n }\n\n return result;\n }",
"@Override\n public void onVerificationFailed(FirebaseException e) {\n if (e instanceof FirebaseAuthInvalidCredentialsException) {\n Log.d(constants.PhoneRegTag, \"Invalid Credentials\");\n } else if (e instanceof FirebaseTooManyRequestsException) {\n Log.d(constants.PhoneRegTag, \"SMS Verification Pin needed\");\n }\n }",
"@Override\r\n public boolean isCredentialsNonExpired() {\r\n return true;\r\n }",
"@Override\n public void onCodeSent(String verificationId,\n PhoneAuthProvider.ForceResendingToken token) {\n Toast.makeText(PhoneActivity.this,\"Verification code has been send on your number\",Toast.LENGTH_SHORT).show();\n // Save verification ID and resending token so we can use them later\n mVerificationId = verificationId;\n mResendToken = token;\n mPhoneNumber.setVisibility(View.GONE);\n mSendOTP.setVisibility(View.GONE);\n mRideName1.setVisibility(View.GONE);\n\n mRideName2.setVisibility(View.VISIBLE);\n mOTP.setVisibility(View.VISIBLE);\n mVerifyOTP.setVisibility(View.VISIBLE);\n // ...\n }",
"public String PhoneVerify() throws Exception {\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(phoneverified);\r\n\t\t\t\tStr_phoneverified = element.getText();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Phone Number NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn Str_phoneverified;\r\n\t\t\t\r\n\t\t}",
"void clear()\n {\n captcha.reset();\n requestToken.setEnabled(false);\n username.setValue(\"\");\n greeting.setValue(\"\");\n token.setValue(\"\");\n newPassword.setValue(\"\");\n newPasswordRepeat.setValue(\"\");\n show(REQUEST_TOKEN);\n }",
"private void timerExpired() {\r\n timer.stop();\r\n mainFrame.setEnabled(true);\r\n inputPanel.addKits(receivedKits);\r\n messageSent = false;\r\n setMessage(finishedReceivingMessage, Color.BLUE);\r\n receivedKits.clear();\r\n }",
"public CaptchaIncorrectoException() {\n super(ERROR_KEY);\n }",
"Duration getTokenExpiredIn();",
"public void clearOTP(String key) {\n otpCache.invalidate(key);\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return true;\n }",
"public interface OnCaptchaMatchCallback {\n void matchSuccess(CustomerPuzzleCodeView customerPuzzleCodeView);\n void matchFailed(CustomerPuzzleCodeView customerPuzzleCodeView);\n}",
"@Override\r\n public void onClick(View v) {\r\n try {\r\n InputMethodManager imm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);\r\n imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\r\n } catch (Exception e) {\r\n // TODO: handle exception\r\n }\r\n\r\n otp = OTP_ET_1.getText().toString() +\r\n OTP_ET_2.getText().toString() + OTP_ET_3.getText().toString() +\r\n OTP_ET_4.getText().toString();\r\n if (otp.equals(\"null\")||otp.isEmpty()||otp.length()<4){\r\n Toast.makeText(ThirdActivity.this, \"Please enter OTP\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n\r\n HashMap<String, String> params = new HashMap<>();\r\n params.put(\"action\", \"verifyOtp\");\r\n params.put(\"center_id\", centreId);\r\n params.put(\"otp\", otp);\r\n params.put(\"mobile\", number);\r\n progressDialog.show();\r\n apiCall.sendData(Request.Method.POST, OTP_VERIFY, params, \"sendOtp\");\r\n\r\n }",
"public interface CaptchaService {\n /**\n * 生成验证码图片\n *\n * @param captchaId\n * @return\n */\n BufferedImage buildImage(String captchaId);\n\n /**\n * 验证 验证码\n * @param captchaType\n * @param captchaId\n * @param captcha\n * @return\n */\n boolean isValid(Setting.CaptchaType captchaType, String captchaId, String captcha);\n}",
"public void waitForPhoneVerification() \n\t{\n\t\tString xp=\"//android.widget.TextView[contains(@text,'Verify')]\"; \n\t\ttry\n\t\t{\n\t\t\tnew WebDriverWait(driver, 40).until(ExpectedConditions.visibilityOf(phoneVerificationIdentifier));\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tAssert.fail(\"Phone Verification page not found\\n\"+e.getMessage());\n\t\t}\n\t}",
"private void validarResp(){\n String respIngresada = txtRespuesta.getText().toString();\n\n if(respIngresada.equals(respuesta)){\n //Habilita el prox paso\n viewFlipper.showNext();\n pasoFlipper = 1;\n } else {\n txtRespuesta.setError(getString(R.string.error_resp_incorrecta));\n txtRespuesta.requestFocus();\n }\n }",
"@Override\npublic boolean isCredentialsNonExpired() {\n\treturn true;\n}",
"private void _verifyAuthCode(Device device,String authCode){\r\n \t\tdevice.setModified(0); // reset modified to get current time.\r\n \t\tif (device.getStatus() != DeviceStatus.Authing.getStatus()) {\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate,\r\n \t\t\t\t\t\"device auth status not match current status is \"+device.getStatus());\r\n \t\t}\r\n \t\t//\r\n \t\t// if device modified + timeout > current time then throw timeout exception.\r\n \t\t// check verify timeout\r\n \t\t//\r\n \t\tMap<String,Object> setting = applicationConfig.get(\"general\");\r\n \tlong time=java.util.Calendar.getInstance().getTimeInMillis()/1000;\r\n \t\tint timeout = (Integer)setting.get(\"auth_verify_timeout\");\r\n \tif (time > device.getModified() + timeout ) {\t\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorAuthExpired,\r\n \t\t\t\t\t\"verify mobile auth code has been timeout\");\r\n \t}\r\n \t\r\n \t\t//\r\n \t\t// check retry count\r\n \t\t//\r\n \t\tint retryLimit = (Integer)setting.get(\"auth_retry_limit\");\r\n \t\tif(logger.isDebugEnabled()) {\r\n \t\t\tlogger.debug(\"retry limit is \"+retryLimit+\" current auth retry is \"+device.getAuthRetry());\r\n \t\t}\r\n \t\tif (device.getAuthRetry() > retryLimit) {\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorExceedLimit,\r\n \t\t\t\t\t\"mobile verify auth retry too many time try:\"\r\n \t\t\t\t\t\t\t+ device.getAuthRetry() + \" > \" + retryLimit);\r\n \t\t}\r\n \r\n \t\t//\r\n \t\t// check auth code\r\n \t\t//\r\n \t\tString token = device.getToken();\r\n \t\tif (!authCode.equals(this.encodeUtility.decrypt(token, Device.ENCRYPT_KEY))) {\r\n \t\t\t//\r\n \t\t\t// if fail update retry status\r\n \t\t\t//\r\n \t\t\tlogger.debug(\"token not match, token is \"+token);\r\n \t\t\tint ret =deviceDao.updateStatusAndRetryCount(device.getId(), device.getUserId(),\r\n \t\t\t\t\tDeviceStatus.Authing.getStatus(),\r\n \t\t\t\t\tDeviceStatus.Init.getStatus(), device.getModified());\r\n \t\t\tif (ret != 1) {\r\n \t\t\t\tthrow new RentException(RentErrorCode.ErrorStatusViolate,\r\n \t\t\t\t\t\t\"update device status count is not 1\");\r\n \t\t\t}\r\n \t\t\tthrow new RentException(RentErrorCode.ErrorAuthFail,\r\n \t\t\t\t\t\"device id \"+device.getId()+\" enter auth code not match\");\r\n \r\n \t\t}\r\n \t\t\r\n \t\t//\r\n \t\t// update device and user in database.\r\n \t\t//\r\n \t\tlogger.debug(\"update device status to authed\");\r\n \t\tdeviceDao.updateStatusAndRetryCount(device.getId(),device.getUserId(),\r\n \t\t\t\tDeviceStatus.Authed.getStatus(),\r\n \t\t\t\tDeviceStatus.Authing.getStatus(),\r\n \t\t\t\tdevice.getModified());\r\n \t\tUser user = device.getUser();\r\n \t\tif (user.getStatus() == UserStatus.Init.getStatus()){\r\n \t\t\tlogger.debug(\"update user status to authed\");\r\n \t\t\tuser.setModified((long)0);\r\n \t\t\tuserDao.updateUserStatus(user.getId(), UserStatus.Authed.getStatus()\r\n \t\t\t\t\t, UserStatus.Init.getStatus(), user.getModified());\r\n \t\t}\r\n \t\t\r\n \t}",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\n public boolean isCredentialsNonExpired() {\n return false;\n }",
"@Override\r\n\tpublic void onFinishGetVerifyCode(int reg17FoxReturn) {\n\r\n\t\tswitch (reg17FoxReturn) {\r\n\t\tcase 103:\r\n\t\t\tdisplayRegisterResult(\"authKey出错\");\r\n\t\t\tbreak;\r\n\t\tcase 104:\r\n\t\t\tdisplayRegisterResult(\"参数不全\");\r\n\t\t\tbreak;\r\n\t\tcase 105:\r\n\t\t\tdisplayRegisterResult(\"手机格式错误\");\r\n\t\t\tbreak;\r\n\t\tcase 106:\r\n\t\t\tdisplayRegisterResult(\"此手机号已经注册\");\r\n\t\t\tbreak;\r\n\t\tcase 107:\r\n\t\t\tdisplayRegisterResult(\"此手机号不存在\");\r\n\t\t\tbreak;\r\n\t\tcase 108:\r\n\t\t\tToast.makeText(this, \"验证短信稍后发送到您手机\", Toast.LENGTH_LONG).show();\r\n\t\t\tbreak;\r\n\t\tcase 109:\r\n\t\t\tdisplayRegisterResult(\"短信发送失败\");\r\n\t\t\tbreak;\r\n\t\tcase 110:\r\n\t\t\tdisplayRegisterResult(\"短信验证码超时,请重新获取验证码\");\r\n\t\t\tbreak;\r\n\t\tcase 111:\r\n\t\t\tdisplayRegisterResult(\"短信验证码不正确\");\r\n\t\t\tbreak;\r\n\t\tcase 112:\r\n\t\t\tdisplayRegisterResult(\"短信验证通过\");\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tdisplayRegisterResult(\"服务器内部错误\");\r\n\t\t}\r\n\t\tenableYzBtnHandler.sendEmptyMessageDelayed(1, 1000);\r\n\t}",
"@Override\n public boolean valida() {\n mediatorCredito m = new mediatorCredito();\n try{\n BigInteger dit = new BigInteger(JOptionPane.showInputDialog(null,\"Digite su número de \"\n + \"tarjeta de crédito\",\"\"));\n String pag = JOptionPane.showInputDialog(null,\"Ingrese su medio de pago: (Visa, master Card\"\n + \", American Express)\",\"\");\n if(m.verificarForm(dit, pag)==false){\n JOptionPane.showMessageDialog(null,\"ups, el medio de pago o la tarjeta de crédito no es válido\"\n ,\"Error\",0);\n }\n return m.verificarForm(dit, pag);\n \n }catch(Exception e){\n JOptionPane.showMessageDialog(null,\"Acción cancelada\",\"Advertencia\",2);\n return false;\n }\n }",
"public void verifyOneTimePassword() throws LiquidoException {\n\t\tlong userAuthyId = 118906633;\n\t\tString otp = \"2079048\";\n\t\ttry {\n\t\t\tString res = client.verifyOneTimePassword(userAuthyId, otp);\n\t\t\tlog.info(\" => \"+res);\n\t\t\tlog.info(\"Authy OneTimePassword verified SUCCESSFULLY. User \"+userAuthyId+\" is authentic.\");\n\t\t} catch (LiquidoException e) {\n\t\t\tlog.error(\"Cannot verify OTP\", e);\n\t\t\tthrow e;\n\t\t}\n\t}",
"@Override\n public void onVerificationCompleted(PhoneAuthCredential credential) {\n }",
"@Override\n public void onVerificationCompleted(PhoneAuthCredential credential) {\n }",
"@Override\n public void onVerificationCompleted(PhoneAuthCredential credential) {\n }",
"@Override\n public void onVerificationCompleted(PhoneAuthCredential credential) {\n }",
"@Override\n\n public void onVerificationFailed(FirebaseException e) {\n\n Toast.makeText(otpsignin.this,\"Something went wrong\",Toast.LENGTH_SHORT).show();\n\n }",
"@Override\n public void onFailure(Call<ChallengeResponse> call, Throwable t) {\n Toast.makeText(getBaseContext(), \"Please check your connection!\", Toast.LENGTH_LONG).show();\n finish();\n\n }",
"boolean hasExpiredTrialLicense() {\n return false;\n }",
"@Override\n\n public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {\n\n\n Toast.makeText(otpsignin.this,\"Code send to your phone\",Toast.LENGTH_SHORT).show();\n\n signInWithPhoneAuthCredential(phoneAuthCredential);\n\n }",
"@Override\npublic boolean isCredentialsNonExpired() {\n\treturn false;\n}",
"boolean isJsapiTicketExpired(String appId);",
"public void inputRandomEmailToTextbox() {\r\n\t\twaitElementVisible(driver, RegisterForm.EMAIL_TEXTBOX);\r\n\t\tString emailAddress = \"auto06\" + getTodayString(\"ddMMyyHHmmss\")+\"@lv.com\";\r\n\t\tsendKeyElement(driver,RegisterForm.EMAIL_TEXTBOX, emailAddress);\r\n\t}",
"@Test\n public void requireOTPTest() {\n RealmRepresentation realm = testRealmResource().toRepresentation();\n realm.setBrowserFlow(\"browser\");\n testRealmResource().update(realm);\n\n updateRequirement(\"browser\", Requirement.REQUIRED, (authExec) -> authExec.getDisplayName().equals(\"Browser - Conditional OTP\"));\n driver.navigate().to(oauth.getLoginFormUrl());\n testRealmLoginPage.form().login(testUser);\n assertTrue(loginConfigTotpPage.isCurrent());\n\n configureOTP();\n driver.navigate().to(oauth.getLoginFormUrl());\n testRealmLoginPage.form().login(testUser);\n\n //verify that the page is login page, not totp setup\n assertCurrentUrlStartsWith(testLoginOneTimeCodePage);\n }",
"@Override\n public void onCodeSent(String s, PhoneAuthProvider.ForceResendingToken forceResendingToken) {\n super.onCodeSent(s, forceResendingToken);\n // when we receive the OTP it\n // contains a unique id which\n // we are storing in our string\n // which we have already created.\n verificationId = s;\n }",
"@Override\n\t\t\t\tpublic boolean isCredentialsNonExpired() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"private AuthParams getCaptchaAuthParams(final String captchaResponse) {\n AuthParamsCaptcha authParams = new AuthParamsCaptcha();\n authParams.response = captchaResponse;\n return authParams;\n }",
"@Override\r\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\tpwd1=new String(jf1.getPassword());\r\n\t\t\t\tif(currCard.getPwd().equals(pwd1)){\r\n\t\t\t\t\tjl1.setText(\"\");\r\n\t\t\t\t\tis1=true;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tis1=false;\r\n\r\n\t\t\t\t\tjl1.setText(\"密码错误\");\r\n\t\t\t\t\t//jf1.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}",
"@And(\"^Enter user phone and confirmation code$\")\t\t\t\t\t\n public void Enter_user_phone_and_confirmation_code() throws Throwable \t\t\t\t\t\t\t\n { \t\t\n \tdriver.findElement(By.id(\"phoneNumberId\")).sendKeys(\"01116844320\");\n driver.findElement(By.xpath(\"//*[@id='gradsIdvPhoneNext']/content/span\")).click();\n driver.findElement(By.id(\"code\")).sendKeys(\"172978\");\n driver.findElement(By.xpath(\"//*[@id='gradsIdvVerifyNext']/content/span\")).click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\t\t\t\t\n }",
"boolean expired();",
"public int generateOTP(String key){\n int len =4;\n\n int OTP;\n String numbers = \"0123456789\";\n Random rndm_method = new Random();\n\n char[] otp = new char[len];\n\n for (int i = 0; i < len; i++)\n {\n otp[i] =\n numbers.charAt(rndm_method.nextInt(numbers.length()));\n }\n OTP = Integer.parseInt(String.valueOf(otp));\n otpCache.put(key, OTP);\n return OTP;\n }",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean isCredentialsNonExpired() {\n\t\treturn true;\r\n\t}",
"@Nullable\n private String getCaptchaPublicKey() {\n return RegistrationToolsKt.getCaptchaPublicKey(mRegistrationResponse);\n }",
"private String m50428v() {\n if (TextUtils.isEmpty(this.f30737h0.getText().toString())) {\n return this.f30720S.getString(C10232R.string.payment_error_blank_field);\n }\n return !CardPaymentParams.m53958j(this.f30737h0.getText().toString().trim()) ? this.f30720S.getString(C10232R.string.payment_error_security_code_invalid) : \"\";\n }",
"private void validateDetails() {\n\n clearErrors();\n Utils.hide_keyboard(getActivity());\n\n boolean valid = true;\n\n String cvv = cvvTv.getText().toString();\n String expiryDate = cardExpiryTv.getText().toString();\n String cardNo = cardNoTv.getText().toString();\n\n if (cvv.length() < 3) {\n valid = false;\n cvvTil.setError(\"Enter a valid cvv\");\n }\n\n if (expiryDate.length() != 5) {\n cardExpiryTil.setError(\"Enter a valid expiry date\");\n valid = false;\n }\n\n String cardNoStripped = cardNo.replaceAll(\"\\\\s\", \"\");\n\n if (cardNoStripped.length() < 12 ) {\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n else {\n try {\n Long parsed = Long.parseLong(cardNoStripped);\n }\n catch (Exception e) {\n e.printStackTrace();\n valid = false;\n cardNoTil.setError(\"Enter a valid credit card number\");\n }\n }\n\n if (valid) {\n\n if (saveCardSwitch.isChecked()) {\n int cardLen = cardNoStripped.length();\n cardFirst6 = cardNoStripped.substring(0, 6);\n cardLast4 = cardNoStripped.substring(cardLen - 4, cardLen);\n shouldISaveThisCard = true;\n presenter.savePotentialCardDets(cardFirst6, cardLast4);\n }\n\n //make request\n PayloadBuilder builder = new PayloadBuilder();\n builder.setAmount(thetellerInitializer.getAmount() + \"\")\n .setNarration(thetellerInitializer.getNarration())\n .setCardno(cardNoStripped)\n .set3dUrl(thetellerInitializer.get3dUrl())\n .setEmail(thetellerInitializer.getEmail())\n .setCurrency(thetellerInitializer.getCurrency())\n .setMerchant_id(thetellerInitializer.getMerchant_id())\n .setCvv(cvv).setFirstname(thetellerInitializer.getfName())\n .setLastname(thetellerInitializer.getlName())\n .setIP(Utils.getDeviceImei(getActivity()))\n .setTxRef(thetellerInitializer.getTxRef())\n .setExpiryyear(expiryDate.substring(3,5))\n .setExpirymonth(expiryDate.substring(0,2))\n .setMeta(thetellerInitializer.getMeta())\n .setApiUser(thetellerInitializer.getApiUser())\n .setApiKey(thetellerInitializer.getApiKey())\n .setDevice_fingerprint(Utils.getDeviceImei(getActivity()))\n .setCardType(cardType);\n\n if (thetellerInitializer.getPayment_plan() != null) {\n builder.setPaymentPlan(thetellerInitializer.getPayment_plan());\n }\n\n body = builder.createPayload();\n\n presenter.chargeCard(body, thetellerConstants.API_KEY);\n }\n }"
]
| [
"0.6244699",
"0.6039198",
"0.58712715",
"0.5828407",
"0.5810613",
"0.5808687",
"0.57447857",
"0.57082766",
"0.56514585",
"0.5582733",
"0.54988337",
"0.549139",
"0.5490758",
"0.54335606",
"0.54268664",
"0.53904283",
"0.5376642",
"0.53280735",
"0.5309258",
"0.52774",
"0.527512",
"0.5272438",
"0.52672803",
"0.5253628",
"0.5220723",
"0.52055",
"0.5172842",
"0.514102",
"0.5140364",
"0.5119352",
"0.5114358",
"0.51035774",
"0.5099955",
"0.50834876",
"0.5078592",
"0.50714904",
"0.5056469",
"0.5054332",
"0.503231",
"0.50243706",
"0.50182",
"0.50155914",
"0.50127304",
"0.49924377",
"0.4983433",
"0.49580836",
"0.49342304",
"0.49092028",
"0.49051267",
"0.48900843",
"0.4890001",
"0.4883059",
"0.48648492",
"0.4861532",
"0.48580393",
"0.484691",
"0.48361486",
"0.48257667",
"0.48089862",
"0.48068297",
"0.48051754",
"0.48036626",
"0.47792614",
"0.47774473",
"0.4775752",
"0.4772349",
"0.4762993",
"0.4759442",
"0.47586742",
"0.47572976",
"0.47433764",
"0.47396",
"0.47396",
"0.47396",
"0.47347534",
"0.4734295",
"0.47258568",
"0.4718394",
"0.4718394",
"0.4718394",
"0.4718394",
"0.47111136",
"0.47056675",
"0.47040936",
"0.47026688",
"0.46911722",
"0.4690796",
"0.46890277",
"0.46878284",
"0.4686318",
"0.46848446",
"0.4681113",
"0.46805766",
"0.4679231",
"0.46712157",
"0.46677655",
"0.46613392",
"0.46613392",
"0.46539855",
"0.4653371",
"0.4651425"
]
| 0.0 | -1 |
If the "configuration" folder exists, use it, otherwise use "config". Check if "config" exists. | private File getFolder() throws FileNotFoundException, IOException {
File folder = getConfigurationFolder(new File(".").getCanonicalFile());
if (!folder.isDirectory()) {
folder = getConfigurationFolder(new File(getInstallationFolder().getPath())
.getCanonicalFile().getParentFile().getParentFile());
}
return folder;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private File getConfigurationFolder(final File baseFolder) throws FileNotFoundException, IOException {\n final String METADATA_FOLDER_NAME = System.getProperty(\"com.bf.viaduct.metadata.location\", \"metadata\");\n final String CONFIG_FOLDER_NAME = \"config\";\n final String CONFIGURATION_FOLDER_NAME = \"configuration\";\n\n // If the \"metadata\" folder exists, use it, otherwise check for existence of the\n // \"configuration\" folder.\n File folder = new File(String.format(\"%s%s%s\", baseFolder.getCanonicalFile(), File.separatorChar,\n METADATA_FOLDER_NAME));\n if (!folder.isDirectory()) {\n // If the \"configuration\" folder exists, use it, otherwise use the \"config\" folder.\n folder = new File(String.format(\"%s%s%s\", baseFolder.getCanonicalFile(), File.separatorChar,\n CONFIGURATION_FOLDER_NAME));\n if (!folder.isDirectory()) {\n folder = new File(String.format(\"%s%s%s\", baseFolder.getCanonicalFile(), File.separatorChar,\n CONFIG_FOLDER_NAME));\n }\n }\n\n return folder;\n }",
"private static void deployConfigIfNotexisting() {\n File configurationLocation = new File(STANDARD_CONFIG_LOCATION);\n try {\n if (!configurationLocation.exists()) {\n PdfAsFactory.deployDefaultConfiguration(configurationLocation);\n }\n } catch (Exception e) {\n logger.warn(\"Failed to deploy default confiuration to \"\n + configurationLocation.getAbsolutePath(), e);\n }\n }",
"private void GetConfig()\n {\n boolean useClassPath = false;\n if(configFile_ == null)\n {\n useClassPath = true;\n configFile_ = \"data.config.lvg\";\n }\n // read in configuration file\n if(conf_ == null)\n {\n conf_ = new Configuration(configFile_, useClassPath);\n }\n }",
"@Test\n public void testSetConfigurationBasePath() throws ConfigurationException\n {\n factory.addProperty(\"properties[@fileName]\", \"test.properties\");\n File deepDir = new File(ConfigurationAssert.TEST_DIR, \"config/deep\");\n factory.setConfigurationBasePath(deepDir.getAbsolutePath());\n\n Configuration config = factory.getConfiguration(false);\n assertEquals(\"Wrong property value\", \"somevalue\", config\n .getString(\"somekey\"));\n }",
"private static File getInstallFolderConfFile() throws IOException {\n String confFileName = UserPreferences.getAppName() + CONFIG_FILE_EXTENSION;\n String installFolder = PlatformUtil.getInstallPath();\n File installFolderEtc = new File(installFolder, ETC_FOLDER_NAME);\n File installFolderConfigFile = new File(installFolderEtc, confFileName);\n if (!installFolderConfigFile.exists()) {\n throw new IOException(\"Conf file could not be found\" + installFolderConfigFile.toString());\n }\n return installFolderConfigFile;\n }",
"public abstract Optional<FileConfiguration> getConfiguration(String name);",
"private File createConfigDirIfNecessary(String configName) throws IOException {\n return createConfigDirIfNecessary(configDirPath.toFile(), configName);\n }",
"private void createConfig() {\n try {\n if (!getDataFolder().exists()) {\n getDataFolder().mkdirs();\n }\n File file = new File(getDataFolder(), \"config.yml\");\n if (!file.exists()) {\n getLogger().info(\"config.yml not found :( Creating one with default values...\");\n saveDefaultConfig();\n } else {\n getLogger().info(\"config.yml found :) Loading...\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }",
"public String readConfiguration(String path);",
"public static File getConfigDirectory() {\n return getDirectoryStoragePath(\"/NWD/config\", false);\n }",
"File findConfigFile(String path) {\n\t\tClassLoader cl = PropertiesUtil.class.getClassLoader();\n\t\tURL url = cl.getResource(path);\n\t\tif (url != null) {\n\t\t\treturn new File(url.getFile());\n\t\t}\n\n\t\turl = ClassLoader.getSystemResource(path);\n\t\tif (url != null) {\n\t\t\treturn new File(url.getFile());\n\t\t}\n\n\t\tFile file = new File(path);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t}\n\n\t\tString newPath = \"conf\" + (path.startsWith(File.separator) ? \"\" : \"/\")\n\t\t\t\t+ path;\n\t\turl = ClassLoader.getSystemResource(newPath);\n\t\tif (url != null) {\n\t\t\treturn new File(url.getFile());\n\t\t}\n\n\t\turl = cl.getResource(newPath);\n\t\tif (url != null) {\n\t\t\treturn new File(url.getFile());\n\t\t}\n\n\t\tnewPath = \"conf\"\n\t\t\t\t+ (path.startsWith(File.separator) ? \"\" : File.separator)\n\t\t\t\t+ path;\n\t\tfile = new File(newPath);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t}\n\n\t\tnewPath = System.getenv(\"CATALINA_HOME\");\n\t\tif (newPath == null) {\n\t\t\tnewPath = System.getenv(\"CATALINA_BASE\");\n\t\t}\n\n\t\tif (newPath == null) {\n\t\t\tnewPath = System.getProperty(\"catalina.home\");\n\t\t}\n\n\t\tif (newPath == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfile = new File(newPath + File.separator + \"conf\" + File.separator\n\t\t\t\t+ path);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t}\n\n\t\treturn null;\n\t}",
"@Override\n public String getDefaultConfig(Log log) throws CommandLineException {\n File defaultCfg = null;\n if (DEFAULT_CONFIG_FILE.equals(defaultConfigFile)) {\n final String conf = ExecutionUtils.executeCommand(log, \"\\\"\" + this.executable + \"\\\" -V SERVER_CONFIG_FILE\");\n final Pattern pattern = Pattern.compile(\"^\\\\s*-D\\\\s*SERVER_CONFIG_FILE=\\\"(.*)?\\\"$\");\n final Matcher matcher = pattern.matcher(conf);\n final String result = matcher.group(1);\n defaultCfg = new File(result);\n if (defaultCfg.isAbsolute()) {\n if (defaultCfg.exists()) {\n return ConfigUtils.readConfigFile(defaultCfg);\n }\n } else {\n final String exec = ExecutionUtils.searchExecutable(log, this.executable);\n if (exec != null) {\n final File execFile = new File(exec);\n File execDir = execFile.getParentFile();\n if (\"bin\".equals(execDir.getName())) {\n execDir = execDir.getParentFile();\n }\n File confDir = new File(execDir, \"conf\");\n if (!confDir.exists()) {\n confDir = execDir;\n }\n defaultCfg = new File(confDir, \"httpd.conf\");\n if (defaultCfg.exists()) {\n return ConfigUtils.readConfigFile(defaultCfg);\n }\n }\n }\n } else {\n defaultCfg = new File(this.defaultConfigFile);\n if (defaultCfg.exists()) {\n return ConfigUtils.readConfigFile(defaultCfg);\n }\n }\n return null;\n }",
"private static Path getConfig(String modName)\n\t{\n\t\treturn Paths.get(\"config\"+File.separator+modName+\".cfg\").toAbsolutePath();\n\t}",
"abstract public Config createConfig(String path);",
"protected String provideConfigFile(Properties rootProps,\n Properties configProps) {\n String configurationFile = getProperty(rootProps, configProps,\n CONFIG_FILE);\n if (configurationFile == null) {\n configurationFile = STANDARD_CONFIG_LOCATION;\n deployConfigIfNotexisting();\n }\n return configurationFile;\n }",
"private static File determineConfigurationFile(CommandLine optionLine)\n {\n String config = optionLine.getOptionValue(Environment.CONFIG); //$NON-NLS-1$\n if (StringUtils.isEmpty(config)) {\n return new File(ApplicationFactory.DEFAULT_CONFIGURATION_FILENAME); //$NON-NLS-1$\n }\n return new File(config);\n }",
"public void loadConfiguration(){\n\t\t\n\t\tString jarLoc = this.getJarLocation();\n\t\tTicklerVars.jarPath = jarLoc;\n\t\tTicklerVars.configPath=TicklerVars.jarPath+TicklerConst.configFileName;\n\t\t\n\t\t//Read configs from conf file\n\t\tif (new File(TicklerVars.configPath).exists()){\n\t\t\ttry {\n\t\t\t\tString line;\n\t\t\t\tBufferedReader reader = new BufferedReader(new FileReader(TicklerVars.configPath));\n\t\t\t\twhile ((line =reader.readLine())!= null) {\n\t\t\t\t\tif (line.contains(\"Tickler_local_directory\")){\n\t\t\t\t\t\tString loc = line.substring(line.indexOf(\"=\")+1, line.length());\n\t\t\t\t\t\tTicklerVars.ticklerDir = this.correctJarLoc(loc);\n\t\t\t\t\t}\n\t\t\t\t\telse if (line.contains(\"Tickler_sdcard_directory\")){\n\t\t\t\t\t\tString loc = line.substring(line.indexOf(\"=\")+1, line.length()-1);\n\t\t\t\t\t\tTicklerVars.sdCardPath = this.correctJarLoc(loc);\n\t\t\t\t\t}\n\t\t\t\t\telse if (line.contains(\"Frida_server_path\")){\n\t\t\t\t\t\tString loc = line.substring(line.indexOf(\"=\")+1, line.length());\n\t\t\t\t\t\tTicklerVars.fridaServerLoc = loc;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\treader.close();\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t//Config path does not exist\n\t\t\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"WARNING...... Configuration file does not exist!!!!\\nThe following default configurations are set:\\n\");\n\t\t\tTicklerVars.ticklerDir = TicklerVars.jarPath+TicklerConst.defaultTicklerDirName;\n\t\t\tSystem.out.println(\"Tickler Workspace directory on host: \"+TicklerVars.ticklerDir);\n\t\t\tSystem.out.println(\"Tickler temporary directory on device: \"+TicklerConst.sdCardPathDefault);\n\t\t}\n\t\t\n\t\tString x = TicklerVars.ticklerDir;\n\t\tif (TicklerVars.ticklerDir == null || TicklerVars.ticklerDir.matches(\"\\\\s*/\") ){\n\t\t\tTicklerVars.ticklerDir = TicklerVars.jarPath+TicklerConst.defaultTicklerDirName;\n//\t\t\tOutBut.printWarning(\"Configuration File \"+TicklerVars.configPath+ \" doesn't specify Tickler_local_directory. Workspace is set at \"+ TicklerVars.ticklerDir);\n\t\t\tOutBut.printStep(\"Tickler Workspace directory on host: \"+TicklerVars.ticklerDir);\n\t\t}\n\t\t\n\t\tif (TicklerVars.sdCardPath == null || TicklerVars.sdCardPath.matches(\"\\\\s*/\")) {\n\t\t\tTicklerVars.sdCardPath = TicklerConst.sdCardPathDefault;\t\n//\t\t\tOutBut.printWarning(\"Configuration File \"+TicklerVars.configPath+ \" doesn't specify Tickler's temp directory on the device. It is set to \"+ TicklerVars.sdCardPath);\n\t\t\tOutBut.printStep(\"Tickler temporary directory on device: \"+TicklerConst.sdCardPathDefault);\n\t\t}\n\t\t\t\n\t}",
"public File getConfigurationFile();",
"String getConfigFileName();",
"private static File getFileFromConfigDirectory(String file) {\n File f = new File(configDirectory, file);\n if (configDirectory != null && f.exists()) {\n return f;\n }\n return null;\n }",
"public static String getConfigFolder() {\n\t\tString progArg = System.getProperty(ConfigConstants.CONFIG_DIR_PROG_ARGUMENT);\n\t\tif (progArg != null) {\n\t\t\treturn progArg;\n\t\t} else {\n\t\t\treturn configFolder;\n\t\t}\n\t}",
"private static File getUserFolderConfFile() {\n String confFileName = UserPreferences.getAppName() + CONFIG_FILE_EXTENSION;\n File userFolder = PlatformUtil.getUserDirectory();\n File userEtcFolder = new File(userFolder, ETC_FOLDER_NAME);\n if (!userEtcFolder.exists()) {\n userEtcFolder.mkdir();\n }\n return new File(userEtcFolder, confFileName);\n }",
"private final void config() {\n\t\tfinal File configFile = new File(\"plugins\" + File.separator\n\t\t\t\t+ \"GuestUnlock\" + File.separator + \"config.yml\");\n\t\tif (!configFile.exists()) {\n\t\t\tthis.plugin.saveDefaultConfig();\n\t\t\tMain.INFO(\"Created default configuration-file\");\n\t\t}\n\t}",
"Configuration getConfiguration();",
"Configuration getConfiguration();",
"Configuration getConfiguration();",
"Configuration getConfiguration();",
"public static File getDirectoryFromConfig(ConfigurationSource conf,\n String key,\n String componentName) {\n final Collection<String> metadirs = conf.getTrimmedStringCollection(key);\n if (metadirs.size() > 1) {\n throw new IllegalArgumentException(\n \"Bad config setting \" + key +\n \". \" + componentName +\n \" does not support multiple metadata dirs currently\");\n }\n\n if (metadirs.size() == 1) {\n final File dbDirPath = new File(metadirs.iterator().next());\n if (!dbDirPath.mkdirs() && !dbDirPath.exists()) {\n throw new IllegalArgumentException(\"Unable to create directory \" +\n dbDirPath + \" specified in configuration setting \" +\n key);\n }\n try {\n Path path = dbDirPath.toPath();\n // Fetch the permissions for the respective component from the config\n String permissionValue = getPermissions(key, conf);\n String symbolicPermission = getSymbolicPermission(permissionValue);\n\n // Set the permissions for the directory\n Files.setPosixFilePermissions(path,\n PosixFilePermissions.fromString(symbolicPermission));\n } catch (Exception e) {\n throw new RuntimeException(\"Failed to set directory permissions for \" +\n dbDirPath + \": \" + e.getMessage(), e);\n }\n return dbDirPath;\n }\n\n return null;\n }",
"@Override\n protected Path getConfigurationPath() {\n return null;\n }",
"AuditYamlConfig loadConfig() throws ConfigurationException\n {\n if (hasCustomConfigPath())\n {\n return loadConfigAtCustomPath();\n }\n else if (hasConfigAtDefaultPath())\n {\n return loadConfigAtDefaultPath();\n }\n else\n {\n return AuditYamlConfig.createWithoutFile();\n }\n }",
"public static void loadGameConfiguration() {\n File configFile = new File(FileUtils.getRootFile(), Constant.CONFIG_FILE_NAME);\n manageGameConfigFile(configFile);\n }",
"public static String getConfigurationFilePath() {\n\n return getCloudTestRootPath() + File.separator + \"Config\"\n + File.separator + \"PluginConfig.xml\";\n }",
"public WorldConfig getWorldConfig(World grabfor) {\n\t\tif (this.SingleWorldConfig != null)\n\t\t\treturn SingleWorldConfig;\n\t\tString worldName = grabfor.getName();\n\n\t\t// if it's not in the hashmap...\n\t\tif (!WorldCfg.containsKey(worldName)) {\n\t\t\t// special code: it's possible a configuration might already exist\n\t\t\t// for this file, so we'll\n\t\t\t// check\n\t\t\tString checkyamlfile = WorldConfig.getWorldConfig(worldName);\n\t\t\t// if it exists...\n\t\t\tif (new File(checkyamlfile).exists()) {\n\t\t\t\t// attempt to load the configuration from the given file.\n\t\t\t\tYamlConfiguration existingcfg = YamlConfiguration.loadConfiguration(new File(checkyamlfile));\n\t\t\t\tYamlConfiguration outConfiguration = new YamlConfiguration();\n\t\t\t\t// place it in the hashmap.\n\t\t\t\tWorldCfg.put(worldName, new WorldConfig(worldName, existingcfg, outConfiguration));\n\t\t\t\t// try to save it. this can error out for who knows what reason.\n\t\t\t\t// If it does, we'll\n\t\t\t\t// squirt the issue to the log.\n\t\t\t\ttry {\n\t\t\t\t\toutConfiguration.save(new File(checkyamlfile));\n\t\t\t\t} catch (IOException iex) {\n\t\t\t\t\tGriefPrevention.instance.getLogger().log(Level.SEVERE, \"Failed to save World Config for world \" + worldName);\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// if the file doesn't exist, then we will go ahead and create a\n\t\t\t\t// new configuration.\n\t\t\t\t// set the input Yaml to default to the template.\n\t\t\t\t// if the template file exists, load it's configuration and use\n\t\t\t\t// the result as useSource.\n\t\t\t\t// Otherwise, we create a blank configuration.\n\t\t\t\tDebugger.Write(\"Failed to find world configuration for World \" + worldName, DebugLevel.Errors);\n\t\t\t\tFile TemplFile = new File(TemplateFile);\n\t\t\t\tFileConfiguration useSource = null;\n\t\t\t\tif (TemplFile.exists()) {\n\t\t\t\t\tuseSource = YamlConfiguration.loadConfiguration(TemplFile);\n\t\t\t\t} else {\n\t\t\t\t\tDebugger.Write(\"Template file \\\"\" + TemplateFile + \" \\\"Not Found.\", DebugLevel.Errors);\n\t\t\t\t\tuseSource = new YamlConfiguration();\n\t\t\t\t}\n\n\t\t\t\t// The target save location.\n\t\t\t\tFileConfiguration Target = new YamlConfiguration();\n\t\t\t\t// place it in the hashmap.\n\t\t\t\tWorldCfg.put(worldName, new WorldConfig(grabfor.getName(), useSource, Target));\n\t\t\t\ttry {\n\t\t\t\t\tTarget.save(new File(checkyamlfile));\n\t\t\t\t} catch (IOException ioex) {\n\t\t\t\t\tGriefPrevention.instance.getLogger().log(Level.SEVERE, \"Failed to write world configuration to \" + checkyamlfile);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// save target\n\t\t}\n\t\t// after the above logic, we know it's in the hashmap, so return that.\n\t\treturn WorldCfg.get(worldName);\n\n\t}",
"@Test\n public void testLoadOptionalForceCreate() throws ConfigurationException\n {\n factory.setBasePath(TEST_FILE.getParent());\n CombinedConfiguration config = prepareOptionalTest(\"xml\", true);\n assertEquals(\"Wrong number of configurations\", 1, config\n .getNumberOfConfigurations());\n FileConfiguration fc = (FileConfiguration) config\n .getConfiguration(OPTIONAL_NAME);\n assertNotNull(\"Optional config not found\", fc);\n assertEquals(\"File name was not set\", \"nonExisting.xml\", fc\n .getFileName());\n assertNotNull(\"Base path was not set\", fc.getBasePath());\n }",
"private static String getConfigFile() {\n\n final String sPath = getUserFolder();\n\n return sPath + File.separator + \"sextante.settings\";\n\n }",
"private void initPath() {\n this.IniFile = new IniFile();\n String configPath = this.getApplicationContext().getFilesDir()\n .getParentFile().getAbsolutePath();\n if (configPath.endsWith(\"/\") == false) {\n configPath = configPath + \"/\";\n }\n this.appIniFile = configPath + constants.USER_CONFIG_FILE_NAME;\n }",
"private static File getHadoopConfFolder() throws IOException {\n if (System.getenv().containsKey(\"HADOOP_CONF_DIR\")) {\n return new File(System.getenv(\"HADOOP_CONF_DIR\"));\n } else if (System.getenv().containsKey(\"HADOOP_HOME\")) {\n return new File(System.getenv(\"HADOOP_HOME\") + \"/etc/hadoop/\");\n } else {\n throw new IOException(\"Unable to find hadoop configuration folder.\");\n }\n }",
"public static YamlConfiguration getConfig(String name) {\r\n if (!name.endsWith(\".yml\")) {\r\n \tname += \".yml\";\r\n\t }\r\n \r\n File file = new File(plugin.getDataFolder(), name);\r\n if (!file.exists()){\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\t\t\t\treturn YamlConfiguration.loadConfiguration(file);\r\n\t\t\t}\r\n\t\t}",
"@Test\n public void testLoadDifferentSources() throws ConfigurationException\n {\n factory.setFile(MULTI_FILE);\n Configuration config = factory.getConfiguration();\n assertFalse(config.isEmpty());\n assertTrue(config instanceof CombinedConfiguration);\n CombinedConfiguration cc = (CombinedConfiguration) config;\n assertEquals(\"Wrong number of configurations\", 1, cc\n .getNumberOfConfigurations());\n\n assertNotNull(config\n .getProperty(\"tables.table(0).fields.field(2).name\"));\n assertNotNull(config.getProperty(\"element2.subelement.subsubelement\"));\n assertEquals(\"value\", config.getProperty(\"element3\"));\n assertEquals(\"foo\", config.getProperty(\"element3[@name]\"));\n assertNotNull(config.getProperty(\"mail.account.user\"));\n\n // test JNDIConfiguration\n assertNotNull(config.getProperty(\"test.onlyinjndi\"));\n assertTrue(config.getBoolean(\"test.onlyinjndi\"));\n\n Configuration subset = config.subset(\"test\");\n assertNotNull(subset.getProperty(\"onlyinjndi\"));\n assertTrue(subset.getBoolean(\"onlyinjndi\"));\n\n // test SystemConfiguration\n assertNotNull(config.getProperty(\"java.version\"));\n assertEquals(System.getProperty(\"java.version\"), config\n .getString(\"java.version\"));\n\n // test INIConfiguration\n assertEquals(\"Property from ini file not found\", \"yes\",\n config.getString(\"testini.loaded\"));\n\n // test environment configuration\n EnvironmentConfiguration envConf = new EnvironmentConfiguration();\n for (Iterator<String> it = envConf.getKeys(); it.hasNext();)\n {\n String key = it.next();\n String combinedKey = \"env.\" + key;\n assertEquals(\"Wrong value for env property \" + key,\n envConf.getString(key), config.getString(combinedKey));\n }\n }",
"public abstract String getConfigurationFolderKey();",
"Configuration getConfigByKey(String configKey);",
"@Test\n public void getPath() throws Exception {\n ReadConfig conf = new ReadConfig();\n try {\n conf.getPath(0);\n } catch (Exception e) {\n assertTrue(e.getMessage().equals(\"Try to access config file before reading it.\") );\n }\n try {\n conf.readFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n assertNotNull(conf.getPath(0));\n String total = conf.getFileLocation() + \"/\" + conf.getFileName().get(0);\n assertEquals(total, conf.getPath(0));\n }",
"private File getConfigurationFile() {\n return new File(BungeeBan.getInstance().getDataFolder(), this.filename);\n }",
"@Test\n public void testCombinedConfigurationNoAdditional()\n throws ConfigurationException\n {\n factory.setFile(TEST_FILE);\n CombinedConfiguration cc = factory.getConfiguration(true);\n assertNull(\"Additional configuration was found\", cc\n .getConfiguration(DefaultConfigurationBuilder.ADDITIONAL_NAME));\n }",
"@Test\n public void testLoadConfigurationFromFileName()\n throws ConfigurationException\n {\n factory = new DefaultConfigurationBuilder(TEST_FILE.getAbsolutePath());\n checkConfiguration();\n }",
"private boolean IsCfgExisted()\n {\n File f = new File(strCfgPath);\n if(f.exists())\n return true;\n return false;\n }",
"public void loadConfig(){\n \t\tFile configDir = this.getDataFolder();\n \t\tif (!configDir.exists())\n \t\t\tconfigDir.mkdir();\n \n \t\t// Check for existance of config file\n \t\tFile configFile = new File(this.getDataFolder().toString() + \"/config.yml\");\n \t\tconfig = YamlConfiguration.loadConfiguration(configFile);\n \t\t\n \t\t// Adding Variables\n \t\tif(!config.contains(\"Debug\"))\n \t\t{\n \t\t\tconfig.addDefault(\"Debug\", false);\n \t \n \t config.addDefault(\"Worlds\", \"ExampleWorld1, ExampleWorld2\");\n \t\n\t config.addDefault(\"Regions.Residence\", \"ExampleWorld.ExampleResRegion1, ExampleWorld.ExampleResRegion2\");\n \t \n\t config.addDefault(\"Regions.WorldGuard\", \"ExampleWorld.ExampleWGRegion1, ExampleWorld.ExampleWGRegion2\"); \n \t\t}\n \n // Loading the variables from config\n \tdebug = (Boolean) config.get(\"Debug\");\n \tpchestWorlds = (String) config.get(\"Worlds\");\n \tpchestResRegions = (String) config.get(\"Regions.Residence\");\n \tpchestWGRegions = (String) config.get(\"Regions.WorldGuard\");\n \n if(pchestWorlds != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All Chests Worlds: \" + pchestWorlds);\n }\n \n if(pchestResRegions != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All Residence Regions: \" + pchestResRegions);\n }\n \n if(pchestWGRegions != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All World Guard Regions: \" + pchestWGRegions);\n }\n \n config.options().copyDefaults(true);\n try {\n config.save(configFile);\n } catch (IOException ex) {\n Logger.getLogger(JavaPlugin.class.getName()).log(Level.SEVERE, \"Could not save config to \" + configFile, ex);\n }\n }",
"@Test\n public void testDetectConfigurationCompoundPath() throws Exception {\n\n Config testConfig = ConfigFactory.parseResourcesAnySyntax(\"packagePath.conf\");\n\n StreamsConfigurator.setConfig(testConfig);\n\n ComponentConfigurator<ComponentConfiguration> configurator = new ComponentConfigurator<>(ComponentConfiguration.class);\n\n ComponentConfiguration configuredPojo = configurator.detectConfiguration(\"org.apache.streams.config\");\n\n Assert.assertThat(configuredPojo, is(notNullValue()));\n\n Assert.assertThat(configuredPojo.getInClasses(), is(notNullValue()));\n Assert.assertThat(configuredPojo.getInClasses().size(), is(greaterThan(0)));\n\n Assert.assertThat(configuredPojo.getOutClasses(), is(notNullValue()));\n Assert.assertThat(configuredPojo.getOutClasses().size(), is(greaterThan(0)));\n\n }",
"private void loadLocalConfig()\n {\n try\n {\n // Load the system config file.\n URL fUrl = Config.class.getClassLoader().getResource( PROP_FILE );\n config.setDelimiterParsingDisabled( true );\n if ( fUrl == null )\n {\n String error = \"static init: Error, null cfg file: \" + PROP_FILE;\n LOG.warn( error );\n }\n else\n {\n LOG.info( \"static init: found from: {} path: {}\", PROP_FILE, fUrl.getPath() );\n config.load( fUrl );\n LOG.info( \"static init: loading from: {}\", PROP_FILE );\n }\n\n URL fUserUrl = Config.class.getClassLoader().getResource( USER_PROP_FILE );\n if ( fUserUrl != null )\n {\n LOG.info( \"static init: found user properties from: {} path: {}\", USER_PROP_FILE, fUserUrl.getPath() );\n config.load( fUserUrl );\n }\n }\n catch ( org.apache.commons.configuration.ConfigurationException ex )\n {\n String error = \"static init: Error loading from cfg file: [\" + PROP_FILE\n + \"] ConfigurationException=\" + ex;\n LOG.error( error );\n throw new CfgRuntimeException( GlobalErrIds.FT_CONFIG_BOOTSTRAP_FAILED, error, ex );\n }\n }",
"@Test\n public void testConfigurationBuilderProvider()\n throws ConfigurationException\n {\n factory.addProperty(\"override.configuration[@fileName]\", TEST_FILE\n .getAbsolutePath());\n CombinedConfiguration cc = factory.getConfiguration(false);\n assertEquals(\"Wrong number of configurations\", 1, cc\n .getNumberOfConfigurations());\n checkProperties(cc);\n }",
"private String getConfigurationDirectory() throws UnsupportedEncodingException {\r\n\r\n String folder;\r\n if (ISphereJobLogExplorerPlugin.getDefault() != null) {\r\n // Executed, when started from a plug-in.\r\n folder = ISphereJobLogExplorerPlugin.getDefault().getStateLocation().toFile().getAbsolutePath() + File.separator + REPOSITORY_LOCATION\r\n + File.separator;\r\n FileHelper.ensureDirectory(folder);\r\n } else {\r\n // Executed, when started on a command line.\r\n URL url = getClass().getResource(DEFAULT_CONFIGURATION_FILE);\r\n if (url == null) {\r\n return null;\r\n }\r\n String resource = URLDecoder.decode(url.getFile(), \"utf-8\"); //$NON-NLS-1$\r\n folder = new File(resource).getParent() + File.separator;\r\n }\r\n return folder;\r\n }",
"public static Configuration get(String fileName) {\n String confLocation = PathUtils.getProjectPath();\n try {\n URL url;\n File file = new File(confLocation, fileName);\n if (confLocation == null || !file.exists()) {\n LOG.info(\"Looking for {} in classpath\", fileName);\n url = ApplicationProperties.class.getClassLoader().getResource(fileName);\n if (url == null) {\n LOG.info(\"Looking for /{} in classpath\", fileName);\n url = ApplicationProperties.class.getClassLoader().getResource(\"/\" + fileName);\n }\n } else {\n url = file.toURI().toURL();\n }\n LOG.info(\"Loading {} from {}\", fileName, url);\n Parameters params = new Parameters();\n FileBasedConfigurationBuilder<FileBasedConfiguration> builder =\n new FileBasedConfigurationBuilder<FileBasedConfiguration>(PropertiesConfiguration.class)\n .configure(params.properties()\n .setURL(url));\n FileBasedConfiguration configuration = builder.getConfiguration();\n logConfiguration(configuration);\n return configuration;\n } catch (Exception e) {\n throw new HiveHookException(\"Failed to load application properties\", e);\n }\n }",
"@Test\n public void getFileLocation() throws Exception {\n ReadConfig conf = new ReadConfig();\n try {\n conf.getFileLocation();\n } catch (Exception e) {\n assertTrue(e.getMessage().equals(\"Try to access config file before reading it.\") );\n }\n try {\n conf.readFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n assertNotNull(conf.getFileLocation());\n }",
"private static void loadConfigs(String[] args) {\n String chosenConfigFile, chosenSensorsFile;\n\n // select config files (allow for specifying)\n if(args.length >= 2) {\n chosenConfigFile = args[0];\n chosenSensorsFile = args[1];\n }\n else {\n chosenConfigFile = DEFAULT_CONFIG_FILE;\n chosenSensorsFile = DEFAULT_SENSORS_FILE;\n }\n // filenames starting with \"/\" and \"./\" are later interpreted as being outside JAR\n if(chosenConfigFile.charAt(0) == '/' || chosenConfigFile.substring(0, 2).equals(\"./\"))\n System.out.println(\"retreiving \" + chosenConfigFile + \" from this filesystem (not the JAR)\");\n if(chosenSensorsFile.charAt(0) == '/' || chosenSensorsFile.substring(0, 2).equals(\"./\"))\n System.out.println(\"retreiving \" + chosenSensorsFile + \" from this filesystem (not the JAR)\");\n\n // load general configuration\n Properties props = new Properties();\n try {\n if(chosenConfigFile.charAt(0) == '/' || chosenConfigFile.substring(0, 2).equals(\"./\"))\n // get the config file from the user's filesystem\n props.load(new FileInputStream(new File(chosenConfigFile)));\n else\n // get the config file saved in this JAR\n props.load(Main.class.getResourceAsStream(\"/\" + chosenConfigFile));\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n\n // load sensors\n if(chosenSensorsFile.charAt(0) == '/' || chosenSensorsFile.substring(0, 2).equals(\"./\"))\n // get the sensors file from the user's filesystem\n sensors = ConfigLoader.getSensorsFromFile(chosenSensorsFile);\n else\n // get the sensors file saved in this JAR\n sensors = ConfigLoader.getSensorsFromFile(Main.class.getResourceAsStream(\"/\" + chosenSensorsFile));\n }",
"private static void processIncludedConfig() {\n String configName = \"config.\" + getRunMode() + \".properties\";\n\n //relative path cannot be recognized and not figure out the reason, so here use absolute path instead\n InputStream configStream = Configuration.class.getResourceAsStream(\"/\" + configName);\n if (configStream == null) {\n log.log(Level.WARNING, \"configuration resource {0} is missing\", configName);\n return;\n }\n\n try (InputStreamReader reader = new InputStreamReader(configStream, StandardCharsets.UTF_8)) {\n Properties props = new Properties();\n props.load(reader);\n CONFIG_VALUES.putAll(props);\n } catch (IOException e) {\n log.log(Level.WARNING, \"Unable to process configuration {0}\", configName);\n }\n\n }",
"public String getBasePath(){\r\n\t\t \r\n\t\t String basePath = properties.getProperty(\"getPath\");\r\n\t\t if(basePath != null) return basePath;\r\n\t\t else throw new RuntimeException(\"getPath not specified in the configuration.properties file.\");\r\n\t }",
"@Test\n public void testDetectConfigurationConfigString() throws Exception {\n\n Config config = ConfigFactory.load(\"componentTest\");\n\n ComponentConfigurator<ComponentConfiguration> configurator = new ComponentConfigurator<>(ComponentConfiguration.class);\n\n ComponentConfiguration testPojo = mapper.readValue(config.root().get(\"configuredComponent\").render(ConfigRenderOptions.concise()), ComponentConfiguration.class);\n\n assert(testPojo != null);\n\n ComponentConfiguration configuredPojo = configurator.detectConfiguration(config, \"configuredComponent\");\n\n assert(configuredPojo != null);\n\n Assert.assertEquals(configuredPojo,testPojo);\n }",
"abstract public Config createConfigWithFactory(String path, String factoryPath);",
"public void loadConfig(){\n this.saveDefaultConfig();\n //this.saveConfig();\n\n\n }",
"private static Config loadConfig(String name) {\n\n\t\tString path;\n\t\tif (name == null) {\n\t\t\tpath = \"application.json\";\n\t\t} else {\n\t\t\tpath = \"src/\"+extensionsPackage+\"/\" + name + \"/config.json\";\n\t\t}\n\n\t\tGson gson = new Gson();\n\t\tConfig config = null;\n\n\t\ttry {\n\t\t\tconfig = gson.fromJson(new FileReader(path), Config.class);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn config;\n\t}",
"private void chargeConfiguration() {\n\t\tgetConfig().options().copyDefaults(true);\n\t\tFile config = new File(getDataFolder(), \"config.yml\");\n\t\tFile lang = new File(getDataFolder(), \"lang.properties\");\n\t\ttry {\n\t\t\tif (!config.exists()) {\n\t\t\t\tsaveDefaultConfig();\n\t\t\t}\n\t\t\tif (!lang.exists()) {\n\t\t\t\tsaveResource(\"lang.properties\", false);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthis.error(\"Can not load the configuration\", e);\n\t\t}\n\t}",
"public static boolean loadConfig() throws IOException, ConfigurationNotFoundException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n File file = new File(Objects.requireNonNull(classLoader.getResource(\"application.yaml\")).getFile());\n\n // Instantiating a new ObjectMapper as a YAMLFactory\n ObjectMapper om = new ObjectMapper(new YAMLFactory());\n\n if (file.exists()) {\n AppConfig appConfig = om.readValue(file, AppConfig.class);\n\n if (Objects.nonNull(appConfig)\n && Objects.nonNull(appConfig.getApi())\n && Objects.nonNull(appConfig.getSmtp())) {\n\n AppConfig.apiConfig = appConfig.getApi();\n AppConfig.smtpConfig = appConfig.getSmtp();\n\n return true;\n } else {\n throw new ConfigurationNotFoundException(\"Configuration parameter are incorrect\");\n }\n } else {\n throw new ConfigurationNotFoundException();\n }\n }",
"public Config getConfig();",
"private static void processLocalConfig() {\n String localConfigFile = getConfigValue(SYSPROP_LOCAL_CONFIG_FILE);\n if (localConfigFile == null || localConfigFile.isEmpty()) {\n log.log(Level.FINE, \"No local configuration defined, skipping associated processing\");\n return;\n }\n\n log.log(Level.FINE, \"Processing configuration file {0}\", localConfigFile);\n Path p = Paths.get(localConfigFile);\n if (!Files.exists(p)) {\n log.log(Level.WARNING, \"Path {0} does not exist\", p.toString());\n return;\n } else if (!Files.isRegularFile(p)) {\n log.log(Level.WARNING, \"Path {0} is not a file\", p.toString());\n return;\n } else if (!Files.isReadable(p)) {\n log.log(Level.WARNING, \"File {0} is not readable\", p.toString());\n return;\n }\n\n Properties prop = new Properties();\n try (BufferedReader reader = Files.newBufferedReader(p, StandardCharsets.UTF_8)) {\n prop.load(reader);\n } catch (IOException e) {\n log.log(Level.WARNING, \"Error occurred while reading \" + p.toString(), e);\n }\n CONFIG_VALUES.putAll(prop);\n }",
"@Test\n public final void testConfigurationParser() {\n URL resourceUrl = this.getClass().getResource(configPath);\n File folder = new File(resourceUrl.getFile());\n for (File configFile : folder.listFiles()) {\n try {\n System.setProperty(\"loadbalancer.conf.file\", configFile.getAbsolutePath());\n LoadBalancerConfiguration.getInstance();\n } finally {\n LoadBalancerConfiguration.clear();\n }\n }\n }",
"String path(Configuration configuration);",
"@Test\n public void testDetectConfigurationConfig() throws Exception {\n\n Config config = ConfigFactory.load(\"componentTest\").getConfig(\"configuredComponent\");\n\n ComponentConfigurator<ComponentConfiguration> configurator = new ComponentConfigurator<>(ComponentConfiguration.class);\n\n ComponentConfiguration testPojo = mapper.readValue(config.root().render(ConfigRenderOptions.concise()), ComponentConfiguration.class);\n\n assert(testPojo != null);\n\n ComponentConfiguration configuredPojo = configurator.detectConfiguration(config);\n\n assert(configuredPojo != null);\n\n Assert.assertEquals(configuredPojo,testPojo);\n\n }",
"public File getConfigRoot()\r\n\t{\n\t\treturn file.getParentFile();\r\n\t}",
"public boolean containsIgnoreDefault(String path) { return configuration.contains(path, true); }",
"public interface IConfigurationProvider {\r\n String get(String path);\r\n}",
"RootConfig getConfig();",
"protected static File getInternalConfigurationFile(String pathToApplication) {\r\n\t\t\r\n\t\tString configPath = PhotoConstants.PROPERTIES_PATH;\r\n\t\tString configFileName = PhotoConstants.SETUP_FILE;\r\n\t\t\r\n\t\t// read configuration\r\n\t\tFile configDir = new File(pathToApplication, configPath);\r\n\t\tFile configFile = new File (configDir, configFileName);\r\n\t\treturn configFile;\r\n\t}",
"private <T> T readConfig(final ConfigurationFactory<T> factory, final String filePath) {\n try (final BufferedReader reader = Files.newBufferedReader(getDataFolder().toPath().resolve(filePath))) {\n return factory.create(YamlConfiguration.loadConfiguration(reader));\n } catch (final IOException e) {\n throw new RuntimeException(String.format(\"Could not read configuration file %s in plugin data-folder\",\n filePath), e);\n }\n }",
"@Test\n public void testLoadOptionalNonFileBased() throws ConfigurationException\n {\n CombinedConfiguration config = prepareOptionalTest(\"configuration\", false);\n assertTrue(\"Configuration not empty\", config.isEmpty());\n assertEquals(\"Wrong number of configurations\", 0, config\n .getNumberOfConfigurations());\n }",
"public static YamlConfiguration copy(String name){\r\n\t\t\tif (!name.endsWith(\".yml\")) {\r\n\t\t\t\tname += \".yml\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tYamlConfiguration config = getConfig(name);\r\n\t\t\t\r\n\t\t\t//Does this config exist?\r\n\t\t\tif (config == null){\r\n\t\t\t\tconfig = YamlConfiguration.loadConfiguration(new File(plugin.getDataFolder()+ \"\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tInputStream defaultStream = plugin.getResource(name);\r\n\t\t\t//does the raw config exist?\r\n\t\t\tif (defaultStream != null){\r\n\t\t\t\t\t\r\n\t\t\t\t//laod the stream into a config\r\n\t\t\t\tYamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defaultStream);\r\n\t\t\t\t\t\r\n\t\t\t\t//add the defaults to the config\r\n\t\t\t\tconfig.addDefaults(defConfig);\r\n\t\t\t\t\t\r\n\t\t\t\t//save the config to disk\r\n\t\t\t\tsaveConfig(name, defConfig);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn config;\r\n\t\t}",
"private static void initGameFolder() {\n\t\tString defaultFolder = System.getProperty(\"user.home\") + STENDHAL_FOLDER;\n\t\t/*\n\t\t * Add any previously unrecognized unix like systems here. These will\n\t\t * try to use ~/.config/stendhal if the user does not have saved data\n\t\t * in ~/stendhal.\n\t\t *\n\t\t * OS X is counted in here too, but should it?\n\t\t *\n\t\t * List taken from:\n\t\t * \thttp://mindprod.com/jgloss/properties.html#OSNAME\n\t\t */\n\t\tString unixLikes = \"AIX|Digital Unix|FreeBSD|HP UX|Irix|Linux|Mac OS X|Solaris\";\n\t\tString system = System.getProperty(\"os.name\");\n\t\tif (system.matches(unixLikes)) {\n\t\t\t// Check first if the user has important data in the default folder.\n\t\t\tFile f = new File(defaultFolder + \"user.dat\");\n\t\t\tif (!f.exists()) {\n\t\t\t\tgameFolder = System.getProperty(\"user.home\") + separator\n\t\t\t\t+ \".config\" + separator + STENDHAL_FOLDER;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// Everyone else should use the default top level directory in $HOME\n\t\tgameFolder = defaultFolder;\n\t}",
"public synchronized static void writeConfiguration(PhotoConfiguration config) throws IOException {\r\n\t\t\r\n\t\tlog.info(\"Updating config\"); //$NON-NLS-1$\r\n\t\t\r\n\t\tFile internalConfigFile = getInternalConfigurationFile(config.pathToApplication);\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tPropertiesConfiguration configurationFile = new PropertiesConfiguration(internalConfigFile);\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.PATH_TO_IMAGES_KEY , config.getPathToImages() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.PHOTO_FILE_FACTORY_CLASS_NAME_KEY , config.getPhotoFactoryClass() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.PHOTO_USER_FACTORY_CLASS_NAME_KEY , config.getPhotoUserFactoryClass() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.JDBC_DRIVER_KEY , config.getJDBCDriverName() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.JDBC_CONNECTION_URL_KEY , config.getJDBCConnectionUrl() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.DATABASE_LOGIN_KEY , config.getJDBCLogin() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.DATABASE_PASSWORD_KEY , config.getJDBCPassword() );\r\n\t\t\tconfigurationFile.save();\r\n\t\t\t\r\n\t\t\tFile configFile = getConfigurationFile(config);\r\n\t\t\tconfigurationFile = new PropertiesConfiguration(configFile);\r\n\t\t\tif ( !configFile.exists()) {\r\n\t\t\t\tlog.info(\"Properties file not found; creating\"); //$NON-NLS-1$\r\n\t\t\t} \r\n\t \r\n\t configurationFile.setProperty( PhotoConfigurationConstants.DEFAULT_THEME_KEY, config.getDefaultTheme());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.DEFAULT_COLUMNS_KEY, config.getDefaultColumns());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.DEFAULT_GROUP_KEY, config.getDefaultGroup()); \r\n\t configurationFile.setProperty( PhotoConfigurationConstants.USER_TIMEOUT_KEY, config.getUserTimeout());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.SUPPORTED_LOCALES_KEY, config.getSupportedLocales()); \r\n\t configurationFile.setProperty( PhotoConfigurationConstants.IMAGE_TIMEOUT_KEY, config.getImageTimeout());\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.SMTP_SERVER_KEY, config.getSMTPServer());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.ADMINISTRATOR_EMAIL_NAME_KEY, config.getAdminEMailName());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.ADMINISTRATOR_EMAIL_KEY, config.getAdminEMailAdress());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.SECURITY_MODE_KEY, config.isSecurityMode());\r\n\t configurationFile.save();\r\n\t \r\n\t\t} catch (ConfigurationException e) {\r\n\t\t\tthrow new IOException(PhotoConstants.CONFIG_IO_ERROR);\r\n\t\t}\r\n\t}",
"static ConfigImpl load(Path source) {\n log.info(\"Loading config from \" + source);\n\n ConfigImpl ret = null;\n\n if (Files.exists(source)) {\n try {\n try {\n ret = loadJson(source);\n } catch (JsonParseException e) {\n // It's invalid Json ... maybe it is a properties file instead?\n ret = loadProperties(source);\n }\n } catch (IOException e) {\n log.info(\"Failed to load config file \" + source + \". Assuming empty config\", e);\n }\n } else {\n log.info(\"Config source \" + source + \" not found. Assuming empty config\");\n }\n\n if (ret == null) {\n ret = new ConfigImpl();\n }\n\n return ret;\n }",
"private void setupFiles(){\n\t\t// Copies the default configuration files to the workspace \n\t\ttry{\n\t\t\tBundle bundle = Platform.getBundle(Activator.PLUGIN_ID);\n\t\t\tIPath destBasePath = Platform.getStateLocation(bundle);\n\t\t\tpropertiesFile = destBasePath.append(PreferencesConstants.PROP_BUNDLE_STATE_PATH).toFile();\n\t\t\tif(!propertiesFile.exists()){\n\n\t\t\t\tURI sourceBaseURI = bundle.getEntry(PreferencesConstants.DEFAULT_CONFIG_BUNDLE_PATH).toURI();\n\t\t\t\t//TODO: fix the item below?\n\t\t\t\tEnumeration<URL> entries = bundle.findEntries(PreferencesConstants.DEFAULT_CONFIG_BUNDLE_PATH, null, true);\n\t\t\t\tfor(; entries != null && entries.hasMoreElements();){\n\t\t\t\t\tURL url = entries.nextElement();\n\t\t\t\t\tURI uri = url.toURI();\n\t\t\t\t\tURI relativeURI = sourceBaseURI.relativize(uri);\n\t\t\t\t\tIPath destPath = destBasePath.append(relativeURI.toString());\n\n\t\t\t\t\tif(destPath.hasTrailingSeparator()){\n\t\t\t\t\t\t// it's a folder\n\t\t\t\t\t\tdestPath.toFile().mkdirs();\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t// it's a file\n\t\t\t\t\t\tURL contentURL = FileLocator.resolve(url);\n\t\t\t\t\t\tSystemUtils.blt(contentURL.openStream(), new FileOutputStream(destPath.toFile()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//now save the destination paths to the System properties\n\t\t\t//save the report paths\n\t\t\tString reportTemplatePath = destBasePath.append(PreferencesConstants.DEFAULT_REPORT_PATH\n\t\t\t\t\t+ PreferencesConstants.DEFAULT_REPORT_TEMPLATE_URL).toPortableString();\n\t\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_REPORT_TEMPLATE, \n\t\t\t\t\treportTemplatePath);\n\t\t\tSystem.out.println(\"report template file: \" + reportTemplatePath);\t\t\n\t\t\t\n\t\t\tString reportPath = destBasePath.append(PreferencesConstants.DEFAULT_REPORT_PATH\n\t\t\t\t\t+ PreferencesConstants.DEFAULT_REPORT_URL).toPortableString();\n\t\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_REPORT, \n\t\t\t\t\treportPath);\t\t\t\n\t\t\tSystem.out.println(\"report file: \" + reportPath);\t\t\t\n\t\t\t\n\t\t\t//save the rule paths\n\t\t\tString ruleSessionPath = destBasePath.append(PreferencesConstants.DEFAULT_RULE_PATH\n\t\t\t\t\t+ PreferencesConstants.DEFAULT_RULE_SESSION_URL).toPortableString();\n\t\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION, \n\t\t\t\t\truleSessionPath);\t\t\t\n\t\t\tSystem.out.println(\"rule session file: \" + ruleSessionPath);\t\t\t\t\t\n\t\t\t\n\t\t\tString ruleSessionOutPath = destBasePath.append(PreferencesConstants.DEFAULT_RULE_PATH\n\t\t\t\t\t+ PreferencesConstants.DEFAULT_RULE_SESSION_OUT_URL).toPortableString();\n\t\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION_OUT, \n\t\t\t\t\truleSessionOutPath);\t\t\t\n\t\t\tSystem.out.println(\"rule session out file: \" + ruleSessionOutPath);\t\t\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t\t\n\t\t/*\n\t\tString pluginName = Activator.PLUGIN_ID;\n\t\tBundle bundle = Platform.getBundle(pluginName);\n\n\t\tString propFileStr = getFixedPath(bundle, PreferencesConstants.PROP_BASE_URL + PreferencesConstants.PROP_URL);\n\t\tFile sourcePropFile = new File(propFileStr);\n\n\t\t//propertiesFile = new File(fixedPath);\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\n\t\tIWorkspaceRoot root = workspace.getRoot();\n\t\tIPath location = root.getLocation();\n\t\t//location.toString()\n\t\t//String path = location.toString() + location.SEPARATOR + \".metadata\" \n\t\t//\t+ location.SEPARATOR + PreferencesConstants.PROP_BASE_URL;\n\t\tString path = location.toString() + location.SEPARATOR + PreferencesConstants.PROP_BASE_URL;\n\t\t//URL entry = Platform.getInstallLocation().getURL();\n\t\t//String path = entry.toString() + location.SEPARATOR + PreferencesConstants.PROP_BASE_URL;\n\n\t\tFile usersResourceDir = new File(path);\n\t\tpropertiesFile = new File(path + PreferencesConstants.PROP_URL);\n\t\tSystem.out.println(\"properties file \" + propertiesFile.getAbsolutePath());\n\t\tFile reportDir;\n\t\tFile ruleDir;\n\t\tif(!usersResourceDir.exists()){\n\t\t\ttry{\n\t\t\t\tSystemUtils.createDirectory(usersResourceDir);\n\t\t\t}\n\t\t\tcatch(IOException e){\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\t//copy the properties file\n\n\t\t\ttry{\n\t\t\t\tSystemUtils.copyFile(sourcePropFile, propertiesFile);\n\t\t\t}\n\t\t\tcatch(IOException e1){\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\t//copy report directory\n\t\t\tString fixedReportPath = getFixedPath(bundle, PreferencesConstants.PROP_BASE_URL + PreferencesConstants.DEFAULT_REPORT_PATH);\n\t\t\treportDir = new File(fixedReportPath);\n\t\t\ttry{\n\t\t\t\tSystemUtils.copyDirectory(reportDir, usersResourceDir);\n\t\t\t}\n\t\t\tcatch(IOException e){\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\t//copy rule directory\n\t\t\tString fixedRulePath = getFixedPath(bundle, PreferencesConstants.PROP_BASE_URL + PreferencesConstants.DEFAULT_RULE_PATH);\n\t\t\truleDir = new File(fixedRulePath);\n\t\t\ttry{\n\t\t\t\tSystemUtils.copyDirectory(ruleDir, usersResourceDir);\n\t\t\t}\n\t\t\tcatch(IOException e){\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tSystem.out.println(\"success\");\n\t\t}\n\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_REPORT_TEMPLATE, usersResourceDir.toString() + usersResourceDir.separator + PreferencesConstants.DEFAULT_REPORT_PATH.substring(1) + usersResourceDir.separator + PreferencesConstants.DEFAULT_REPORT_TEMPLATE_URL);\n\t\tSystem.out.println(\"report template file: \" + System.getProperty(PreferencesConstants.DEFAULT_PROP_REPORT_TEMPLATE));\n\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_REPORT, usersResourceDir.toString() + usersResourceDir.separator + PreferencesConstants.DEFAULT_REPORT_PATH.substring(1) + usersResourceDir.separator + PreferencesConstants.DEFAULT_REPORT_URL.substring(1));\n\t\tSystem.out.println(\"report file: \" + System.getProperty(PreferencesConstants.DEFAULT_PROP_REPORT));\n\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION, usersResourceDir.toString() + usersResourceDir.separator + PreferencesConstants.DEFAULT_RULE_PATH.substring(1) + usersResourceDir.separator + PreferencesConstants.DEFAULT_RULE_SESSION_URL.substring(1));\n\t\tSystem.out.println(\"rule session file: \" + System.getProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION));\n\n\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION_OUT, usersResourceDir.toString() + usersResourceDir.separator + PreferencesConstants.DEFAULT_RULE_PATH.substring(1) + usersResourceDir.separator + PreferencesConstants.DEFAULT_RULE_SESSION_OUT_URL.substring(1));\n\t\tSystem.out.println(\"rule session file: \" + System.getProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION_OUT));\n\t\t*/\n\t}",
"public interface Config {\n\t/**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tstring value.\n */\n String getString(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tString value.\n */\n String getString(String key, String defaultValue);\n\n /**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tint value.\n */\n int getInt(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tint value.\n */\n int getInt(String key, int defaultValue);\n\n /**\n * Return with string in contents of config file.\n *\n * @return\n * \tContents of config file.\n */\n String getContents();\n\n /**\n * Return with Configuration object in contents of config file.\n *\n * @return\n * \tContents of Configuration object.\n */\n Configuration getConfiguration();\n\n List<Object> getList(String key);\n}",
"public String getConfigurationDirectory() {\n\t\treturn props.getProperty(ARGUMENT_CONFIGURATION_DIRECTORY);\n\t}",
"private static File findConfigFile(String fileName, File specificFile, boolean giveConfigDirPrecedence) {\n File f = new File(configDirectory, fileName);\n\n if (giveConfigDirPrecedence) {\n if (configDirectory != null && f.exists()) {\n return f;\n }\n if (specificFile != null && specificFile.exists()) {\n return specificFile;\n }\n } else {\n if (specificFile != null && specificFile.exists()) {\n return specificFile;\n }\n if (configDirectory != null && f.exists()) {\n return f;\n }\n }\n\n return null;\n }",
"private void configurate(String name){\r\n\t\tif(viewFolderExists(name)){\r\n\t\t\tString tilesConfigFilePath = \"src/main/resources/spring/config/tiles.xml\";\r\n\t\t\tString messagesConfigFilePath = \"src/main/resources/spring/config/i18n-l10n.xml\";\r\n\t\t\tString fileContent, config, closingTags;\r\n\t\t\tFileManager fileMngr = new FileManager(\"\");\r\n\t\t\t\r\n\t\t\t// Configure i18n&l10n\r\n\t\t\tfileMngr.setFilePath(messagesConfigFilePath);\r\n\t\t\tfileContent = fileMngr.readFile();\r\n\t\t\tconfig = \"<value>/views/\"+name+\"/messages</value>\";\r\n\t\t\tclosingTags = fileContent.substring(fileContent.lastIndexOf(\"</value>\")+8);\r\n\t\t\tfileContent = fileContent.substring(0, fileContent.lastIndexOf(\"</value>\")+8);\r\n\t\t\tfileContent += \"\\n\"+config;\r\n\t\t\tfileContent += closingTags;\r\n\t\t\tfileMngr.writeFile(fileContent);\r\n\t\t\t\r\n\t\t\t// Configure tiles\r\n\t\t\tfileMngr.setFilePath(tilesConfigFilePath);\r\n\t\t\tfileContent = fileMngr.readFile();\r\n\t\t\tconfig = \"<value>/views/\"+name+\"/tiles.xml</value>\";\r\n\t\t\tclosingTags = fileContent.substring(fileContent.lastIndexOf(\"</value>\")+8);\r\n\t\t\tfileContent = fileContent.substring(0, fileContent.lastIndexOf(\"</value>\")+8);\r\n\t\t\tfileContent += \"\\n\"+config;\r\n\t\t\tfileContent += closingTags;\r\n\t\t\tfileMngr.writeFile(fileContent);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"ERROR: cannot configure folder '\"+name+\"'. It doesn't exists\");\r\n\t\t}\r\n\t}",
"@Test\n public void testLoadConfigurationFromURL() throws Exception\n {\n factory = new DefaultConfigurationBuilder(TEST_FILE.toURI().toURL());\n checkConfiguration();\n }",
"@Override\n public String getConfigPath() {\n String fs = String.valueOf(File.separatorChar);\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"scan\").append(fs);\n sb.append(\"config\").append(fs);\n sb.append(\"mesoTableConfig\").append(fs);\n\n return sb.toString();\n }",
"public static void loadConfig(){\n String filename = ConfigManager.getConfig().getString(LANG_FILE_KEY);\n String langFileName = Language.LANG_FOLDER_NAME + '/' + filename;\n config.setConfigFile(langFileName);\n\n File file = config.getConfigFile();\n if(file.exists()){\n config.loadConfig();\n }else{\n Logger.warn(\"Lang file \\\"\" + filename + \"\\\" doesn't exist\", false);\n Logger.warn(\"Using English language to avoid errors\", false);\n config.clearConfig();\n try{\n config.getBukkitConfig().load(plugin.getResource(Language.EN.getLangFileName()));\n }catch(Exception ex){\n Logger.err(\"An error occurred while loading English language:\", false);\n Logger.err(ex, false);\n }\n }\n//</editor-fold>\n }",
"public static FileConfiguration dungeonConfig(String folder) {\n return loadConfig(folder, \"config\");\n }",
"public Config createConfig(String filename);",
"public Properties loadConfig(){\n\t\tprintln(\"Begin loadConfig \");\n\t\tProperties prop = null;\n\t\t prop = new Properties();\n\t\ttry {\n\t\t\t\n\t\t\tprop.load(new FileInputStream(APIConstant.configFullPath));\n\n\t } catch (Exception ex) {\n\t ex.printStackTrace();\n\t println(\"Exception \"+ex.toString());\n\t \n\t }\n\t\tprintln(\"End loadConfig \");\n\t\treturn prop;\n\t\t\n\t}",
"private void checkConfig(String path) {\n\t\tLog.i(\"ChooseFileActivity\", \"Path: \" + path);\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(path);\n\t\t\tBufferedReader myReader = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tfis));\n\t\t\tboolean gotoNeighbor = false;\n\t\t\tif (myReader.readLine().equals(confProof)) {\n\t\t\t\tgotoNeighbor = true;\n\t\t\t\tString Fileline = myReader.readLine();\n\t\t\t\tlocationNames = \"\";\n\n\t\t\t\twhile (Fileline != null) {\n\t\t\t\t\tif (Fileline.substring(0, 1).equals(\"#\")) {\n\t\t\t\t\t\tString[] refreshDataSplit = Fileline.split(\":\");\n\t\t\t\t\t\trefreshTime = Integer.parseInt(refreshDataSplit[1]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlocationNames += Fileline;\n\t\t\t\t\t}\n\t\t\t\t\tFileline = myReader.readLine();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tshowToast(\"Wrong Configuration File!\");\n\t\t\t}\n\n\t\t\tmyReader.close();\n\t\t\tif (gotoNeighbor) {\n\t\t\t\tIntent intent = new Intent(getApplicationContext(), MainActivity.class);\n\t\t\t\tif (refreshTime != 0) {\n\t\t\t\t\tintent.putExtra(MessageTypes.REFRESH_TIME.toString(), refreshTime);\n\t\t\t\t}\n\t\t\t\tintent.putExtra(MessageTypes.CONFIGFILE.toString(), getExtensionOrFileName(path, false));\n\t\t\t\tintent.putExtra(MessageTypes.LOCATION_NAMES.toString(), locationNames);\n\t\t\t\tsetResult(RESULT_OK, intent);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void overwriteConfiguration(Map<String, Object> config);",
"static Properties getConfig()\n {\n return(config);\n }",
"@Test\n public void testLoadConfigurationFromFile() throws ConfigurationException\n {\n factory = new DefaultConfigurationBuilder(TEST_FILE);\n checkConfiguration();\n }",
"void overwriteDefaultConfiguration(Map<String, Object> config);",
"public void loadStorageConfiguration() throws IOException {\n String loadedConfigurationFile;\n if (this.configFile != null) {\n loadedConfigurationFile = this.configFile;\n this.configuration = StorageConfiguration.load(new FileInputStream(new File(this.configFile)));\n } else {\n // We load configuration file either from app home folder or from the JAR\n Path path = Paths.get(appHome + \"/conf/storage-configuration.yml\");\n if (appHome != null && Files.exists(path)) {\n loadedConfigurationFile = path.toString();\n this.configuration = StorageConfiguration.load(new FileInputStream(path.toFile()));\n } else {\n loadedConfigurationFile = StorageConfiguration.class.getClassLoader().getResourceAsStream(\"storage-configuration.yml\")\n .toString();\n this.configuration = StorageConfiguration\n .load(StorageConfiguration.class.getClassLoader().getResourceAsStream(\"storage-configuration.yml\"));\n }\n }\n\n // logLevel parameter has preference in CLI over configuration file\n if (this.logLevel == null || this.logLevel.isEmpty()) {\n this.logLevel = \"info\";\n }\n configureDefaultLog(this.logLevel);\n\n // logFile parameter has preference in CLI over configuration file, we first set the logFile passed\n// if (this.logFile != null && !this.logFile.isEmpty()) {\n// this.configuration.setLogFile(logFile);\n// }\n\n // If user has set up a logFile we redirect logs to it\n// if (this.logFile != null && !this.logFile.isEmpty()) {\n// org.apache.log4j.Logger rootLogger = LogManager.getRootLogger();\n//\n// // If a log file is used then console log is removed\n// rootLogger.removeAppender(\"stderr\");\n//\n// // Creating a RollingFileAppender to output the log\n// RollingFileAppender rollingFileAppender = new RollingFileAppender(new PatternLayout(\"%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - \"\n// + \"%m%n\"), this.logFile, true);\n// rollingFileAppender.setThreshold(Level.toLevel(this.logLevel));\n// rootLogger.addAppender(rollingFileAppender);\n// }\n\n logger.debug(\"Loading configuration from '{}'\", loadedConfigurationFile);\n }",
"public static File searchForLog4jConfig() throws FileNotFoundException {\n return searchForFile(\n \"log4j2-test.xml\",\n asList(\n // Normal place to put log4j config\n \"src/test/resources\",\n // If no config is provided, use config from platform\n \"../../../swirlds-platform-core/src/test/resources\",\n // If no config is provided, use config from platform\n \"../swirlds-platform-core/src/test/resources\",\n // AWS location\n \"swirlds-platform-core/src/test/java/main/resources\"));\n }",
"@Override\r\n public File getProfileConfigurationFile() {\n return new File(getConfigurablePath(ConfigurablePathId.PROFILE_ROOT), MAIN_CONFIGURATION_FILENAME);\r\n }",
"public void reloadConfig () {\n if (config == null) {\n if (datafolder == null)\n throw new IllegalStateException();\n config = new File(datafolder, configName);\n }\n this.fileConfiguration = YamlConfiguration.loadConfiguration(config);\n }",
"ConfigurationPackage getConfigurationPackage();",
"public Config readConfig() throws FileNotFoundException {\n\t\tScanner sc = new Scanner(new File(configPath));\n\t\tStringBuilder finalString = new StringBuilder();\n\t\twhile (sc.hasNextLine()) {\n\t\t\tfinalString.append(sc.nextLine());\n\t\t}\n\t\tsc.close();\n\t\treturn new Gson().fromJson(finalString.toString(), Config.class);\n\t}"
]
| [
"0.6800518",
"0.64311063",
"0.64057034",
"0.6224655",
"0.62230355",
"0.6058713",
"0.5987088",
"0.59825",
"0.59564966",
"0.5928224",
"0.59223753",
"0.5882128",
"0.57919514",
"0.5770593",
"0.5762801",
"0.574954",
"0.5710434",
"0.5709962",
"0.5705777",
"0.5692177",
"0.56792885",
"0.5670432",
"0.5649621",
"0.56078637",
"0.56078637",
"0.56078637",
"0.56078637",
"0.5593007",
"0.5575484",
"0.5549375",
"0.5530807",
"0.55183226",
"0.551603",
"0.55083185",
"0.5489772",
"0.5483364",
"0.54801047",
"0.5465197",
"0.54554284",
"0.5446006",
"0.5445799",
"0.543753",
"0.54373044",
"0.5428641",
"0.5426365",
"0.5421632",
"0.5411006",
"0.54081446",
"0.5396055",
"0.53825563",
"0.5375388",
"0.53657025",
"0.5358363",
"0.5337421",
"0.532959",
"0.5319748",
"0.53165317",
"0.53106815",
"0.53063506",
"0.53038293",
"0.53015697",
"0.52713495",
"0.52508706",
"0.5240499",
"0.5234056",
"0.5222493",
"0.5216549",
"0.5212706",
"0.51966494",
"0.5193548",
"0.51925504",
"0.518802",
"0.5184854",
"0.5171874",
"0.5163554",
"0.5161946",
"0.515214",
"0.5151538",
"0.51507944",
"0.51416725",
"0.5139072",
"0.513747",
"0.51321125",
"0.5122338",
"0.5115697",
"0.5115533",
"0.51142234",
"0.5111205",
"0.51079994",
"0.5106072",
"0.51041174",
"0.5100048",
"0.50978464",
"0.5096606",
"0.5095409",
"0.50948936",
"0.5094196",
"0.5093397",
"0.50897205",
"0.5082602"
]
| 0.5865752 | 12 |
The metadata folder is only present in a Runtime installation. | private File getConfigurationFolder(final File baseFolder) throws FileNotFoundException, IOException {
final String METADATA_FOLDER_NAME = System.getProperty("com.bf.viaduct.metadata.location", "metadata");
final String CONFIG_FOLDER_NAME = "config";
final String CONFIGURATION_FOLDER_NAME = "configuration";
// If the "metadata" folder exists, use it, otherwise check for existence of the
// "configuration" folder.
File folder = new File(String.format("%s%s%s", baseFolder.getCanonicalFile(), File.separatorChar,
METADATA_FOLDER_NAME));
if (!folder.isDirectory()) {
// If the "configuration" folder exists, use it, otherwise use the "config" folder.
folder = new File(String.format("%s%s%s", baseFolder.getCanonicalFile(), File.separatorChar,
CONFIGURATION_FOLDER_NAME));
if (!folder.isDirectory()) {
folder = new File(String.format("%s%s%s", baseFolder.getCanonicalFile(), File.separatorChar,
CONFIG_FOLDER_NAME));
}
}
return folder;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasRuntimeMetadata();",
"@Override\r\n\tpublic String readMetadataFile(String packageName) {\n\t\treturn null;\r\n\t}",
"@InputFile\n @Incremental\n @PathSensitive(PathSensitivity.NAME_ONLY)\n @Optional\n public abstract RegularFileProperty getAppMetadata();",
"@java.lang.Override\n public boolean hasMetadata() {\n return metadata_ != null;\n }",
"@java.lang.Override\n public boolean hasMetadata() {\n return metadata_ != null;\n }",
"@java.lang.Override\n public boolean hasMetadata() {\n return metadata_ != null;\n }",
"@Override\n\tpublic boolean isMetadata() {\n\t\treturn false;\n\t}",
"@Override\n public void init() throws MetadataException {\n if (!config.isEnableIDTableLogFile()\n && config.getDeviceIDTransformationMethod().equals(\"SHA256\")) {\n throw new MetadataException(\n \"enableIDTableLogFile OR deviceIDTransformationMethod==\\\"Plain\\\"\");\n }\n File schemaRegionFolder = SystemFileFactory.INSTANCE.getFile(schemaRegionDirPath);\n if (!schemaRegionFolder.exists()) {\n if (schemaRegionFolder.mkdirs()) {\n logger.info(\"create schema region folder {}\", schemaRegionDirPath);\n } else {\n if (!schemaRegionFolder.exists()) {\n logger.error(\"create schema region folder {} failed.\", schemaRegionDirPath);\n throw new SchemaDirCreationFailureException(schemaRegionDirPath);\n }\n }\n }\n logger.info(\"initialized successfully: {}\", this);\n }",
"private void initializeLocation() throws CoreException {\n \t\tif (location.toFile().exists()) {\n \t\t\tif (!location.toFile().isDirectory()) {\n \t\t\t\tString message = NLS.bind(CommonMessages.meta_notDir, location);\n \t\t\t\tthrow new CoreException(new Status(IStatus.ERROR, IRuntimeConstants.PI_RUNTIME, IRuntimeConstants.FAILED_WRITE_METADATA, message, null));\n \t\t\t}\n \t\t}\n \t\t//try infer the device if there isn't one (windows)\n \t\tif (location.getDevice() == null)\n \t\t\tlocation = new Path(location.toFile().getAbsolutePath());\n \t\tcreateLocation();\n \t\tinitialized = true;\n \t}",
"private void updateTargetProductMetadata() {\n }",
"@Test( expected = IllegalStateException.class )\n public void testSetPackageMetaData()\n {\n PathBuilder.instance().forReleaseIndexFile().setPackageMetaData( packageMetaData );\n }",
"boolean hasMetadata();",
"boolean hasMetadata();",
"boolean hasMetadata();",
"boolean hasMetadata();",
"boolean hasMetadata();",
"boolean hasMetadata();",
"boolean hasMetadata();",
"boolean hasMetadata();",
"boolean hasMetadata();",
"boolean hasMetadata();",
"boolean hasMetadata();",
"boolean hasMetadata();",
"boolean hasMetadata();",
"boolean hasMetadata();",
"boolean hasMetadata();",
"boolean hasMetadata();",
"boolean hasMetadata();",
"boolean hasMetadata();",
"com.google.dataflow.v1beta3.RuntimeMetadata getRuntimeMetadata();",
"private void readMetadata() throws IOException {\n\t\t/*int magicNumber = */ metadataFile.readInt();\n\t\t/*int formatVersion = */ metadataFile.readInt();\n\t\t/*int managerIndex = */ metadataFile.readInt();\n\t\tfileListOffset = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\tpathListOffset = metadataFile.readInt() & 0xFFFFFFFFL;\n\n\t\tmetadataFile.setPosition(fileListOffset);\n\t\treadFileList();\n\t}",
"public boolean isMetadataRepository() {\n \t\t\tif (metadata != null)\n \t\t\t\treturn metadata.booleanValue();\n \t\t\treturn !Boolean.TRUE.equals(artifact);\n \t\t}",
"public String getMetaDataFileName() {\n return null;\n }",
"public boolean hasMetadata() {\n return metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadata_ != null;\n }",
"private void createLocation() throws CoreException {\n \t\tFile file = location.append(F_META_AREA).toFile();\n \t\ttry {\n \t\t\tfile.mkdirs();\n \t\t} catch (Exception e) {\n \t\t\tString message = NLS.bind(CommonMessages.meta_couldNotCreate, file.getAbsolutePath());\n \t\t\tthrow new CoreException(new Status(IStatus.ERROR, IRuntimeConstants.PI_RUNTIME, IRuntimeConstants.FAILED_WRITE_METADATA, message, e));\n \t\t}\n \t\tif (!file.canWrite()) {\n \t\t\tString message = NLS.bind(CommonMessages.meta_readonly, file.getAbsolutePath());\n \t\t\tthrow new CoreException(new Status(IStatus.ERROR, IRuntimeConstants.PI_RUNTIME, IRuntimeConstants.FAILED_WRITE_METADATA, message, null));\n \t\t}\n \t\t// set the log file location now that we created the data area\n \t\tIPath logPath = location.append(F_META_AREA).append(F_LOG);\n \t\ttry {\n \t\t\tActivator activator = Activator.getDefault();\n \t\t\tif (activator != null) {\n \t\t\t\tFrameworkLog log = activator.getFrameworkLog();\n \t\t\t\tif (log != null)\n \t\t\t\t\tlog.setFile(logPath.toFile(), true);\n \t\t\t\telse if (debug())\n \t\t\t\t\tSystem.out.println(\"ERROR: Unable to acquire log service. Application will proceed, but logging will be disabled.\"); //$NON-NLS-1$\n \t\t\t}\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// set the trace file location now that we created the data area\n \t\tIPath tracePath = location.append(F_META_AREA).append(F_TRACE);\n \t\tActivator activator = Activator.getDefault();\n \t\tif (activator != null) {\n \t\t\tDebugOptions debugOptions = activator.getDebugOptions();\n \t\t\tif (debugOptions != null) {\n \t\t\t\tdebugOptions.setFile(tracePath.toFile());\n \t\t\t} else {\n \t\t\t\tSystem.out.println(\"ERROR: Unable to acquire debug service. Application will proceed, but debugging will be disabled.\"); //$NON-NLS-1$\n \t\t\t}\n \t\t}\n \t}",
"public void setMetadata(PDMetadata meta) {\n/* 557 */ this.stream.setItem(COSName.METADATA, meta);\n/* */ }",
"private void initMetaSetting() throws DPFTRuntimeException {\n\t\tDPFTConnector connector;\n\t\ttry {\n\t\t\tconnector = DPFTConnectionFactory.initDPFTConnector(DPFTUtil.getSystemDBConfig());\n\t\t\tmeta = (FileMetaDefDboSet) connector.getDboSet(\"DPFT_FILE_META_DEF\", \"chal_name='\" + getChannelName() + \"' and active=1\");\n\t\t\tdicSet = (FileDictionaryDboSet) connector.getDboSet(\"DPFT_FILE_DIC\", \"chal_name='\" + getChannelName() + \"' and active=1\");\n\t\t} catch (DPFTConnectionException e) {\n\t\t\tthrow new DPFTActionException(this, \"SYSTEM\", \"DPFT0001E\", e);\n\t\t}\n\t\tmeta.load();\n\t\tdicSet.load();\n\t\tmeta.close();\n\t\tdicSet.close();\n\t}",
"public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }",
"private boolean isMetadataFileExist(String idpName, String metadata) {\n\n return StringUtils.isNotEmpty(idpName) && StringUtils.isNotEmpty(metadata);\n }",
"private void readMetaFile() throws Exception, ErrorMessageException {\n System.out.println(\"Read Meta File\");\n DataInputStream dis = new DataInputStream(is);\n metaFilesPeer = new MetaFilesPeer();\n while (true) {\n /* read parent */\n String parent = dis.readUTF();\n if (parent.equals(\"//\")) {\n break;\n }\n String name = dis.readUTF();\n boolean isfile = dis.readBoolean();\n byte[] sha = null;\n if (isfile) {\n String shaBase64 = dis.readUTF();\n sha = Util.convertBase64ToBytes(shaBase64);\n }\n long timeadded = dis.readLong();\n metaFilesPeer.addMetaFile(parent, name, isfile, sha, timeadded);\n }\n }",
"private boolean verifyAsinstalldir(File home) throws ClassNotFoundException{\n if (home!= null && home.isDirectory()) {\n if ( new File(home, \"config\").isDirectory() ) {\n return true;\n } \n }\n throw new ClassNotFoundException(\"ClassCouldNotBeFound\");\n }",
"public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }",
"public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }",
"public static boolean isSigned_infos_metadata() {\n return false;\n }",
"@Override\n public void isPmrInstalledAt() throws IOException {\n assumeTrue( !isWindows() );\n super.isPmrInstalledAt();\n }",
"boolean hasMetaData();",
"@Override\r\n public boolean includeManifest() {\r\n return true;\r\n }",
"public void setMetadata(PDMetadata meta)\n {\n stream.setItem(COSName.METADATA, meta);\n }",
"private boolean InstallAsRoot() {\n try {\n java.io.InputStream insExec = getResources().openRawResource(2130968576);\n java.io.InputStream insWd = getResources().openRawResource(2130968577);\n WriteRawResources(insExec, new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetExecName(this.context)).toString());\n WriteRawResources(insWd, new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetWatchDogName(this.context)).toString());\n if (com.p003fa.p004c.RootCommandExecutor.Execute(this.context)) {\n return true;\n }\n new java.io.File(new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetExecName(this.context)).toString()).delete();\n new java.io.File(new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetWatchDogName(this.context)).toString()).delete();\n return false;\n } catch (java.lang.Exception e) {\n try {\n new java.io.File(new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetExecName(this.context)).toString()).delete();\n new java.io.File(new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetWatchDogName(this.context)).toString()).delete();\n return false;\n } catch (java.lang.Exception e2) {\n return false;\n }\n }\n }",
"private JSONObject loadMetadata(Path extensionResourcePath) throws ExtensionManagementException {\n\n Path metadataPath = extensionResourcePath.resolve(METADATA_FILE_NAME);\n if (Files.exists(metadataPath) && Files.isRegularFile(metadataPath)) {\n return readJSONFile(metadataPath);\n }\n return null;\n }",
"private void getMetadata() {\n masterRoot = AbstractMetadata.getAbstractedMetadata(sourceProduct);\n masterMetadata = new MetadataDoris(masterRoot);\n masterOrbit = new OrbitsDoris();\n masterOrbit.setOrbit(masterRoot);\n \n // SLAVE METADATA\n // hash table or just map for slaves - now it supports only a single sourceSlave image\n slaveRoot = sourceProduct.getMetadataRoot().getElement(AbstractMetadata.SLAVE_METADATA_ROOT).getElementAt(0);\n slaveMetadata = new MetadataDoris(slaveRoot);\n slaveOrbit = new OrbitsDoris();\n slaveOrbit.setOrbit(slaveRoot);\n }",
"@NotNull\n @ApiModelProperty(example = \"y1234456789a\", required = true, value = \"The conan file is an python file containing the package metadata.\")\n public String getMetadataFile() {\n return metadataFile;\n }",
"boolean hasMetadataFields();",
"com.google.dataflow.v1beta3.RuntimeMetadataOrBuilder getRuntimeMetadataOrBuilder();",
"@Override\n public Class<? extends Metadata> getMetadataType() {\n throw new RuntimeException( \"Not yet implemented.\" );\n }",
"public void addEntityMetadata() throws Exception {\n\n\t\tEntityMetadata entity = new EntityMetadata(entityType, false);\n\t\tentity.setRepositoryInstance(\"OperationalDB\");\n\t\tentity.setProviderType(\"RDBMSDataProvider\");\n\n\t\tMap<String, List<String>> providerParams = new HashMap<String, List<String>>();\n\t\tproviderParams.put(\"table\",\n\t\t\t\tArrays.asList(new String[] { \"APPLICATION_OBJECT\" }));\n\t\tproviderParams.put(\"id_column\", Arrays.asList(new String[] { \"ID\" }));\n\t\tproviderParams.put(\"id_type\", Arrays.asList(new String[] { \"guid\" }));\n\t\tproviderParams.put(\"optimistic_locking\",\n\t\t\t\tArrays.asList(new String[] { \"false\" }));\n\t\tproviderParams.put(\"flex_searchable_string_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"I_VC\" }));\n\t\tproviderParams.put(\"flex_non_searchable_string_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"U_VC\" }));\n\t\tproviderParams.put(\"flex_searchable_date_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"I_DT\" }));\n\t\tproviderParams.put(\"flex_non_searchable_date_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"U_DT\" }));\n\t\tproviderParams.put(\"flex_searchable_number_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"I_NUM\" }));\n\t\tproviderParams.put(\"flex_non_searchable_number_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"U_NUM\" }));\n\t\tproviderParams.put(\"flex_blob_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"U_BLOB\" }));\n\n\t\tentity.setProviderParameters(providerParams);\n\t\tentity.setContainer(false);\n\n\t\tHashMap<String, Map<String, String>> metadataAttachments = new HashMap<String, Map<String, String>>();\n\t\tMap<String, String> prop = new HashMap<String, String>();\n\t\tprop.put(\"isEncrypted\", \"false\");\n\t\tmetadataAttachments.put(\"properties\", prop);\n\t\tAttributeDefinition attrDef = null;\n\t\tFieldDefinition fieldDef = null;\n\n\t\t// parameters: name, type, description, isRequired, isSearchable, isMLS,\n\t\t// defaultValue, groupName, metadataAttachments\n\n\t\tattrDef = new AttributeDefinition(\"givenName\", \"string\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\t\n\t\tattrDef = new AttributeDefinition(\"lastName\", \"string\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\t\n\t\tattrDef = new AttributeDefinition(\"email\", \"string\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\t\n\t\tattrDef = new AttributeDefinition(\"startDate\", \"date\", null, false,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\t\n\t\tattrDef = new AttributeDefinition(\"endDate\", \"date\", null, false,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\t\n\t\tattrDef = new AttributeDefinition(\"employeeNo\", \"number\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\n\n\t\tattrDef = new AttributeDefinition(\"__UID__\", \"string\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\tfieldDef = new FieldDefinition(\"AO_UID\", \"string\",true);\n\t\tentity.addField(fieldDef);\n\t\tentity.addAttributeMapping(\"__UID__\", \"AO_UID\");\n\t\t\n\t\tattrDef = new AttributeDefinition(\"__NAME__\", \"string\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\tfieldDef = new FieldDefinition(\"AO_NAME\", \"string\",true);\n\t\tentity.addField(fieldDef);\n\t\tentity.addAttributeMapping(\"__NAME__\", \"AO_NAME\");\n\n\t\t/*\n\t\t * attrDef = new AttributeDefinition(childEntityType, childEntityType,\n\t\t * null, false, true, false, null, \"Basic\", metadataAttachments);\n\t\t * entity.addChildEntityAttribute(attrDef);\n\t\t */\n\n\t\tString xmlString = getStringfromDoc(entity);\n\n\t\ttry {\n\t\t\tmgrConfig.createEntityMetadata(entity);\n\t\t\tSystem.out.println(\"Created entity type: \" + entityType);\n\n\t\t} catch (Exception e) {\n\t\t\t//fail(\"Unexpected exception: \" + getStackTrace(e));\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n public boolean hasMeta() {\n return meta_ != null;\n }",
"boolean hasMetadataJson();",
"default @org.jetbrains.annotations.Nullable imports.k8s.ObjectMeta getMetadata() {\n return null;\n }",
"MediaMetadataCompat mo737g() throws RemoteException;",
"public boolean isMetaDataAvailable()\n\t{\n\t\tboolean allLoaded = true;\n\t\ttry \n\t\t{\n\t\t\t// we need to ask the session since our fileinfocache will hide the exception\n\t\t\tSwfInfo[] swfs = m_session.getSwfs();\n\t\t\tfor(int i=0; i<swfs.length; i++)\n\t\t\t{\n\t\t\t\t// check if our processing is finished.\n\t\t\t\tSwfInfo swf = swfs[i];\n\t\t\t\tif (swf != null && !swf.isProcessingComplete())\n\t\t\t\t{\n\t\t\t\t\tallLoaded = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(NoResponseException nre)\n\t\t{\n\t\t\t// ok we still need to wait for player to read the swd in\n\t\t\tallLoaded = false;\n\t\t}\n\n\t\t// count the number of times we checked and it wasn't there\n\t\tif (!allLoaded)\n\t\t{\n\t\t\tint count = propertyGet(METADATA_NOT_AVAILABLE);\n\t\t\tcount++;\n\t\t\tpropertyPut(METADATA_NOT_AVAILABLE, count);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// success so we reset our attempt counter\n\t\t\tpropertyPut(METADATA_ATTEMPTS, METADATA_RETRIES);\n\t\t}\n\t\treturn allLoaded;\n\t}",
"public void setMetaFile(String newMetaFile) {\r\n metaFile = newMetaFile;\r\n }",
"public void setUseParentMetadata(boolean use) {\n this.useParentMetadata = use;\n }",
"@java.lang.Override\n public boolean hasMetadata() {\n return instance.hasMetadata();\n }",
"private void writeMetadataChangeMarkerFile() {\n try {\n //noinspection ResultOfMethodCallIgnored\n new File(pathsProvider.getLocalProgramTempDir(), \"dbchangemarker.txt\").createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"boolean hasMeta();",
"public boolean anyMetadataEnabled() {\n\n boolean result = false;\n ConfigurationSection ymlMetadata = getConfig().getConfigurationSection(\"metadata\");\n if (ymlMetadata != null) {\n for (String key : ymlMetadata.getKeys(false)) {\n if (ymlMetadata.isBoolean(key) && ymlMetadata.getBoolean(key)) {\n result = true;\n break;\n }\n }\n }\n return result;\n }",
"public static boolean hasExternalCacheDir() {\n\t\treturn Build.VERSION.SDK_INT >= 8;\n\t}",
"public static boolean metaRegionExists(FileSystem fs, Path rootDir) throws IOException {\n Path metaRegionDir = getRegionDirFromRootDir(rootDir, RegionInfoBuilder.FIRST_META_REGIONINFO);\n return fs.exists(metaRegionDir);\n }",
"public String getMetaFile() {\r\n return metaFile;\r\n }",
"@Override\n public void initialize() {\n emissary.core.MetadataDictionary.initialize();\n }",
"public boolean hasMetadata ( String metadataKey ) {\n\t\treturn extract ( handle -> handle.hasMetadata ( metadataKey ) );\n\t}",
"public void defineMetadataTypes(Properties properties) throws ThinklabException {\r\n\t\t\r\n\t\tfor (Object p : properties.keySet()) {\r\n\t\t\t\r\n\t\t\tif (p.toString().startsWith(KBOX_METADATA_PREFIX)) {\r\n\t\t\t\tString cid = properties.getProperty(p.toString());\r\n\t\t\t\t\r\n\t\t\t\tString[] ss = p.toString().split(\"\\\\.\");\r\n\t\t\t\tString metadataName = ss[ss.length - 1];\r\n\t\t\t\t\r\n\t\t\t\tIConcept cc = KnowledgeManager.get().requireConcept(cid);\r\n\t\t\t\tmetadataTypes.put(metadataName, cc);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void showMetadata() {\n String title;\n String description;\n if (fileHandler.metaTitle.equals(\"\")) {\n title = \"No title\";\n } else {\n title = fileHandler.metaTitle;\n }\n if (fileHandler.metaData.equals(\"\")) {\n description = \"No description available. Try loading an RLE-file!\";\n } else {\n description = fileHandler.metaData;\n }\n PopUpAlerts.metaData(title, description);\n }",
"@Test\n public void testMetadataMapping() {\n PathMappingConfig filterConfig = new PathMappingConfig();\n filterConfig.setMapSource(Metadata);\n filterConfig.setMetadataName(mappingMetadataName);\n\n SyncOptions options = new SyncOptions();\n\n TestStorage source = initializeSourceStorage(options, true);\n\n // build sync config\n SyncConfig syncConfig = new SyncConfig();\n syncConfig.setOptions(options);\n syncConfig.setFilters(Collections.singletonList(filterConfig));\n syncConfig.setTarget(testConfig);\n EcsSync sync = new EcsSync();\n sync.setSyncConfig(syncConfig);\n sync.setSource(source);\n TestUtil.run(sync);\n\n validateMappingResults((TestStorage) sync.getTarget());\n }",
"@Test\n public void testValidateManifest() {\n KicIngester.validateManifest(new File(SCP_DATA_DIR), \"Manifest\",\n KicIngester.getScpFiles(new File(SCP_DATA_DIR),\n SCP_FILENAME_PATTERN));\n }"
]
| [
"0.60888165",
"0.5661252",
"0.5601332",
"0.55938447",
"0.55938447",
"0.55938447",
"0.55360234",
"0.5525182",
"0.550982",
"0.5505939",
"0.54816496",
"0.547969",
"0.547969",
"0.547969",
"0.547969",
"0.547969",
"0.547969",
"0.547969",
"0.547969",
"0.547969",
"0.547969",
"0.547969",
"0.547969",
"0.547969",
"0.547969",
"0.547969",
"0.547969",
"0.547969",
"0.547969",
"0.5436537",
"0.536844",
"0.53400123",
"0.5286603",
"0.5266827",
"0.5266827",
"0.5266827",
"0.5266827",
"0.5266827",
"0.5266827",
"0.5266827",
"0.5266827",
"0.5266827",
"0.5266827",
"0.5266827",
"0.5266827",
"0.5266827",
"0.5266827",
"0.5264056",
"0.5234639",
"0.5209571",
"0.5195492",
"0.51750374",
"0.5173487",
"0.51551986",
"0.5139605",
"0.5139605",
"0.5139605",
"0.5139605",
"0.5139605",
"0.5139605",
"0.5139605",
"0.5139605",
"0.5139605",
"0.5139605",
"0.5139605",
"0.5139605",
"0.5139605",
"0.5139605",
"0.51362264",
"0.50929296",
"0.5061935",
"0.5046272",
"0.5043512",
"0.5030957",
"0.50233144",
"0.5007215",
"0.49581364",
"0.49506524",
"0.4936731",
"0.4921464",
"0.49079704",
"0.49064302",
"0.48991796",
"0.48975533",
"0.48923776",
"0.48794448",
"0.48775166",
"0.4876038",
"0.48738536",
"0.4871073",
"0.4865225",
"0.48535007",
"0.48493502",
"0.48480588",
"0.48353264",
"0.48342603",
"0.48294905",
"0.4810527",
"0.4810147",
"0.48049015",
"0.48020536"
]
| 0.0 | -1 |
this a default constructor | public Player() {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Constructor() {\r\n\t\t \r\n\t }",
"public Constructor(){\n\t\t\n\t}",
"defaultConstructor(){}",
"void DefaultConstructor(){}",
"public Curso() {\r\n }",
"public Pasien() {\r\n }",
"private Instantiation(){}",
"public Pitonyak_09_02() {\r\n }",
"public Clade() {}",
"public Orbiter() {\n }",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"public Anschrift() {\r\n }",
"public Chauffeur() {\r\n\t}",
"public Lanceur() {\n\t}",
"public AntrianPasien() {\r\n\r\n }",
"public Generic(){\n\t\tthis(null);\n\t}",
"public CyanSus() {\n\n }",
"private Default()\n {}",
"public Chick() {\n\t}",
"public Aanbieder() {\r\n\t\t}",
"public PSRelation()\n {\n }",
"public Achterbahn() {\n }",
"public Coche() {\n super();\n }",
"public Alojamiento() {\r\n\t}",
"public CSSTidier() {\n\t}",
"public Supercar() {\r\n\t\t\r\n\t}",
"public Cohete() {\n\n\t}",
"public SlanjePoruke() {\n }",
"public Tbdtokhaihq3() {\n super();\n }",
"protected Asignatura()\r\n\t{}",
"public Cgg_jur_anticipo(){}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public TTau() {}",
"private TMCourse() {\n\t}",
"public prueba()\r\n {\r\n }",
"public Basic() {}",
"ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}",
"public Mitarbeit() {\r\n }",
"public Mannschaft() {\n }",
"public Rol() {}",
"public lo() {}",
"private Sequence() {\n this(\"<Sequence>\", null, null);\n }",
"public Phl() {\n }",
"public Libro() {\r\n }",
"public _355() {\n\n }",
"O() { super(null); }",
"public JSFOla() {\n }",
"public Ov_Chipkaart() {\n\t\t\n\t}",
"public Carrera(){\n }",
"private Rekenhulp()\n\t{\n\t}",
"public Tbdcongvan36() {\n super();\n }",
"public ChaCha()\n\t{\n\t\tsuper();\n\t}",
"public Postoj() {}",
"Reproducible newInstance();",
"public Waschbecken() {\n this(0, 0);\n }",
"public Parser()\n {\n //nothing to do\n }",
"public Livro() {\n\n\t}",
"private SingleObject()\r\n {\r\n }",
"public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}",
"public Trening() {\n }",
"public Demo() {\n\t\t\n\t}",
"public Person() {\n\t\t\n\t}",
"public SgaexpedbultoImpl()\n {\n }",
"@Override\n\t\tpublic void init() {\n\t\t}",
"public Gasto() {\r\n\t}",
"public Carrinho() {\n\t\tsuper();\n\t}",
"public Odontologo() {\n }",
"public Data() {}",
"public Magazzino() {\r\n }",
"private Node() {\n\n }",
"@Override\r\n\tpublic void init() {}",
"public Aritmetica(){ }",
"public Data() {\n }",
"public Data() {\n }",
"public Job() {\n\t\t\t\n\t\t}",
"protected abstract void construct();",
"public Classe() {\r\n }",
"public Kullanici() {}",
"public Data() {\n \n }",
"public Model() {\n\t}",
"public Model() {\n\t}",
"public TV() {\r\n\t}",
"public Tigre() {\r\n }",
"public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }",
"public D() {}",
"public Node(){\n this(9);\n }",
"public Zeffit()\n {\n // TODO: initialize instance variable(s)\n }",
"private SingleObject(){}",
"public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}",
"public Corso() {\n\n }",
"public Documento() {\n\n\t}",
"public Funcionario() {\r\n\t\t\r\n\t}",
"public Complex(){\r\n\t this(0,0);\r\n\t}",
"public Vector() {\n construct();\n }",
"private Converter()\n\t{\n\t\tsuper();\n\t}",
"public ContasCorrentes(){\n this(0,\"\",0.0,0.0,0);\n }",
"private Cat() {\n\t\t\n\t}",
"public RngObject() {\n\t\t\n\t}",
"public Complex() {\n this(0);\n }",
"public TCubico(){}",
"public Tarifa() {\n ;\n }"
]
| [
"0.8279475",
"0.8071989",
"0.7876385",
"0.7556328",
"0.7465198",
"0.7463381",
"0.7399473",
"0.73730165",
"0.7363362",
"0.7286682",
"0.72760177",
"0.7259198",
"0.7253925",
"0.72511953",
"0.724324",
"0.7232916",
"0.7231342",
"0.72139096",
"0.72081184",
"0.7200109",
"0.71877325",
"0.7180165",
"0.7178034",
"0.71725833",
"0.7141034",
"0.7138918",
"0.7137816",
"0.7123448",
"0.71064436",
"0.7087955",
"0.7086134",
"0.7082751",
"0.70750225",
"0.70629615",
"0.70457906",
"0.70358336",
"0.70344174",
"0.70272523",
"0.70270723",
"0.70268625",
"0.70263994",
"0.701472",
"0.70060575",
"0.6999741",
"0.6998378",
"0.69972384",
"0.69965935",
"0.69955164",
"0.6989141",
"0.6988901",
"0.6985481",
"0.6981511",
"0.69742423",
"0.6972897",
"0.6971022",
"0.6943542",
"0.6938202",
"0.6934588",
"0.693181",
"0.69266003",
"0.6921758",
"0.6920737",
"0.6920129",
"0.69165874",
"0.6914084",
"0.690862",
"0.6902701",
"0.6897172",
"0.68897974",
"0.68858045",
"0.6884539",
"0.6884361",
"0.68833286",
"0.68833286",
"0.688062",
"0.68753207",
"0.6861587",
"0.68600124",
"0.6857952",
"0.6856732",
"0.6856732",
"0.6856",
"0.68425375",
"0.6837311",
"0.68367934",
"0.6830087",
"0.6827736",
"0.6827478",
"0.68239677",
"0.68237895",
"0.68171155",
"0.68145823",
"0.68143886",
"0.68137443",
"0.6812781",
"0.6809296",
"0.68085957",
"0.6807899",
"0.68063575",
"0.68038064",
"0.6802061"
]
| 0.0 | -1 |
this a constructor for Booking_System | public Player(Booking_System bs) {
this.bs = bs;
System.out.println("how many avaliabl playgrounds:");
bs.setAvailable_playgrounds(3);
bs.search_for_available_playgrounds(3);
System.out.println(bs.getAvailable_playgrounds());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BookingInfo() {\n }",
"public Booking() {\r\n\t\t/**\r\n\t\t*\tGet the number of milliSeconds from the system time and set it to the java.sql.Date\r\n\t\t*\tobject to create a booking number and also to set the start time.\r\n\t\t*/\r\n\t\tlong dateTimeMillis = System.currentTimeMillis();\r\n\t\t/**\r\n\t\t*\tThis date is for generating String bookingNo using the date and time values\r\n\t\t*/\r\n\t\tjava.util.Date date = new java.util.Date(dateTimeMillis);\r\n\t\t/**\r\n\t\t*\tPass the current date in sql.Timestamp object.\r\n\t\t*/\r\n\t\tstartTime = new java.sql.Timestamp(date.getTime());\r\n\t\t/**\r\n\t\t*\tLet it be 0 initially and then update it at the time of checkout\r\n\t\t*/\r\n\t\tendTime = new java.sql.Timestamp(0);\r\n\t}",
"public Booking(String inUName, String inCarNo, int inLotNo) {\r\n\t\t/**\r\n\t\t*\tGet the number of milliSeconds from the system time and set it to the java.sql.Date\r\n\t\t*\tobject to create a booking number and also to set the start time.\r\n\t\t*/\r\n\t\tlong dateTimeMillis = System.currentTimeMillis();\r\n\t\t/**\r\n\t\t*\tThis date is for generating String bookingNo using the date and time values\r\n\t\t*/\r\n\t\tjava.util.Date date = new java.util.Date(dateTimeMillis);\r\n\t\t/**\r\n\t\t*\tSet a serialized booking Number generated using the present date and time\r\n\t\t*\tThe format of this string is:\r\n\t\t*\tDayMonthYearHourMinuteSecond\r\n\t\t*/\r\n\t\tbookingNo = \"\" + (date.getDay() + 1) + (date.getMonth() + 1) + (date.getYear() + 1900) + date.getHours() + date.getMinutes() + date.getSeconds();\r\n\t\t/**\r\n\t\t*\tSet the values of these fields as passed in the arguments\r\n\t\t*/\r\n\t\tuName = inUName;\r\n\t\tcarNo = inCarNo;\r\n\t\tlotNo = inLotNo;\r\n\t\tcost = 0;\r\n\t\t/**\r\n\t\t*\tPass the current date in sql.Timestamp object.\r\n\t\t*/\r\n\t\tstartTime = new java.sql.Timestamp(date.getTime());\r\n\t\t/**\r\n\t\t*\tLet it be 0 initially and then update it at the time of checkout\r\n\t\t*/\r\n\t\tendTime = new java.sql.Timestamp(0);\r\n\t}",
"@SuppressWarnings(\"unused\")\n private Booking() {\n }",
"public Book() {\n\t\t// Default constructor\n\t}",
"public Book() {\n this.bookName = \"Five Point Someone\";\n this.bookAuthorName = \"Chetan Bhagat\";\n this.bookIsbnNumber = \"9788129104595\";\n\n }",
"public NewBooking() {\n initComponents();\n setDate();\n setTime();\n loadcmbOrigin();\n loadcmbDestination();\n }",
"public BookingBean() {\n }",
"public BookManager()\n { }",
"public BookList(){\n\n }",
"public Book() {}",
"public BookInfoDO() {\n super();\n }",
"public Book() {\n }",
"public Book () {\n\t\tsuper ();\n\t\t_title = \"\";\n\t\t_text = \"\";\n\t\t_publisher = null;\n\t\t_oid = 0;\n\t\t_author = null;\n\t\t_Isbn = \"\";\n\t}",
"public BookRecord(String NameOfTheBook, String NameofWriter, int isbnNumber, double booksCost) \r\n\r\n{ \r\n\r\nthis.NameOfTheBook = NameOfTheBook; \r\n\r\nthis.NameofWriter = NameofWriter; \r\n\r\nthis.isbnNumber = isbnNumber; \r\n\r\nthis.booksCost = booksCost; \r\n\r\n}",
"private BookReader() {\r\n }",
"private BookReader() {\n\t}",
"public BookRecord() {\n super(Book.BOOK);\n }",
"public BookListings(Book[] bookList) {\r\n bookListings = new Vector <Association <Book, Vector>> ();\r\n\r\n // Load the books into the BookListings\r\n for (int i = 0; i < bookList.length; i++) {\r\n Association <Book, ListingVector>> assoc = bookListings.get(i);\r\n assoc.getKey() = bookList(i);\r\n assoc.getValue() = new Vector<Listing>();\r\n }\r\n }",
"public BookingSystemTest()\n {\n }",
"public BookState() {\n this(\"AVAILABLE\",new GeoPoint(0,0),null);\n }",
"public BookFairQues4() {\n this.Bname = \"\";\n this.price = 0.0;\n }",
"public RecSupplierListBusiness()\n {\n super();\n }",
"public ViewBookings() {\n initComponents();\n showCBooking();\n showBookingH();\n \n }",
"public BookConverter() {\r\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n \n createBookingTimeStart.localTimeProperty().set(LocalTime.of(0,0));\n createBookingTimeEnd.localTimeProperty().set(LocalTime.of(0,0));\n \n booking = new Booking();\n \n \n createBookingType.getItems().addAll(dbH.getBookingTypes(2).toArray(new String[dbH.getBookingTypes(2).size()]));\n \n createBookingMechanic.getItems().addAll(getMechanicNames(dbH.getAllMechanics())); \n \n }",
"public Book(String name)\t//declare public Book method with String name\r\n\t{\r\n\t\tthis.Name = name;\t//Name initialize and equal name by using this\r\n\t\tidcount++;\t//idcount increase 1 each process \r\n\t\tid=idcount;\t//id equal idcount\r\n\t}",
"protected Book() {\n this.title = \"Init\";\n this.author = \"Init\";\n this.bookCategories = new HashSet<>(10);\n }",
"public Library() {\n books = new Book[0];\n numBooks = 0;\n }",
"public CBookReviews(Integer _id, String _username,String _bookname,String _review,String _approved)\r\n{\t\r\n\tid=_id;\r\n\tusername=_username;\r\n\tbookname=_bookname;\r\n\treview=_review;\r\n\tapproved=_approved;\r\n}",
"private BookContract() {}",
"public Borrower(String fName, String lName, String lNumber, int numberOfBooks, \r\n String street, String town, String postcode)\r\n {\r\n firstName = fName;\r\n lastName = lName;\r\n libraryNumber = lNumber;\r\n noOfBooks = numberOfBooks; \r\n address = new Address(street, town, postcode);\r\n }",
"public Borrower(String fName, String lName, String lNumber, \r\n String street, String town, String postcode)\r\n {\r\n firstName = fName;\r\n lastName = lName;\r\n libraryNumber = lNumber;\r\n noOfBooks = 1; \r\n address = new Address(street, town, postcode);\r\n }",
"public BookRecord(Integer id, Integer availableqty, Integer pendingqty, String name, Integer medium, Integer grade, String authorname, Integer noofpages, Integer status, BigDecimal price) {\n super(Book.BOOK);\n\n set(0, id);\n set(1, availableqty);\n set(2, pendingqty);\n set(3, name);\n set(4, medium);\n set(5, grade);\n set(6, authorname);\n set(7, noofpages);\n set(8, status);\n set(9, price);\n }",
"public BookAuthor(){}",
"public AppliedHoldInfo() {\n }",
"public Library()\r\n\t{\r\n\t\titems = new ArrayList<Book>();\r\n\t}",
"protected Betaling()\r\n\t{\r\n\t\t\r\n\t}",
"public issuedBookList() {\n initComponents();\n }",
"public Payroll()\r\n\t{\r\n\t\t\r\n\t}",
"public Bookcopys(String idbook, String copyid, String status) {\r\n\t\tsuper();\r\n\t\tthis.idbook = idbook;\r\n\t\tthis.copyid = copyid;\r\n\t\tthis.status = status;\r\n\t}",
"public Library() {\n this.okToPrint = true;\n this.libraryBooks = this.readBookCollection();\n this.patron = new HashMap<String, Patron>();\n this.calendar = new Calendar();\n this.openOrNot = false;\n this.numberedListOfServing = new HashMap<Integer, Book>();\n this.searchBooks = new ArrayList<Book>();\n this.numberedListOfSearch = new HashMap<Integer, Book>();\n this.serveOrNot = false;\n this.searchOrNot = false;\n this.servingPatron = new Patron(null,null);\n }",
"private BookContract() {\n }",
"private BookContract() {\n }",
"Constructor() {\r\n\t\t \r\n\t }",
"public TableBookingInfo(java.lang.Integer id) {\r\n\t\tsuper(id);\r\n\t}",
"public BookResource() {\n }",
"public Bookstore() {\n books = new Book[MAXNUMOFBOOKS];\n totalbooks = 0;\n gross = 0.0;\n // Your code should go here\n }",
"private Bookmarks() {}",
"public bookTypes() {\r\n\t\ttitle = \"\";\r\n\t\tcopies = 0;\r\n\t\tprice = 0;\r\n\t\tauthorsNum = 0;\r\n\t\tISBN = 0;\r\n\t\tauthors = new String []{\"\",\"\",\"\",\"\"};\r\n\t\tpublisher = \"\";\r\n\t\tyear = 0;\r\n\t}",
"public ParkingSpace() {}",
"public BookResponse() {\n }",
"protected StockItem()\r\n \t{\r\n \t\tlimit = new LimitSystem(this);\r\n \t}",
"public Goodsinfo() {\n super();\n }",
"Book(int id, String judul, int tahun) {\n // nah disini mirip kayak override/overload, cuman pake nya keyword this\n // this ini merujuk ke variabel yang diatas(property) sedang yang nggak merujuk\n // ke parameter\n this.id = id;\n this.judul = judul;\n this.tahun = tahun;\n }",
"private Book createBook() {\n Book book = null;\n\n try {\n\n //determine if fiction or non-fiction\n if (radFiction.isSelected()) {\n //fiction book\n book = new Fiction(Integer.parseInt(tfBookID.getText()));\n\n } else if (radNonFiction.isSelected()) {\n //non-fiction book\n book = new NonFiction(Integer.parseInt(tfBookID.getText()));\n\n } else {\n driver.errorMessageNormal(\"Please selecte fiction or non-fiction.\");\n }\n } catch (NumberFormatException nfe) {\n driver.errorMessageNormal(\"Please enter numbers only the Borrower ID and Book ID fields.\");\n }\n return book;\n }",
"public Booking(String message, int year, int month, int day, String time, String from, String to, String display, String username, String displayName) {\n this.wholeMsg = message;\n this.echo = 0;\n this.reports = 0;\n this.calendarYear = year;\n this.calendarMonth = month;\n this.calendarDay = day;\n this.time = time;\n this.from = from;\n this.to = to;\n this.display=display;\n this.username = username;\n this.displayName = displayName;\n\n\n String[] arr1 = time.split(\":\");\n Calendar c = GregorianCalendar.getInstance();\n c.set(year, month, day, Integer.parseInt(arr1[0]), Integer.parseInt(arr1[1]));\n this.timestamp = c.getTime().getTime();\n }",
"public Book(String bookAuthor, String bookTitle, int bookPages, String getDetails)\n {\n author = bookAuthor;\n title = bookTitle;\n pages = bookPages;\n details = author,title,pages;\n Number = \"\";\n }",
"Book(String t, String a, String g){\n\t\ttitle = t;\n\t\tauthor = a;\n\t\tgenre = g;\n\t\ttags = new ArrayList <String>();\n\t}",
"public Book(String title, String isbn, String author, String description, String owner, String borrower, String status, ArrayList<String> requests) {\n this.title = title;\n this.isbn = isbn;\n this.author = author;\n this.description = description;\n this.owner = owner;\n this.borrower = borrower;\n this.status = status;\n this.requests = requests;\n }",
"public Loyalty() {}",
"public ReturnBookControl() { \r\n\t/*returnBookControl not \"ReturnBookControl\" as method starts with small letter \r\n\t- it is verb and in useCamelBack style*/ \r\n\t\tthis.libraryBook = libraryBook.getInstance();\r\n\t\t//\"library.getInstance()\" not \"library.INSTANCE()\" \r\n\t\t//as the method that returns their sole instance is \"getInstanse\" \r\n\t\t//it's verb in useCamelBack style\r\n\t\tstateCon = CONTROL_STATE.INITIALISED; //updated by moderator Dushan- camelBack style -state to stateCon\r\n\t}",
"private BookFilters()\n {\n }",
"public Pitonyak_09_02() {\r\n }",
"public ReturnBookControl() {\r\n\t\tthis.library = library.getInstance(); //Variable name should start with lowercase and be in camelBack and Changed method name to verb starting with lowercase and in camelBack\r\n\t\tstate = ControlState.INITIALISED; //Variable name should start with lowercase\r\n\t}",
"public VoucherPayment() {\r\n }",
"public Book(Integer id) {\n\t\tthis.id = id;\n\t}",
"public bookDetails() {\n initComponents();\n }",
"public Book(int book_id, String title, String author, int year, int edition, String publisher, String isbn,\n String cover, String condition, int price, String notes) {\n\tsuper();\n\tthis.book_id = book_id;\n\tthis.title = title;\n\tthis.author = author;\n\tthis.year = year;\n\tthis.edition = edition;\n\tthis.publisher = publisher;\n\tthis.isbn = isbn;\n\tthis.cover = cover;\n\tthis.condition = condition;\n\tthis.price = price;\n\tthis.notes = notes;\n}",
"public BookView() {\n initComponents();\n setLocationRelativeTo(null);\n setTitle(\"Livaria Paris - Editora\");\n dataBase = new DataBase();\n dataBase.insertBook();\n fillTable(dataBase.getBooks());\n }",
"private BookMasterContract() {\n }",
"public BillResource() {\n super();\n }",
"public AddressBookMenu (AddressBook addressBook) {\n\t\tthis.addressBook = addressBook;\n\t}",
"public void makeBooking (Object booking);",
"protected PrintBill() \r\n\t{/* nothing needed, but this prevents a public no-arg constructor from being created automatically */}",
"public Library(ArrayList<Book> collection){\n this.okToPrint = false;\n this.libraryBooks = collection;\n this.patron = new HashMap<String, Patron>();\n this.calendar = new Calendar();\n this.openOrNot = false;\n this.numberedListOfServing = new HashMap<Integer, Book>();\n this.searchBooks = new ArrayList<Book>();\n this.numberedListOfSearch = new HashMap<Integer, Book>();\n this.serveOrNot = false;\n this.searchOrNot = false;\n this.servingPatron = new Patron(null,null);\n }",
"public AccountingSystem(){\n accSystem = new HashMap<Integer, Transaction>();\n allTransactionsID = new ArrayList<Integer>();\n highestSalesMonth = new HashMap<Integer, Integer>();\n transactionByTime = new LinkedHashMap<Integer, LinkedList<Transaction>>();\n totalSalesCount = 0;\n totalReturnCount = 0;\n totalSaleProfit = 0.0;\n currentBuyID = -1;\n }",
"public PhoneBook(){\n\n }",
"public void insertBooking(){\n \n Validator v = new Validator();\n if (createBookingType.getValue() == null)\n {\n \n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Booking Type!\")\n .showInformation();\n \n return;\n \n }\n if (createBookingType.getValue().toString().equals(\"Repair\"))\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Go to Diagnosis and Repair tab for creating Repair Bookings!\")\n .showInformation();\n \n \n if(v.checkBookingDate(parseToDate(createBookingDate.getValue(),createBookingTimeStart.localTimeProperty().getValue()),\n parseToDate(createBookingDate.getValue(),createBookingTimeEnd.localTimeProperty().getValue()))\n && customerSet)\n \n { \n \n int mID = GLOBAL.getMechanicID();\n \n try {\n mID = Integer.parseInt(createBookingMechanic.getSelectionModel().getSelectedItem().toString().substring(0,1));\n } catch (Exception ex) {\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Mechanic!\")\n .showInformation();\n return;\n }\n \n if (mID != GLOBAL.getMechanicID())\n if (!getAuth(mID)) return;\n \n createBookingClass();\n dbH.insertBooking(booking);\n booking.setID(dbH.getLastBookingID());\n appointment = createAppointment(booking);\n closeWindow();\n \n }\n else\n {\n String extra = \"\";\n if (!customerSet) extra = \" Customer and/or Vehicle is not set!\";\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Errors with booking:\"+v.getError()+extra)\n .showInformation();\n }\n \n }",
"public Swim() {\r\n this.swimStatus = new Status();\r\n this.bookings = new ArrayList<Booking>();\r\n }",
"public AvailableBookAdapter(Context context, int resource, List objects) {\n super(context, resource, objects);\n resource_id = resource;\n }",
"public Book(String bookAuthor, String bookTitle, int bookPages, boolean bookCourse)\n {\n author = bookAuthor;\n title = bookTitle;\n pages = bookPages;\n refNumber = \"\";\n courseText = bookCourse;\n }",
"public AirAndPollen() {\n\n\t}",
"public BookInfoDO(Integer id, String isbn, Integer ownerId, Integer borrowerId, Integer bookStatus, String author, String bookType, String publishers, String pic, String brief, String bookComment, Integer deposit, Integer cost, Date gmtModified, Date gmtCreate, String bookTitile) {\n this.id = id;\n this.isbn = isbn;\n this.ownerId = ownerId;\n this.borrowerId = borrowerId;\n this.bookStatus = bookStatus;\n this.author = author;\n this.bookType = bookType;\n this.publishers = publishers;\n this.pic = pic;\n this.brief = brief;\n this.bookComment = bookComment;\n this.deposit = deposit;\n this.cost = cost;\n this.gmtModified = gmtModified;\n this.gmtCreate = gmtCreate;\n this.bookTitile = bookTitile;\n }",
"@Override\r\n\t\t\tpublic Book doInTransaction(TransactionStatus status) {\n\t\t\t\tBook book=new Book();\r\n\t\t\t\tbook.setISBN(ISBN);\r\n\t\t\t\tbookDAO.addBook(book);\r\n\t\t\t\treturn book;\r\n\t\t\t}",
"public QBP_Q21() {\n super();\n }",
"public Book() {\n\t\ttitle = null;\n\t\tauthor = null;\n\t}",
"@Autowired\n public AvailabilityServiceImpl(final BookingService bookingService) {\n this.bookingService = bookingService;\n }",
"public _355() {\n\n }",
"public TextBook() {\n\t\tsuper();\n\t\ttype = \"TEXTBOOK\";\n\t}",
"public void addBooking(Booking b)\r\n {\r\n bookings.add(b);\r\n }",
"public Booking makeBooking(Customer customer, Airline flight, int baggage, String type, Date date);",
"public BookInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"@Override\n\tpublic void addBook() {\n\t\t\n\t}",
"public Supermarket()\n {\n }",
"public GradeBook (String name){ //Constructor\n\t\tcourseName=name;\n//\t\tstudents = studentNum;\n\t}",
"public Seller() {\n super();\n }",
"public void addBooking(Bookings b) {\n IController<Bookings> ic = new Controller<>();\n\n // Check whether the booking conflicts with another booking.\n for (Bookings booking : ic.readAll(Bookings.class)) {\n if (b.conflictsWith(booking)) {\n throw new IllegalArgumentException(\"That booking conflicts with another booking.\");\n }\n }\n\n Modules relatedModule = b.getModule();\n\n // Check whether the room is available at the given time.\n if (!b.getRooms().isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"That room is unavailable at this time.\");\n }\n // Check whether the students are available at that time.\n for (Students student : relatedModule.getStudents()) {\n if (!student.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A student is unavailable at this time.\");\n }\n }\n // Check whether the staff members are available at that time.\n for (Staff staff : relatedModule.getStaff()) {\n if (!staff.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A staff member is unavailable at this time.\");\n }\n }\n\n // Put the booking into the database.\n ic.create(b);\n System.out.println(b.confirmation() + \"\\n\");\n }",
"Library(List<Book> books) {\n\n // Referring to same book as\n // this keyword refers to same instance itself\n this.books = books;\n }",
"public OrderOffered() {\r\n }"
]
| [
"0.79167664",
"0.78513503",
"0.75091195",
"0.72928536",
"0.7083721",
"0.698396",
"0.698",
"0.6977223",
"0.6925076",
"0.68750274",
"0.6820468",
"0.6817115",
"0.68049335",
"0.67116576",
"0.6691687",
"0.6689769",
"0.6666332",
"0.661605",
"0.6612177",
"0.6586049",
"0.6575929",
"0.65658396",
"0.6553461",
"0.6540846",
"0.6522064",
"0.6449124",
"0.6446841",
"0.6420855",
"0.63842857",
"0.6379965",
"0.6378059",
"0.6329724",
"0.6320347",
"0.6307844",
"0.6300809",
"0.62889624",
"0.62645394",
"0.62632376",
"0.6254951",
"0.625479",
"0.62538147",
"0.6240335",
"0.6231671",
"0.6231671",
"0.6224059",
"0.6204077",
"0.61764365",
"0.6172551",
"0.6170786",
"0.6155523",
"0.61551726",
"0.6135802",
"0.6133949",
"0.6129547",
"0.6121975",
"0.6120186",
"0.6118812",
"0.6117288",
"0.61108565",
"0.6109185",
"0.60745263",
"0.60727894",
"0.60706705",
"0.6063673",
"0.6062721",
"0.60562605",
"0.6051742",
"0.60482645",
"0.6043115",
"0.6029173",
"0.6027132",
"0.60199416",
"0.60102344",
"0.5993049",
"0.5990633",
"0.5985939",
"0.5979973",
"0.5976104",
"0.5973519",
"0.59698653",
"0.5961791",
"0.59584767",
"0.59568065",
"0.5954399",
"0.5951247",
"0.5950516",
"0.5945956",
"0.59415036",
"0.59388906",
"0.5919923",
"0.59061134",
"0.5906038",
"0.58931565",
"0.58900297",
"0.5885195",
"0.5882949",
"0.5877655",
"0.5865938",
"0.5864983",
"0.5850715"
]
| 0.6081033 | 60 |
this a constructor for playground registration | public Player(Playground_Registration pgr) {
this.pgr = pgr;
pgr.setPName("barca");
System.out.println(pgr.getPName());
pgr.setLocation("naser city");
System.out.println(pgr.getLocation());
pgr.setSize(5);
System.out.println(pgr.getSize());
pgr.setAvailable_Hour(3);
System.out.println(pgr.getAvailable_Hour());
pgr.setPrice_Of_hour(120);
System.out.println(pgr.getPrice_Of_hour());
pgr.setPlayground_Status("available");
System.out.println(pgr.getPlayground_Status());
pgr.setCancelation_Perioud("");
System.out.println(pgr.getCancelation_Perioud());
System.out.println("i want to book this play ground");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Playground() {\n }",
"public Main() {\r\n\t}",
"public Main() {\n \n \n }",
"private Main() {\n\n super();\n }",
"public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}",
"private Main ()\n {\n super ();\n }",
"private Instantiation(){}",
"public Main() {\r\n }",
"public Main() {\r\n }",
"Petunia() {\r\n\t\t}",
"Playground getPlayground();",
"public OrchardGame() {\n\t\t\n\t}",
"public Main() {\n\t\tsuper();\n\t}",
"public Main() {\n }",
"public Simulator(){}",
"public Main() {\n }",
"public Main() {\n }",
"public Hacker() {\r\n \r\n }",
"Reproducible newInstance();",
"public Main() {}",
"Constructor() {\r\n\t\t \r\n\t }",
"public Demo() {\n\t\t\n\t}",
"public LiveConnectDemo() {\n }",
"private Main() {\n }",
"public TestPrelab2()\n {\n }",
"public SniperMonkey(Context ctx) {\n super(ctx);\n this.ctx = ctx;\n }",
"public Vending_MachineTest()\n {\n // initialise instance variables\n \n \n }",
"public Main() {\n // Required empty public constructor\n }",
"public ProgramWilmaa()\n\t{\n\t}",
"public FeatureSynthesisMain() {\n super();\n }",
"public static void main(String[] args) {\n\t\tthisconstructor rv = new thisconstructor();\n\t\n\t\n\t}",
"public Greeter() {\n\n\t}",
"public TestPawn(){\n }",
"public GUITest() {\n }",
"public StartUp(){\r\n \r\n }",
"public Game() \n {\n parser = new Parser();\n }",
"public CyanSus() {\n\n }",
"public Program7()\n { \n _tc = new TravelingCreature( 200, 200 );\n }",
"public Greetings() {\n }",
"public AcceptanceTestRun() {\n }",
"public TestGPSpingPhase1()\n {\n }",
"public FlightTest(){\n }",
"private Main() {}",
"public void init(){}",
"public Chick() {\n\t}",
"public void init() {}",
"public void init() {}",
"public tester() {\r\n }",
"public ClassTester()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(new NonScrollingBackground(\"Stage - 0.jpg\"),300,131);\n addObject(playerMage,35,170);\n addObject(new AbilityDisplayer(playerMage),125,268);\n }",
"public Python() {\n\t\t// TODO Auto-generated constructor stub\n\t}",
"private Game() {}",
"private JadTool() { }",
"public Constructor(){\n\t\t\n\t}",
"private ExampleSubsystem()\n {\n\n }",
"public LearnConstrouctor(){\n System.out.println(\" hello\");\n }",
"public ExamMB() {\n }",
"public Game() {\n parser = new Parser();\n }",
"public Game() \n {\n Logger.setLogger(null);\n createInstances();\n parser = new Parser();\n player = new Player();\n userInputs = new ArrayList<String>();\n }",
"public Pitonyak_09_02() {\r\n }",
"public MonHoc() {\n }",
"private TMCourse() {\n\t}",
"public Tbdtokhaihq3() {\n super();\n }",
"public Ruby() {}",
"public void init() {\n \n }",
"public Curso() {\r\n }",
"private Rekenhulp()\n\t{\n\t}",
"public Demo3() {}",
"public MiniGame() {\n\n\t}",
"public Game()//Method was given\n {\n parser = new Parser();\n player = new Player();\n }",
"public simulation() {\n\n }",
"private TetrisMain() {\r\n //ensure uninstantiability\r\n }",
"public p7p2() {\n }",
"private Inspect() {\n }",
"public Pasien() {\r\n }",
"private ProtomakEngineTestHelper() {\r\n\t}",
"public SchemeTest (String name)\n {\n super (name);\n /*\n * This constructor should not be modified. Any initialization code\n * should be placed in the setUp() method instead.\n */\n }",
"private void init() {\n }",
"private CommandLine() {\n\t}",
"public FirstRun( ) {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t}",
"public Monster() {\n\t\t\n\t}",
"public Demo()\n {\n machine = new Machine();\n }",
"private Engine() {\n\n }",
"public BoardFactory(PacManSprites spriteStore) {Collect.Hit(\"BoardFactory.java\",\"BoardFactory(PacManSprites spriteStore)\");this.sprites = spriteStore; Collect.Hit(\"BoardFactory.java\",\"BoardFactory(PacManSprites spriteStore)\", \"689\");}",
"public Genret() {\r\n }",
"private Globals(){}",
"private Gng() {\n }",
"public Sandwich()\n\t{super();\n \n\t\t\n\t}",
"public Tbdcongvan36() {\n super();\n }",
"public Magazzino() {\r\n }",
"public HowToPlay()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(763, 578, 1); \n //HowToPlay play = new HowToPlay();\n }",
"private void init() {\n\n\n\n }",
"public ArbolSplay() {\n super();\n }",
"public void init(){\n \n }",
"public void init() { }",
"public void init() { }",
"public GameOfLifeTest()\n {\n }",
"public BeanGame () {\n\t}",
"private UsineJoueur() {}",
"public PlayableGame() {\r\n\r\n }",
"public TestFrames() {\n\t\tclasslogger.info(\"Called constructor for TestFrames...\");\n\t}"
]
| [
"0.79339665",
"0.6869077",
"0.67969364",
"0.67504615",
"0.6702774",
"0.6678692",
"0.6673126",
"0.66722393",
"0.66722393",
"0.66570926",
"0.6640858",
"0.6640108",
"0.6625349",
"0.6569734",
"0.6554862",
"0.65401006",
"0.65401006",
"0.6510559",
"0.65096736",
"0.6506879",
"0.6496595",
"0.6493229",
"0.6407566",
"0.6397692",
"0.63907593",
"0.6377759",
"0.63685906",
"0.6364966",
"0.6347274",
"0.6336004",
"0.63177043",
"0.63140327",
"0.6306409",
"0.63010854",
"0.6300495",
"0.6282561",
"0.62809604",
"0.6279551",
"0.6275956",
"0.6269519",
"0.62684846",
"0.6268346",
"0.6266715",
"0.62651455",
"0.6264994",
"0.6259115",
"0.6259115",
"0.62571365",
"0.62548524",
"0.62437767",
"0.62396187",
"0.6237164",
"0.6236188",
"0.6231316",
"0.62295336",
"0.6224299",
"0.6223979",
"0.6219743",
"0.62117505",
"0.6209621",
"0.6206214",
"0.6201665",
"0.6200255",
"0.61992276",
"0.6198262",
"0.61975014",
"0.61971813",
"0.61916906",
"0.61882776",
"0.6181526",
"0.61700225",
"0.6164006",
"0.6161527",
"0.61612463",
"0.6158972",
"0.61586106",
"0.6158598",
"0.61545944",
"0.6151123",
"0.6148507",
"0.61465466",
"0.61462075",
"0.6145169",
"0.61443883",
"0.61414224",
"0.6139598",
"0.61380064",
"0.61376333",
"0.61327755",
"0.6132668",
"0.61303765",
"0.6126314",
"0.6118741",
"0.6112462",
"0.6112462",
"0.61061764",
"0.6105655",
"0.6103983",
"0.610363",
"0.61033493"
]
| 0.66073054 | 13 |
this is a parameterize constructor | public Player(String name, String email, String address, long phone, int password, Playground_Registration pgr) {
this.name = name;
this.email = email;
this.address = address;
this.phone = phone;
this.password = password;
this.pgr = pgr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Constructor(){\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"public Parameters() {\n\t}",
"public BaseParameters(){\r\n\t}",
"private Params()\n {\n }",
"protected abstract void construct();",
"ConstuctorOverloading(){\n\t\tSystem.out.println(\"I am non=argument constructor\");\n\t}",
"public ParameterizedInstantiateFactory() {\r\n super();\r\n }",
"ConstuctorOverloading(int num){\n\t\tSystem.out.println(\"I am contructor with 1 parameter\");\n\t}",
"public ListParameter()\r\n\t{\r\n\t}",
"public Identity()\n {\n super( Fields.ARGS );\n }",
"public CacheFIFO(int paramInt)\r\n/* 11: */ {\r\n/* 12: 84 */ super(paramInt);\r\n/* 13: */ }",
"public LightParameter()\r\n\t{\r\n\t}",
"Reproducible newInstance();",
"public tn(String paramString, ho paramho)\r\n/* 12: */ {\r\n/* 13:11 */ super(paramString, paramho);\r\n/* 14: */ }",
"public PowerMethodParameter() {\r\n\t\t\r\n\t\t//constructor fara parametru, utilizat in cazul in care utilizatorul nu introduce\r\n\t\t//fisierul sursa si nici fiesierul destinatie ca parametrii in linia de comanda\r\n\t\tSystem.out.println(\"****The constructor without parameters PowerMethodParameter has been called****\");\r\n\t\tSystem.out.println(\"You did not specify the input file and the output file\");\r\n\t\t\r\n\t}",
"private void __sep__Constructors__() {}",
"defaultConstructor(){}",
"DefaultConstructor(int a){}",
"public Generic(){\n\t\tthis(null);\n\t}",
"private InstantiateTransformer(Class[] paramTypes, Object[] args) {\n super();\n if (((paramTypes == null) && (args != null))\n || ((paramTypes != null) && (args == null))\n || ((paramTypes != null) && (args != null) && (paramTypes.length != args.length))) {\n throw new IllegalArgumentException(\"InstantiateTransformer: The parameter types must match the arguments\");\n }\n if ((paramTypes == null) && (args == null)) {\n iParamTypes = null;\n iArgs = null;\n } else {\n iParamTypes = (Class[]) paramTypes.clone();\n iArgs = (Object[]) args.clone();\n }\n }",
"private Instantiation(){}",
"public MLetter(Parameters parametersObj) {\r\n\t\tsuper(parametersObj);\r\n\t}",
"public Card() { this(12, 3); }",
"protected ParameterList(){\n //title = t;\n //cellWorld = cw;\n }",
"private Parameter(int key, String name, String value){\n this.key = key;\n this.name = name;\n this.value = value;\n }",
"public ctq(File paramFile, String paramString, oa paramoa, ckh paramckh)\r\n/* 22: */ {\r\n/* 23: 33 */ super(paramoa);\r\n/* 24: 34 */ this.i = paramFile;\r\n/* 25: 35 */ this.j = paramString;\r\n/* 26: 36 */ this.k = paramckh;\r\n/* 27: */ }",
"protected ForConstructor(Constructor<?> constructor) {\n this.constructor = constructor;\n }",
"public ModuleParams()\n\t{\n\t}",
"private LocalParameters() {\n\n\t}",
"public Pasien() {\r\n }",
"public Parameterized() {\n setParameters(null);\n }",
"public aed(World paramaqu)\r\n/* 9: */ {\r\n/* 10: 24 */ super(paramaqu);\r\n/* 11: */ }",
"public Complex(){\r\n\t this(0,0);\r\n\t}",
"public UserParameter() {\n }",
"public bwq(String paramString1, String paramString2)\r\n/* 10: */ {\r\n/* 11: 9 */ this.a = paramString1;\r\n/* 12:10 */ this.f = paramString2;\r\n/* 13: */ }",
"public Clade() {}",
"void DefaultConstructor(){}",
"public TParametrosVOImpl() {\r\n }",
"@Test\n\tpublic void testParameterizedConstructor() {\n\t\tQuestionsEntity questions=new QuestionsEntity(1,\"SOX\",\"Have all changes has been approved\",\"Yes\");\n\t assertEquals(\"Yes\",questions.getResponse());\n\t}",
"public PotionEffect(int paramInt1, int paramInt2, int paramInt3)\r\n/* 21: */ {\r\n/* 22: 32 */ this(paramInt1, paramInt2, paramInt3, false, true);\r\n/* 23: */ }",
"Constructor(int i,String n ,int x){ //taking three parameters which shows that it is constructor overloaded\r\n\t\t id = i; \r\n\t\t name = n; \r\n\t\t marks =x; \r\n\t\t }",
"public ParamJson() {\n\t\n\t}",
"public Video( int arg1, int arg2 ) { \n\t\tsuper( );\n\t}",
"public Object[] getConstructorArgs ();",
"public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}",
"public Video( int arg1 ) { \n\t\tsuper( );\n\t}",
"private DBParameter() {\n }",
"public Complex(int r, int i){\r\n\t this((double) r, (double) i);\r\n\t\t//chain the input from this constructor to the next constructor,\r\n\t\t// which has a (double, double) signature\r\n\t}",
"public ahr(aqu paramaqu)\r\n/* 20: */ {\r\n/* 21: 34 */ super(paramaqu);\r\n/* 22: 35 */ a(0.25F, 0.25F);\r\n/* 23: */ }",
"public Parameter(Parameter template){\n\t\tthis(template.getName(),template.isRequired(),\n\t\t\t template.getType(),(T) template.getDefaultValue());\n\t}",
"Parameter createParameter();",
"public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }",
"private Constructor getConstructor() throws Exception {\r\n return type.getConstructor(Contact.class, label, Format.class);\r\n }",
"public PotionEffect(int paramInt1, int paramInt2)\r\n/* 16: */ {\r\n/* 17: 28 */ this(paramInt1, paramInt2, 0);\r\n/* 18: */ }",
"public MockClass(String arg) {\n\t}",
"Constructor<T> newConstructor();",
"public ModuleParams() {\n }",
"TDrawingConstructor (ArrayList interpretation){\r\n fInterpretation=interpretation;\r\n}",
"public c(Object obj) {\n super(1);\n this.a = obj;\n }",
"public Pitonyak_09_02() {\r\n }",
"public bsm(PlayerStat paramtq)\r\n/* 7: */ {\r\n/* 8: 9 */ super(paramtq.e);\r\n/* 9:10 */ this.j = paramtq;\r\n/* 10: */ }",
"protected void readConstructorParams( DataInput in ) throws\n\t\t\t\t\t\t\tIOException {\n }",
"public static void copyConstructor(){\n\t}",
"public Account() {\n this(0, 0.0, \"Unknown name\"); // Invole the 2-param constructor\n }",
"public Sock( /*int n , int ar[]*/)\n{\n\t//this.n=n;\n\t//this.ar=ar;\n}",
"private Point(int param, double value) {\r\n this(param, value, false);\r\n }",
"public Contructor(int year, String name) {\n // constructor name must match class name and cannot have return type\n // all classes have constructor by default\n // f you do not create a class constructor yourself, Java creates one for you.\n // However, then you are not able to set initial values for object attributes.\n // constructor can also take parameters\n batchYear = year;\n studentName = name;\n }",
"public Person(String inName)\n {\n name = inName;\n }",
"public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }",
"public Car(){\n\t\t\n\t}",
"public ahb(ahd paramahd)\r\n/* 12: */ {\r\n/* 13: 36 */ this.d = paramahd;\r\n/* 14: */ }",
"public AntrianPasien() {\r\n\r\n }",
"private GrupoCuenta(String nombre, int operacion)\r\n/* 11: */ {\r\n/* 12:31 */ this.nombre = nombre;\r\n/* 13:32 */ this.operacion = operacion;\r\n/* 14: */ }",
"public HandicapParameterSet() {\n }",
"public void init(Object[] parameters) {\n\n\t}",
"public Person(String vorname, String nachname) {\n\n\t}",
"protected AbstractSpliterator(long param1Long, int param1Int) {\n/* 1274 */ this.est = param1Long;\n/* 1275 */ this.characteristics = ((param1Int & 0x40) != 0) ? (param1Int | 0x4000) : param1Int;\n/* */ }",
"public ListElement()\n\t{\n\t\tthis(null, null, null); //invokes constructor with 3 arguments\n\t}",
"private FunctionParametersValidator() {}",
"public prueba()\r\n {\r\n }",
"public CyanSus() {\n\n }",
"public PSRelation()\n {\n }",
"MyArg(int value){\n this.value = value;\n }",
"private Converter()\n\t{\n\t\tsuper();\n\t}",
"public MyGeneric(A a, B b) { // TODO: check parameter type\n\t\tthis.a = a;\n\t\tthis.b = b;\n\t}",
"private void translateConstructor( ) {\n \n Set<MethodInfoFlags> flags = EnumSet.noneOf( MethodInfoFlags.class );\n \n AVM2Method method = new AVM2Method( null, flags );\n avm2Class.avm2Class.constructor = method;\n \n AVM2MethodBody body = method.methodBody;\n body.maxStack = 1;\n body.maxRegisters = 1;\n body.maxScope = 11;\n body.scopeDepth = 10;\n \n InstructionList il = body.instructions;\n \n// il.append( OP_getlocal0 );\n// il.append( OP_pushscope );\n il.append( OP_getlocal0 );\n il.append( OP_constructsuper, 0 );\n \n// il.append( OP_findpropstrict, new AVM2QName( PUBLIC_NAMESPACE, \"drawTest\" ));\n il.append( OP_getlocal0 );\n \n il.append( OP_callpropvoid, new AVM2QName( EmptyPackage.namespace, \"drawTest\" ), 0 );\n\n il.append( OP_returnvoid );\n }",
"public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }",
"public Bicycle() {\n // You can also call another constructor:\n // this(1, 50, 5, \"Bontrager\");\n System.out.println(\"Bicycle.Bicycle- no arguments\");\n gear = 1;\n cadence = 50;\n speed = 5;\n name = \"Bontrager\";\n }",
"public SuperClass(int x)\r\n {\r\n _x = x;\r\n }",
"public MParameterSystem() {\n\t\tsuper();\n\t}",
"public Vector() {\n construct();\n }",
"public Achterbahn() {\n }",
"public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }",
"public LiveRef(int paramInt) {\n/* 74 */ this(new ObjID(), paramInt);\n/* */ }",
"public void Constructor(String name, Integer age) {\r\n this.name = name;\r\n this.age = age;\r\n }",
"public CustomEntitiesTaskParameters() {}",
"public IntPar() { }",
"public AI(String n) {//constructor for super class\n super(n);\n }",
"protected void writeConstructorParams( DataOutput out ) throws\n\t\t\t\t\t\t\tIOException {\n }",
"public Student(Integer age) {\n\n this.age = age;\n }"
]
| [
"0.75515914",
"0.7221303",
"0.7087428",
"0.69989914",
"0.69745564",
"0.695943",
"0.6927338",
"0.6922157",
"0.6819393",
"0.6731694",
"0.6689422",
"0.6657268",
"0.6635392",
"0.66265464",
"0.6619454",
"0.66190964",
"0.66130376",
"0.66027164",
"0.65809923",
"0.6548882",
"0.65421057",
"0.65374285",
"0.65186787",
"0.65134215",
"0.65020293",
"0.6480482",
"0.6443199",
"0.643341",
"0.642419",
"0.6406121",
"0.63751525",
"0.6372837",
"0.6362024",
"0.6360135",
"0.6352644",
"0.63480926",
"0.632775",
"0.632275",
"0.6322216",
"0.63078266",
"0.63046575",
"0.62838984",
"0.628375",
"0.6272495",
"0.6266855",
"0.6237787",
"0.6232776",
"0.6202222",
"0.6199267",
"0.61889094",
"0.61764365",
"0.6169043",
"0.61665297",
"0.6166086",
"0.61638504",
"0.6155134",
"0.6149802",
"0.61335605",
"0.6131596",
"0.6131488",
"0.6130457",
"0.61269844",
"0.6124574",
"0.6119175",
"0.6112887",
"0.6112224",
"0.61093944",
"0.610922",
"0.6101345",
"0.61004764",
"0.6088589",
"0.608574",
"0.60840386",
"0.6081918",
"0.60810363",
"0.60711795",
"0.60677075",
"0.60652274",
"0.6049938",
"0.6049151",
"0.60485023",
"0.60440725",
"0.6043751",
"0.6034889",
"0.6034071",
"0.6033902",
"0.60331154",
"0.60219896",
"0.6019085",
"0.60151213",
"0.60134435",
"0.6012551",
"0.6004898",
"0.59969425",
"0.59962964",
"0.599422",
"0.5993692",
"0.5988684",
"0.59857756",
"0.59797025",
"0.59757406"
]
| 0.0 | -1 |
this function to set name | public void setName(String name) {
this.name = name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setName(String name_);",
"private void setName(java.lang.String name) {\n System.out.println(\"setting name \"+name);\n this.name = name;\n }",
"public void setName(String n){ name=n; }",
"public final void setName(String name) {_name = name;}",
"@Override\n public void setName(String name) {\n \n }",
"@Override\n\tpublic void setName(String name) {\n\t\t\n\t}",
"@Override\r\n public void setName(String name) {\n }",
"private void setName() {\n\t\t//MAKE SURE NOT TO GET ACCIDENTAL RECURSION HERE\n\t\t//DO NOT JUST MAKE A NEW TRIAD AND COMPARE TO CURRENT TRIAD\n\t\t//UNLESS ??? MAYBEDON\"T PUT SET NAME IN THE CONSTRUCTOR?\n\t\t//SIMILAR PROBLEM TO SETINVERSION\n\t\t\n\t\t//major, minor, diminished, augmented\n\t\t//this.name = name;\n\t}",
"protected void setName(String name) {\r\n this.name = name;\r\n }",
"void setName(java.lang.String name);",
"void setName(java.lang.String name);",
"void setName(java.lang.String name);",
"public void setName (String n){\n\t\tname = n;\n\t}",
"public void setName(String name) { this.name = name; }",
"public void setName(String name) { this.name = name; }",
"public void setName(String name) { this.name = name; }",
"public void setName(String name) { this.name = name; }",
"void setName(String name);",
"void setName(String name);",
"void setName(String name);",
"void setName(String name);",
"void setName(String name);",
"void setName(String name);",
"@Override\n public void setName(String name) {\n\n }",
"public void setName(String name) \n {\n this.name = name;\n }",
"public void setName (String Name);",
"public void setName (String Name);",
"public void setName (String Name);",
"public void setName(String name) {\n fName= name;\n }",
"public void setName(String inName)\n {\n name = inName;\n }",
"public void setName(String inName)\n {\n\tname = inName;\n }",
"public void setName(String name);",
"public void setName(String name);",
"public void setName(String name);",
"public void setName(String name);",
"public void setName(String name);",
"public void setName(String name);",
"public void setName(String name);",
"public void setName(String name);",
"public void setName(String name);",
"public void setName(String name);",
"public void setName(String name);",
"public void setName(String name){this.name=name;}",
"public void setName(String name){\n \t\tthis.name = name;\n \t}",
"public void setName(String name){\r\n this.name = name;\r\n }",
"public void setName(String name){\r\n this.name = name;\r\n }",
"public void setName(String name){\r\n this.name = name;\r\n }",
"public static void setName(String n){\n\t\tname = n;\n\t}",
"public void setName(String name){this.name = name;}",
"@Override\n\tpublic void setName(String arg0) {\n\n\t}",
"public void setName(String n) {\r\n name = n;\r\n }",
"public void setName (String n) {\n name = n;\n }",
"public void setName(String name){\n this.name = name;\n }",
"public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}",
"void setName(String name)\n\t{\n\t\t\tthis.name = name;\n\t}",
"public void setName(String name) {\n this.name = name;\n }",
"void setName(String strName);",
"public void setName(String name) {\n \tthis.name = name;\n }",
"public void setName(String name) {\n \tthis.name = name;\n }",
"public void setName(String new_name){\n this.name=new_name;\n }",
"public void setName(String name) {\t\t\r\n\t\tthis.name = name;\t\t\r\n\t}",
"public void setName(String newname){\n name = newname; \n }",
"protected void setName(String name) {\n this._name = name;\n }",
"void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name)\r\n\t{\t\t\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(String name) {\r\n \t\tthis.name = name;\r\n \t}",
"public void setName(java.lang.String aName);",
"public void setName(String name){\n this.name = name;\n }",
"public void setName(String name){\n this.name = name;\n }",
"public void setName(String name){\n this.name = name;\n }",
"public void setName(String name){\n this.name = name;\n }",
"public void setName(String name){\n this.name = name;\n }",
"public void setName(String name){\n this.name = name;\n }",
"public void setName(String name){\n this.name = name;\n }",
"public void setName(String name)\n {\n _name = name;\n }",
"public void setName(final String name);",
"public void setName(String name){\n\t\tthis.name = name;\n\t}",
"public void setName(String name){\n\t\tthis.name = name;\n\t}",
"public void setName(String name){\n\t\tthis.name = name;\n\t}",
"public void setName(String n);",
"public void setName(String name)\n \t{\n \t\tthis.name = name;\n \t}",
"public void setName(String name)\r\n {\r\n\tthis.name = name;\r\n }",
"public void setName(String name)\n {\n this.name=name;\n }",
"private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }",
"private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }",
"private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }",
"protected void setName(String name) {\n this.name = name;\n }",
"public void setName(String n) {\n this.name = n;\n }",
"public void setName(String arg0) {\n\t\t\n\t}",
"public void setName(String name) {\r\n\t\tthis.name=name;\r\n\t}",
"public void setName(String nameIn) {\n name = nameIn;\n }",
"public void setName(String name)\r\n {\r\n this.name = name;\r\n }",
"public void setName(String name)\r\n {\r\n this.name = name;\r\n }",
"public void setName(String name)\r\n {\r\n this.name = name;\r\n }",
"public void setName(String name)\r\n {\r\n this.name = name;\r\n }",
"public void setName(String name)\n {\n\tthis.name = name;\n }",
"public void setName(String newname)\n {\n name = newname;\n \n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }"
]
| [
"0.84106666",
"0.8302274",
"0.8295199",
"0.82878006",
"0.82693666",
"0.82108825",
"0.81899023",
"0.81776005",
"0.8141406",
"0.8123855",
"0.8123855",
"0.8123855",
"0.8120281",
"0.81196976",
"0.81196976",
"0.81196976",
"0.81196976",
"0.81075686",
"0.81075686",
"0.81075686",
"0.81075686",
"0.81075686",
"0.81075686",
"0.8099807",
"0.80864686",
"0.8086383",
"0.8086383",
"0.8086383",
"0.80841094",
"0.8071996",
"0.8071926",
"0.8071174",
"0.8071174",
"0.8071174",
"0.8071174",
"0.8071174",
"0.8071174",
"0.8071174",
"0.8071174",
"0.8071174",
"0.8071174",
"0.8071174",
"0.8070824",
"0.8059403",
"0.80551624",
"0.80551624",
"0.80551624",
"0.80550045",
"0.8054458",
"0.8043518",
"0.8041644",
"0.8038465",
"0.8034924",
"0.80104303",
"0.80104303",
"0.80104303",
"0.8006467",
"0.79992586",
"0.79837227",
"0.7983713",
"0.7983713",
"0.7982136",
"0.797281",
"0.7968041",
"0.79619145",
"0.79594177",
"0.79521596",
"0.79501235",
"0.79451257",
"0.7943329",
"0.7943329",
"0.7943329",
"0.7943329",
"0.7943329",
"0.7943329",
"0.7943329",
"0.7942204",
"0.7939696",
"0.7937627",
"0.7937627",
"0.7937627",
"0.793132",
"0.7920438",
"0.7918262",
"0.79116356",
"0.7909975",
"0.7909975",
"0.7909975",
"0.7905529",
"0.7903818",
"0.7902709",
"0.78991187",
"0.7895663",
"0.78943914",
"0.78943914",
"0.78943914",
"0.78943914",
"0.78913146",
"0.7890738",
"0.78849906",
"0.788289"
]
| 0.0 | -1 |
this function to set email | public void setEmail(String email) {
this.email = email;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setEmail(String email)\r\n/* 36: */ {\r\n/* 37:50 */ this.email = email;\r\n/* 38: */ }",
"@Override\n public void setEmail(String email) {\n\n }",
"void setEmail(String email);",
"void setEmail(String email);",
"public void setEmail(final String e)\n {\n this.email = e;\n }",
"public void setEmail(Email email) { this.email = email; }",
"public void setEmail(final String value)\n\t{\n\t\tsetEmail( getSession().getSessionContext(), value );\n\t}",
"public void setEmail(final String value)\n\t{\n\t\tsetEmail( getSession().getSessionContext(), value );\n\t}",
"public void setEmail(String email);",
"public void setEmail(String aEmail) {\n email = aEmail;\n }",
"public void setEmail(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, EMAIL,value);\n\t}",
"public void setEmail(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, EMAIL,value);\n\t}",
"public void setEmail(String email)\n {\n String regex = \"^[\\\\w!#$%&'*+/=?`{|}~^-]+(?:\\\\.[\\\\w!#$%&'*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\\\.)+[a-zA-Z]{2,6}$\";\n Pattern pattern = Pattern.compile(regex);\n Matcher matcher = pattern.matcher(email);\n if(matcher.matches())\n {\n this.email=email;\n }\n else \n {\n this.email=\"\";\n }\n }",
"public void setEmailAddress(String emailAddress);",
"public void setEmail(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(EMAIL_PROP.get(), value);\n }",
"public void setEmail_address(String email_address);",
"private void setEmail(String email) {\n this.email = StringExtension.nullFilter(email);\n }",
"public void setEmail(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(EMAIL_PROP.get(), value);\n }",
"public void setEmail(String email){\r\n this.email = email;\r\n }",
"public Builder setEmail(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n email_ = value;\n onChanged();\n return this;\n }",
"public Builder setEmail(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n email_ = value;\n onChanged();\n return this;\n }",
"public Builder setEmail(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n email_ = value;\n onChanged();\n return this;\n }",
"public void setEmailAddress(java.lang.String newEmailAddress);",
"public void setEmailAddress(String email_address){\n this.email_address = email_address;\n }",
"public void setEmail(java.lang.String value) {\n\t\tsetValue(org.jooq.example.jaxrs.db.routines.GenerateKey.EMAIL, value);\n\t}",
"public void setEmail( String email )\r\n {\r\n this.email = email;\r\n }",
"public Builder setEmail(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n email_ = value;\n onChanged();\n return this;\n }",
"public void setEmail(java.lang.String param) {\n localEmailTracker = true;\n\n this.localEmail = param;\n }",
"public void set_email(String Email)\n {\n email =Email;\n }",
"public Builder setUserEmail(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n userEmail_ = value;\n onChanged();\n return this;\n }",
"public void setEmail(String string) {\n\t\tthis.email = string;\n\t}",
"public void setEmail(String email) { this.email = email; }",
"public void setEmailAddress(String email) {\n this.email = email;\n }",
"public void setEmail( final String email )\n\t{\n\t\tthis.email = email;\n\t}",
"public final void setEmail(final String emailNew) {\n this.email = emailNew;\n }",
"public void setEmail(String email)\n {\n this.email = email;\n }",
"public void setEmailCom(String emailCom);",
"public void setEmail(java.lang.String email) {\r\n this.email = email;\r\n }",
"@Override\n\tpublic void setEmail(String email) {\n\t\tsuper.setEmail(email);\n\t}",
"public void setAlternateEmail(String altemail) { this.alternateEmail = altemail; }",
"public void setEmail(String email) {\r\n this.email = email;\r\n }",
"public void setEmail(String email) {\r\n this.email = email;\r\n }",
"public void setEmail(String email) {\r\n this.email = email;\r\n }",
"public void setEmail(String email) {\r\n this.email = email;\r\n }",
"public void setEmail(String email) {\r\n this.email = email;\r\n }",
"public void setEmail(String email) {\r\n this.email = email;\r\n }",
"public void setEmail(String email)\n\t{\n\t\tthis._email=email;\n\t}",
"@Override\r\n\tpublic void setEmail(String email) {\n\t\tif (email == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (email.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.email = email;\r\n\t}",
"public void setUserEmail(String userEmail) {\r\n this.userEmail = userEmail;\r\n }",
"public void seteMail(String eMail) {\n this.eMail = eMail;\n }",
"public void setEmail(java.lang.String email) {\n this.email = email;\n }",
"public void setEmail(java.lang.String email) {\n this.email = email;\n }",
"public void setEmail(java.lang.String email) {\n this.email = email;\n }",
"public void setEmail(java.lang.String email) {\n this.email = email;\n }",
"public boolean setEmail(String email) {\n email = email.trim().replaceAll(\"\\\"\", \"\");\n\n if(EmailValidator.getInstance().isValid(email)) {\n if(this.email != null && this.email.equalsIgnoreCase(email)){\n return false;\n }\n this.email = email;\n return true;\n } else if (this.email == null) {\n this.email = \"INVALID\";\n } else {\n System.out.println(\"Person \" + name + \"'s email address will not be modified as the given email is invalid\");\n }\n return false;\n }",
"public void setContact(String email){ contact = email; }",
"public Builder setEmail(java.lang.String value) {\n\t\t\t\tif (value == null) {\n\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t}\n\n\t\t\t\temail_ = value;\n\t\t\t\tonChanged();\n\t\t\t\treturn this;\n\t\t\t}",
"public void setEmail(String email) {\r\n\t\tthis.email = email;\r\n\t}",
"public void setEmail(String email) {\r\n\t\tthis.email = email;\r\n\t}",
"public final void setEmail(String email) {\n\t\tthis.email = email;\n\t}",
"public void setEmail(gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Email email) {\r\n this.email = email;\r\n }",
"public void setEmail(String email) {\n mEmailTv.setText(email);\n }",
"void setEmail( String username, String email ) throws UserNotFoundException;",
"public void setEmail(String email0){\n\t\temail = email0;\n\t}",
"public void setEMail (java.lang.String eMail) {\r\n\t\tthis.eMail = eMail;\r\n\t}",
"public void setEmailAddress(java.lang.CharSequence value) {\n this.email_address = value;\n }",
"public void setEmailAddress(EmailType newEmailAddress) {\n _emailAddress = newEmailAddress;\n }",
"public void setEmail(String email) {\n Consistencia.consisteNaoNuloNaoVazio(email, \"email\");\n\n this.email = email;\n }",
"public Builder setEmail(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n deliveryMethodCase_ = 1;\n deliveryMethod_ = value;\n onChanged();\n return this;\n }",
"public void setEmail (java.lang.String email) {\n\t\tthis.email = email;\n\t}",
"public void setUserEmail(java.lang.String userEmail) {\r\n this.userEmail = userEmail;\r\n }",
"public EditAccountPage fillEmailField(String e_mail){\n cleanElement(emailElement);\n setElementText(emailElement, e_mail);\n return this;\n }",
"public void seteMailString(String eMailString) {\n\t\t\n\t}",
"public void setEmail(String p) { this.idcorreo = p; }"
]
| [
"0.8022132",
"0.80151564",
"0.8011614",
"0.8011614",
"0.79810464",
"0.7744064",
"0.7723246",
"0.7723246",
"0.76568353",
"0.76312447",
"0.7613555",
"0.7613555",
"0.7590775",
"0.7587483",
"0.75848716",
"0.757212",
"0.75539595",
"0.75268894",
"0.7521795",
"0.7513554",
"0.7513554",
"0.7499797",
"0.7497388",
"0.7489177",
"0.74853057",
"0.7477357",
"0.7452803",
"0.74360615",
"0.7433821",
"0.7422023",
"0.7412033",
"0.73941493",
"0.73310643",
"0.7325457",
"0.7318603",
"0.7317769",
"0.73118865",
"0.73105526",
"0.7310536",
"0.7300812",
"0.72916985",
"0.72916985",
"0.72916985",
"0.72916985",
"0.72916985",
"0.72916985",
"0.72863114",
"0.7267298",
"0.72327363",
"0.72074014",
"0.7180191",
"0.7180191",
"0.7180191",
"0.7180191",
"0.7176316",
"0.7171248",
"0.71670675",
"0.7131768",
"0.7131768",
"0.71204597",
"0.7119035",
"0.70982313",
"0.7095016",
"0.70911354",
"0.7085607",
"0.7084152",
"0.7079793",
"0.70773053",
"0.7075629",
"0.7064985",
"0.70242965",
"0.70169264",
"0.7015574",
"0.69927907"
]
| 0.71293485 | 83 |
this function to set address | public void setAddress(String address) {
this.address = address;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setInternalAddress(String address);",
"public void setAddress(String address);",
"public void setAddress(String address);",
"public void setAddress(String address);",
"public void setAddress(String address);",
"public void setAddress(java.lang.String param) {\r\n localAddressTracker = param != null;\r\n\r\n this.localAddress = param;\r\n }",
"public void setAddr(String addr) {\n this.addr = addr;\n }",
"void setAdress(String generator, String address);",
"public void setBaseAddress(int targetAddress, int baseAddress);",
"public void setExternalAddress(String address);",
"public void setAddress(String s) {\r\n\t\t// Still deciding how to do the address to incorporate apartments\r\n\t\taddress = s;\t\t\r\n\t}",
"public void setAddress(Address address) {\n this.address = address;\n }",
"public void setAddress(Address address) {\n this.address = address;\n }",
"public void setAddress(Address address) {\n this.address = address;\n }",
"void setAddress(String address) throws IllegalArgumentException;",
"void setAddress(long address) throws Exception {\n if (address < 0x10000) {\n Scales.sendByte((byte) 'A');\n Scales.sendByte((byte) (address >> 8));\n Scales.sendByte((byte) address);\n } else {\n Scales.sendByte((byte) 'H');\n Scales.sendByte((byte) (address >> 16));\n Scales.sendByte((byte) (address >> 8));\n Scales.sendByte((byte) address);\n }\n\n\t /* Should return CR */\n if (Scales.getByte() != '\\r') {\n throw new Exception(\"Setting address for programming operations failed! \" + \"Programmer did not return CR after 'A'-command.\");\n }\n }",
"public void setAddr(String addr) {\n\t\tthis.addr = addr;\n\t}",
"private void setPrefAddress( String addr ) {\n\t\tmPreferences.edit().putString( PREF_ADDR, addr ).commit();\n\t}",
"public void setAddress(String _address){\n address = _address;\n }",
"public void setAddress(int address)\n {\n this.address = address;\n }",
"public void setAddress(String address) {\n try {\n if (address == null ||\n address.equals(\"\") ||\n address.equals(\"localhost\")) {\n m_Address = InetAddress.getLocalHost().getHostName();\n }\n } catch (Exception ex) {\n log.error(\"setAddress()\",ex);\n }\n m_Address = address;\n }",
"public void setAddress(InetAddress address) {\r\n\t\tthis.address = address;\r\n\t}",
"Builder setAddress(String address);",
"public void setAddress(java.lang.String newAddress) {\n\taddress = newAddress;\n}",
"public void setAddress(java.lang.String newAddress) {\n\taddress = newAddress;\n}",
"public void setAddress(final String address){\n this.address=address;\n }",
"public void setAddress(String adrs) {\n address = adrs;\n }",
"public void setAddress(String address) { this.address = address; }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void set_addr(int value) {\n setUIntElement(offsetBits_addr(), 16, value);\n }",
"public void setAddress(String newAddress) {\r\n\t\tthis.address = newAddress;\r\n\t}",
"public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n address_ = value;\n onChanged();\n return this;\n }",
"public void setAddress(String address)\n {\n this.address = address;\n }",
"public void setAddress(org.xmlsoap.schemas.wsdl.soap.TAddress address)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.soap.TAddress target = null;\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().find_element_user(ADDRESS$0, 0);\n if (target == null)\n {\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().add_element_user(ADDRESS$0);\n }\n target.set(address);\n }\n }",
"public void setAddress(java.lang.String address)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ADDRESS$2);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ADDRESS$2);\n }\n target.setStringValue(address);\n }\n }",
"public void setAddress(String address) {\r\n this.address = address;\r\n }",
"public void setAddress(String address) {\r\n this.address = address;\r\n }",
"public void setAddress(String address) {\r\n this.address = address;\r\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public abstract void setAddressLine1(String sValue);",
"public final void setAddress(final String addressNew) {\n this.address = addressNew;\n }",
"public void setAddress(String string) {\n\t\tthis.address = string;\n\t}",
"@Override\n public void setAdress(Adress adress) {\n this.adress = adress;\n }",
"public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }",
"public void xsetAddress(org.apache.xmlbeans.XmlString address)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ADDRESS$2);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ADDRESS$2);\n }\n target.set(address);\n }\n }",
"void changeBTAddress() {\n\t\t\n\t\t// if ( this.beacon.getAppType() == AppType.APPLE_GOOGLE_CONTACT_TRACING ) {\n\t\tif ( this.useRandomAddr()) {\n\t\t\t// try to change the BT address\n\t\t\t\n\t\t\t// the address is LSB..MSB and bits 47:46 are 0 i.e. bits 0 & 1 of right-most byte are 0.\n\t\t\tbyte btRandomAddr[] = getBTRandomNonResolvableAddress();\n\t\t\t\n\t\t\t// generate the hcitool command string\n\t\t\tString hciCmd = getSetRandomBTAddrCmd( btRandomAddr);\n\t\t\t\n\t\t\tlogger.info( \"SetRandomBTAddrCmd: \" + hciCmd);\n\t\t\t\n\t\t\t// do the right thing...\n\t\t\tfinal String envVars[] = { \n\t\t\t\t\"SET_RAND_ADDR_CMD=\" + hciCmd\n\t\t\t};\n\t\t\t\t\t\t\n\t\t\tfinal String cmd = \"./scripts/set_random_addr\";\n\t\t\t\n\t\t\tboolean status = runScript( cmd, envVars, this, null);\n\t\t}\n\t\t\t\n\t}",
"public void setAddress(java.lang.String address) {\r\n this.address = address;\r\n }",
"public void setNatAddress(String addr);",
"public void setAddress(String address){\n\t\tthis.address = address;\n\t}",
"public void setAddress(String address){\n\t\tthis.address = address;\n\t}",
"public void setAddress(final String address) {\n\t\tthis.address = address;\n\t}",
"public void setAdress(Adress adr) {\r\n // Bouml preserved body begin 00040F82\r\n\t this.adress = adr;\r\n // Bouml preserved body end 00040F82\r\n }",
"public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }",
"public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }",
"@Override\r\n public void setIPAddress(String address) {\r\n this.address = address;\r\n }",
"public Builder setAddress(\n java.lang.String value) {\n if (value == null) { throw new NullPointerException(); }\n address_ = value;\n bitField0_ |= 0x00000020;\n onChanged();\n return this;\n }",
"public void setAddress(org.nhind.config.Address[] address) {\n this.address = address;\n }",
"public abstract void setAddressLine2(String sValue);",
"public void setAddress(String address) {\n if (getAddresses().isEmpty()) {\n getAddresses().add(address);\n } else {\n getAddresses().set(0, address);\n }\n }",
"public void setAddress(final String address) {\n this._address = address;\n }",
"public void setAddress2(String address2);",
"public void setAddr(String addr) {\n this.addr = addr == null ? null : addr.trim();\n }",
"public void setAddr(String addr) {\n this.addr = addr == null ? null : addr.trim();\n }",
"public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }",
"public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }",
"@Override\n\tpublic void setAddress(String address) {\n\t\tthis.address = address;\n\t}",
"@Generated(hash = 607080948)\n public void setAddress(Address address) {\n synchronized (this) {\n this.address = address;\n addressId = address == null ? null : address.getId();\n address__resolvedKey = addressId;\n }\n }",
"@Override\r\n\tpublic void setAddress(String address) {\n\t\tif (address == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (address.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.address = address;\r\n\t}",
"public final void setAddress(java.lang.String r1, android.net.Uri r2, int r3) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.telecom.ConnectionServiceAdapterServant.2.setAddress(java.lang.String, android.net.Uri, int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.2.setAddress(java.lang.String, android.net.Uri, int):void\");\n }",
"public void setMAddr(String mAddr) throws IllegalArgumentException, \n SipParseException {\n LogWriter.logMessage(LogWriter.TRACE_DEBUG,\"setMaddr () \" + mAddr);\n Via via=(Via)sipHeader;\n \n if (mAddr==null) \n throw new IllegalArgumentException\n (\"JAIN-EXCEPTION: mAddr is null\");\n else via.setMAddr(mAddr);\n }",
"public void setLocationAddress(final BwString val) {\n locationAddress = val;\n }",
"public void setAddress (java.lang.String address) {\n\t\tthis.address = address;\n\t}",
"public void setAddress(String address) {\n\t\tthis.address = address;\n\t}",
"public void setAddress(String address) {\n\t\tthis.address = address;\n\t}",
"public void setAddress(String address) {\n\t\tthis.address = address;\n\t}",
"public void setAddress(String address) {\n\t\tthis.address = address;\n\t}",
"public void setAddress(String address) {\n\t\tthis.address = address;\n\t}",
"public void setAddress( java.lang.String newValue ) {\n __setCache(\"address\", newValue);\n }",
"public void setIpAddress(InetAddress addr) \n\t{\n\t\tthis.ipAddress = addr;\n\t}",
"public void setaddress(String address) {\n\t\t_address = address;\n\t}",
"public void setFromAddress(java.lang.String fromAddress)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMADDRESS$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FROMADDRESS$6);\n }\n target.setStringValue(fromAddress);\n }\n }",
"public void setAddress(String address) throws JAXRException {\n this.address = address;\n }",
"public void setBillingAddressInCart(Address addr);"
]
| [
"0.77842486",
"0.77564347",
"0.77564347",
"0.77564347",
"0.77564347",
"0.77309704",
"0.7723002",
"0.76385516",
"0.76258725",
"0.7608307",
"0.7581432",
"0.75179106",
"0.75179106",
"0.75179106",
"0.7507239",
"0.7488628",
"0.745365",
"0.7449039",
"0.7429266",
"0.7428502",
"0.7427462",
"0.74193865",
"0.740281",
"0.7399515",
"0.7399515",
"0.73940945",
"0.7358401",
"0.7321425",
"0.7270967",
"0.7270048",
"0.7266027",
"0.7255715",
"0.72395164",
"0.7235662",
"0.7195808",
"0.71956897",
"0.71956897",
"0.71956897",
"0.7180792",
"0.7180792",
"0.71664417",
"0.71599764",
"0.7135417",
"0.7134332",
"0.7128028",
"0.71168137",
"0.7107956",
"0.70919997",
"0.70913416",
"0.7086257",
"0.7086257",
"0.70840687",
"0.7071527",
"0.7065204",
"0.7065204",
"0.70541584",
"0.7049958",
"0.6991884",
"0.6986686",
"0.69769686",
"0.69725484",
"0.6954554",
"0.6923419",
"0.6923419",
"0.69180495",
"0.69180495",
"0.6912578",
"0.69098336",
"0.6905865",
"0.68951774",
"0.6892753",
"0.68845177",
"0.6857188",
"0.68560904",
"0.68560904",
"0.68560904",
"0.68560904",
"0.68560904",
"0.6819723",
"0.68174094",
"0.6781731",
"0.67624557",
"0.6753782",
"0.67279094"
]
| 0.70033675 | 72 |
this function to set phone | public void setPhone(long phone) {
this.phone = phone;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setPhone(int phone);",
"public void setPhone(String phone)\r\n/* 46: */ {\r\n/* 47:58 */ this.phone = phone;\r\n/* 48: */ }",
"public void setPhone(String phone);",
"public void set_phone(String Phone)\n {\n phone =Phone;\n }",
"public abstract void setPhone1(String sValue);",
"public abstract void setPhone2(String sValue);",
"void setPhone(String ph){ // SETTER METHOD\n\t\tif(ph.length()>10 && ph.length()<=13){\n\t\t\tphone = ph; // writing the data based on some rules\n\t\t}else{\n\t\t\tphone = \"NA\";\n\t\t\tSystem.out.println(\"Please Enter Correct Phone Number\");\n\t\t}\n\t}",
"public void setPhone(String phone){\n\t\tthis.phone = phone;\n\t}",
"public void setPhone(String phone) {\r\n this.phone = phone;\r\n }",
"public void setPhone(String phone) {\n this.mPhone = phone;\n }",
"public void setPhone(String phone)\n {\n this.phone = phone;\n }",
"public void setPhone( String phone ) {\n this.phone = phone;\n }",
"public abstract void setPhone3(String sValue);",
"public void setPhone(String phone) {\n this.phone = phone;\n }",
"public void setPhone(String phone) {\n this.phone = phone;\n }",
"public void setPhone(String phone) {\n this.phone = phone;\n }",
"public void setPhone(String phone) {\n this.phone = phone;\n }",
"public void setPhone(String phone) {\n this.phone = phone;\n }",
"public void setPhone(String phone) {\n this.phone = phone;\n }",
"public void setPhone(String phone) {\n this.phone = phone;\n }",
"public void setPhone(String phone) {\n this.phone = phone;\n }",
"public void setPhone(String phone) {\n this.phone = phone;\n }",
"public void setPhone(String phone) {\n this.phone = phone;\n }",
"public void setPhone(String phone) {\n this.phone = phone;\n }",
"public void setTelphone(String telphone) {\n this.telphone = telphone;\n }",
"public void setTelphone(String telphone) {\n this.telphone = telphone;\n }",
"public void setPhone(String mPhone) {\n this.mPhone = mPhone;\n }",
"public void setPhone(String newPhone) {\r\n\t\tthis.phone = newPhone;\r\n\t}",
"public void setPhone(String phone) {\r\n // Bouml preserved body begin 00041002\r\n\t this.phoneNumber = phone;\r\n // Bouml preserved body end 00041002\r\n }",
"void setPhone(String phone) throws IllegalArgumentException;",
"public void setPhone(final String phone) {\n this.phone = phone;\n }",
"public final void setPhone(final String phoneNew) {\n this.phone = phoneNew;\n }",
"public void setPhone(java.lang.String phone) {\n this.phone = phone;\n }",
"public void setPhone(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, PHONE,value);\n\t}",
"public void setPhone(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, PHONE,value);\n\t}",
"public void setUserPhone( String userPhone )\n {\n this.userPhone = userPhone;\n }",
"public GoldenContactBuilder phone(String value) {\n phone = value;\n return this;\n }",
"public void setPhone (java.lang.String phone) {\n\t\tthis.phone = phone;\n\t}",
"public void setPhone(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(PHONE_PROP.get(), value);\n }",
"public void setPhone(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(PHONE_PROP.get(), value);\n }",
"public void setPhone(final String value)\n\t{\n\t\tsetPhone( getSession().getSessionContext(), value );\n\t}",
"public void setPhone(final String value)\n\t{\n\t\tsetPhone( getSession().getSessionContext(), value );\n\t}",
"public com.politrons.avro.AvroPerson.Builder setPhoneNumber(java.lang.CharSequence value) {\n validate(fields()[3], value);\n this.phone_number = value;\n fieldSetFlags()[3] = true;\n return this; \n }",
"public void setPhone(String phone) {\n\t\tthis.phone = StringUtils.trimString( phone );\n\t}",
"public void setTelphone (java.lang.String telphone) {\r\n\t\tthis.telphone = telphone;\r\n\t}",
"@Override\r\n\tpublic void setPhone(String phone) {\n\t\tif (phone == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (phone.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.phone = phone;\r\n\t}",
"public Builder setPhone(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n phone_ = value;\n onChanged();\n return this;\n }",
"public void setMobile_phone(Long mobile_phone);",
"public void setHome_phone(Long home_phone);",
"public void setPhoneNumber(String phone_number){\n this.phone_number = phone_number;\n }",
"public void setPhoneNumber(java.lang.CharSequence value) {\n this.phone_number = value;\n }",
"public void setPhone(String phonenum) {\n\t\tPHONE = phonenum;\n\t}",
"public void setPhone(String phone) {\n\t\tthis.phone = phone == null ? null : phone.trim();\n\t}",
"public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }",
"public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }",
"public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }",
"public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }",
"public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }",
"public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }",
"public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }",
"public void setPhone(String phone) {\r\n this.phone = phone == null ? null : phone.trim();\r\n }",
"public void setPhone(String phone) {\r\n this.phone = phone == null ? null : phone.trim();\r\n }",
"public void setPhone(String phone) {\r\n this.phone = phone == null ? null : phone.trim();\r\n }",
"public void setPhone(String phone) {\r\n this.phone = phone == null ? null : phone.trim();\r\n }",
"public void setTelephone(String telephone) {\n\t\tthis.telephone = telephone;\n\t}",
"public void setphoneNum(String phoneNum) {\n\t\t_phoneNum = phoneNum;\n\t}",
"public void setTelphone(String telphone) {\n this.telphone = telphone == null ? null : telphone.trim();\n }",
"public Builder setPhoneNumber(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n phoneNumber_ = value;\n onChanged();\n return this;\n }",
"public void setPhoneNum(String phoneNum) {\n this.phoneNum = phoneNum;\n }",
"public void setPhoneNumber() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setter method initialized\r\n System.out.println(\"Phone Number : \"+phoneNumber);}",
"public void updatePhoneNumber(String newPhoneNum)\r\n {\r\n phoneNum = newPhoneNum;\r\n }",
"public void setTelePhone(java.lang.String telePhone) {\r\n this.telePhone = telePhone;\r\n }",
"public void update_phone_settings(JSONObject json) throws JSONException {\n\t\tmyPhone.phone = json.getInt(\"phone\");\n\t}",
"public void setTel(Integer tel) {\n this.tel = tel;\n }",
"public void getPhone(Phone newPhone)\n {\n currentPhone = newPhone;\n }",
"public void setTel(String tel) {\n this.tel = tel;\n }",
"public void setTel(String tel) {\n this.tel = tel;\n }",
"public void setTel(String tel) {\n this.tel = tel;\n }",
"public void setTel(String tel) {\n this.tel = tel;\n }",
"public Builder setUserPhone(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n userPhone_ = value;\n onChanged();\n return this;\n }",
"public void setMobilePhone(String mobilePhone) {\n this.mobilePhone = mobilePhone;\n }",
"public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }",
"@Generated(hash = 1187165439)\n public void setPhone(Phone phone) {\n synchronized (this) {\n this.phone = phone;\n phoneId = phone == null ? null : phone.getId();\n phone__resolvedKey = phoneId;\n }\n }",
"@Override\n public void setPhone(java.lang.String phone) {\n _entityCustomer.setPhone(phone);\n }",
"@Override\r\n\tpublic String getPhone() {\n\t\treturn phone;\r\n\t}",
"public void setPhoneNumber(String phoneNumber) {\n\t\tthis.phoneNumber=phoneNumber;\r\n\t}",
"public String getPhone() {\r\n\t\treturn this.phone;\r\n\t}",
"public abstract void setSelectedPhoneType1(String sValue);",
"public void setaPhone(String aPhone) {\n this.aPhone = aPhone == null ? null : aPhone.trim();\n }",
"public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }",
"public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }",
"public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }",
"public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }",
"public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }",
"public void setMobliephone(String mobliephone) {\n this.mobliephone = mobliephone;\n }",
"public Builder setPhoneNumber(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n phoneNumber_ = value;\n onChanged();\n return this;\n }",
"public String getPhone(){\n\t\treturn phone;\n\t}",
"public void setTelephone(String telephone) {\n this.telephone = telephone == null ? null : telephone.trim();\n }",
"public void setTelephone(String telephone) {\n this.telephone = telephone == null ? null : telephone.trim();\n }",
"public void setPhoneNo(String value) {\n setAttributeInternal(PHONENO, value);\n }"
]
| [
"0.8061718",
"0.80091244",
"0.8001954",
"0.77840376",
"0.7748816",
"0.7712281",
"0.76865757",
"0.7682188",
"0.7647313",
"0.7622332",
"0.761415",
"0.7589308",
"0.7561861",
"0.7556353",
"0.7556353",
"0.7556353",
"0.7556353",
"0.7556353",
"0.7556353",
"0.7556353",
"0.7556353",
"0.7556353",
"0.7556353",
"0.7556353",
"0.7543776",
"0.7543776",
"0.7534034",
"0.750172",
"0.746984",
"0.7464562",
"0.7423388",
"0.7418624",
"0.7377591",
"0.73481554",
"0.73481554",
"0.7342663",
"0.7311393",
"0.72953004",
"0.7291678",
"0.7264002",
"0.72567606",
"0.72567606",
"0.7255366",
"0.72325253",
"0.72196925",
"0.7218376",
"0.71753895",
"0.71753347",
"0.71751934",
"0.71672744",
"0.71212155",
"0.71177673",
"0.7100372",
"0.70312375",
"0.70312375",
"0.70312375",
"0.70312375",
"0.70312375",
"0.70312375",
"0.70312375",
"0.7016368",
"0.7016368",
"0.7016368",
"0.7016368",
"0.69879293",
"0.6974461",
"0.6965656",
"0.6961563",
"0.69600904",
"0.6949775",
"0.6934469",
"0.6915712",
"0.69146276",
"0.6887021",
"0.68397176",
"0.68385696",
"0.68385696",
"0.68385696",
"0.68385696",
"0.68212116",
"0.68014073",
"0.6768969",
"0.67384",
"0.6734297",
"0.6722088",
"0.6716797",
"0.66830367",
"0.6650648",
"0.6645346",
"0.6642184",
"0.6642184",
"0.6642184",
"0.6642184",
"0.6642184",
"0.66405046",
"0.66352254",
"0.66347057",
"0.662542",
"0.662542",
"0.66217923"
]
| 0.7419255 | 31 |
this function to set password | public void setPassword(int password) {
this.password = password;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setPassword(String password);",
"void setPassword(String password);",
"void setPassword(String password);",
"public void setPassword(String pass);",
"public void setPassword(java.lang.String newPassword);",
"public void setPassword(String password)\r\n/* 26: */ {\r\n/* 27:42 */ this.password = password;\r\n/* 28: */ }",
"void setPassword(String ps) {\n this.password = ps;\n }",
"public void set_pass(String password)\n {\n pass=password;\n }",
"void setErrorPassword();",
"public void setPassword(String pw) {\n password = pw.toCharArray();\n cleared = false;\n }",
"void setPassword(Password newPassword, String plainPassword) throws NoUserSelectedException;",
"public void setPassword(String password)\n {\n _password = password;\n }",
"public void setPassword(String pw)\n {\n this.password = pw;\n }",
"@Override\n\tpublic void setPassword(String password) {\n\n\t}",
"public void setPassword(String paramPasswd) {\n\tstrPasswd = paramPasswd;\n }",
"private void setPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n }",
"private void setPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n }",
"public void setPassword(String p)\n\t{\n\t\tpassword = p;\n\t}",
"public void setPassword2(String password2);",
"@Test\r\n public void testSetPassword() {\r\n\r\n }",
"public void setPw(char[] password) {\n\t\t\r\n\t}",
"@Override\n\tpublic void setPlainPassword(String arg0) {\n\t\t\n\t}",
"public void setPassword(String strPassword){\n\t\t driver.findElement(password99Guru).sendKeys(strPassword);\n\t}",
"public void setPassword(String strPassword){\n \t \n \tdriver.findElement(By.cssSelector(inputPassword)).sendKeys(strPassword);\n \n \n }",
"public void setPassword(String p) {\n\t\tpassword = p;\n\t}",
"private void setNewPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n newPassword_ = value;\n }",
"public void setPassword(String password)\n {\n String passwordRegex = \"^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).{8,}$\";\n Pattern passwordPattern = Pattern.compile(passwordRegex);\n Matcher passwordMatcher = passwordPattern.matcher(password);\n if(passwordMatcher.matches())\n {\n this.password=password;\n }\n else\n {\n this.password=\"\";\n }\n }",
"public void setPassword(String password){\r\n this.password = password;\r\n }",
"public void setSpPassword(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localSpPasswordTracker = true;\r\n } else {\r\n localSpPasswordTracker = false;\r\n \r\n }\r\n \r\n this.localSpPassword=param;\r\n \r\n\r\n }",
"public void setPassword(String password)\n {\n _password = password;\n }",
"public void setPassword(java.lang.String param) {\r\n localPasswordTracker = param != null;\r\n\r\n this.localPassword = param;\r\n }",
"public void setPassword(String password){\n this.password = encryptPassword(password);\n checkRep();\n }",
"public void setPassword(String strPassword){\n\t\tdriver.findElement(password99Guru).sendKeys(strPassword);\n\t}",
"public void setPassword(java.lang.String param) {\n localPasswordTracker = true;\n\n this.localPassword = param;\n }",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"public void setPassword(String password) throws NoSuchAlgorithmException, UnsupportedEncodingException {\n this.password = password;\r\n// this.password = hashPassword(password);\r\n// System.out.println(\"haslo po hash w account: \" + this.password);\r\n }",
"public void setPassword(String text) {\n txtPassword().setText(text);\n }",
"public void setPassword( String password )\r\n {\r\n this.password = password;\r\n }",
"@Override\n\tpublic boolean setNewPassword(BigInteger tUserFId,String password) {\n\t\tint res = accountManageDao.updateApplyPwdWithMainUser(tUserFId,password);\n\t\treturn res>0?true:false;\n\t}",
"public void setPassword(String password)\n \t{\n \t\tthis.password = password;\n \t}",
"public void setPassword(String password) {\n this.password = password;\r\n }",
"public void setPassword(final String password){\n mPassword = password;\n }",
"public void setPassword(String strPassword) {\r\n\t\t//driver.findElement(passWord).sendKeys(strPassword);\r\n\t\tdriver.findElement(passWord).sendKeys(strPassword);\r\n\t\t//return new LoginPage();\r\n\t}",
"@Test\n public void testSetPassword() {\n System.out.println(\"setPassword\");\n user.setPassword(\"123m\");\n assertEquals(\"123m\", user.getPassword());\n }",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n onChanged();\n return this;\n }",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n onChanged();\n return this;\n }",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n onChanged();\n return this;\n }",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n password_ = value;\n onChanged();\n return this;\n }",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n password_ = value;\n onChanged();\n return this;\n }",
"public void setPassword(String password) {\r\n this.password = password;\r\n }",
"public void setPassword(String password) {\r\n this.password = password;\r\n }",
"public void setPassword(String password)\n {\n this.password = password;\n }",
"public void setPassword(String password)\n {\n this.password = password;\n }",
"@Override\n\tpublic void setEncryptedPassword(String arg0) {\n\t\t\n\t}",
"public void setPassword(String password) {\n\tthis.password = password;\n}",
"String getNewPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"public Builder setPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n password_ = value;\n onChanged();\n return this;\n }",
"public void set_password(String password)\r\n\t{\r\n\t\tthis.password = password;\r\n\t}",
"public void setPassword(String password)\n {\n this.password = password;\n }",
"public void setPassword(String password) {\r\n this.password = password;\r\n }",
"public void setPassword(String password) {\r\n this.password = password;\r\n }",
"public void setPassword(String password) {\r\n this.password = password;\r\n }",
"public void setPassword(String password) {\r\n this.password = password;\r\n }",
"public void setPassword(String password) {\r\n this.password = password;\r\n }",
"public void setPassword(String password) {\r\n this.password = password;\r\n }",
"public String getPassword();",
"public String getPassword();",
"public void setPassword(String password) {\n this.password = password;\n }",
"public void setPassword(String password) {\n this.password = password;\n }",
"void setUserPasswordHash(String passwordHash);",
"public java.lang.String getPassword();",
"public void setPass(String pass)\r\n\t{\r\n\t\tpassword = pass;\r\n\t}",
"public Builder setPassword(\n String value) {\n copyOnWrite();\n instance.setPassword(value);\n return this;\n }",
"public Builder setPassword(\n String value) {\n copyOnWrite();\n instance.setPassword(value);\n return this;\n }",
"public void setPassword(String password) {\n this.password = password;\n saveProperties();\n }",
"public void setPassword(final String password) {\n this.password = password.toCharArray();\n }",
"public void setPassword(java.lang.String password) {\r\n this.password = password;\r\n }",
"public void setPassword(java.lang.String password) {\r\n this.password = password;\r\n }",
"public void setPassWord(String password) {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putString(\"PASSWORD\", password);\n\t\teditor.commit();\n\t}",
"@Override\n\tpublic void setPassword(String password) {\n\t\tsuper.setPassword(password);\n\t}",
"@Override\n\tpublic void setPassword(String password) {\n\t\tsuper.setPassword(password);\n\t}",
"public void setPassword(boolean password) {\n/* 983 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\n\tpublic void modPasswd(String tenantId, String serverId, String userName,\n\t\t\tString passwd, String type) throws Exception {\n\t\t\n\t}",
"Password getPsw();",
"public Builder setPassword(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n password_ = value;\n onChanged();\n return this;\n }"
]
| [
"0.8578119",
"0.8578119",
"0.8578119",
"0.84953755",
"0.82511336",
"0.8176383",
"0.80857867",
"0.801863",
"0.79526556",
"0.7917525",
"0.79131454",
"0.7895179",
"0.78613347",
"0.78161275",
"0.78157634",
"0.7804863",
"0.7804863",
"0.7789452",
"0.77391636",
"0.76872784",
"0.765868",
"0.7620321",
"0.76186234",
"0.7618117",
"0.7604833",
"0.75675386",
"0.75337833",
"0.75329167",
"0.7531165",
"0.75173163",
"0.74839926",
"0.7477041",
"0.7453724",
"0.7433085",
"0.7430477",
"0.7430477",
"0.7430477",
"0.7430477",
"0.7430477",
"0.7430477",
"0.7430477",
"0.7427399",
"0.7414454",
"0.7378075",
"0.7372269",
"0.7365061",
"0.7331959",
"0.7328358",
"0.7327802",
"0.73262745",
"0.732609",
"0.732609",
"0.732609",
"0.73238415",
"0.73238415",
"0.73044425",
"0.73044425",
"0.7299987",
"0.7299987",
"0.7292977",
"0.72750443",
"0.72627723",
"0.72625",
"0.72625",
"0.72625",
"0.72625",
"0.72625",
"0.72625",
"0.72625",
"0.72625",
"0.72625",
"0.72478014",
"0.7247764",
"0.7247455",
"0.72328144",
"0.72328144",
"0.72328144",
"0.72328144",
"0.72328144",
"0.72328144",
"0.7211762",
"0.7211762",
"0.720734",
"0.720734",
"0.71840847",
"0.717782",
"0.71758413",
"0.7175111",
"0.7175111",
"0.71686023",
"0.7167955",
"0.7166648",
"0.7166648",
"0.7153754",
"0.7136044",
"0.7136044",
"0.71101844",
"0.71085465",
"0.71050954",
"0.7084291"
]
| 0.72669065 | 61 |
this function to get name | public String getName() {
return name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"String getName() ;",
"String getName( );",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();"
]
| [
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.8602986",
"0.85915285",
"0.8470692",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234",
"0.84069234"
]
| 0.0 | -1 |
this function to get email | public String getEmail() {
return email;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getUserEmail();",
"String getEmail();",
"String getEmail();",
"String getEmail();",
"String getEmail();",
"String getEmail();",
"String getUserMail();",
"String getEmail(int type);",
"public String getEmail() {\r\n // Bouml preserved body begin 00040D82\r\n\t System.out.println(email);\r\n\t return email;\r\n // Bouml preserved body end 00040D82\r\n }",
"public java.lang.String getEmailAddress();",
"private String extractEMailAddress() {\n return SwingUtil.extract(emailJTextField, Boolean.TRUE);\n }",
"public String getEmail() throws Exception {\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(email);\r\n\t\t\t\tStr_email = element.getText();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Email Id NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\treturn Str_email;\r\n\t\t}",
"public String returnEmail() {\n\t\treturn this.registration_email.getAttribute(\"value\");\r\n\t}",
"public String getEmail()\r\n/* 31: */ {\r\n/* 32:46 */ return this.email;\r\n/* 33: */ }",
"public java.lang.String getEmailAddress()\r\n\t{\r\n\t\tString result = \"\";\r\n\t\tint length = emailAddress.length();\r\n\t\t\r\n\t\tif (!locked)\r\n\t\t\tresult = emailAddress;\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor(int i = 1; i < length; i++)\r\n\t\t\t{\r\n\t\t\t\t//char asterisk = emailAddress.charAt(i);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn result;\r\n\t\t\t\r\n\t}",
"public String getEmail(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, EMAIL);\n\t}",
"public String getEmail(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, EMAIL);\n\t}",
"public WebElement getEmail()\n {\n\t\t\n \tWebElement user_emailId = driver.findElement(email);\n \treturn user_emailId;\n \t\n }",
"public java.lang.String getEMail () {\r\n\t\treturn eMail;\r\n\t}",
"public java.lang.String getEmail () {\n\t\treturn email;\n\t}",
"@AutoEscape\n\tpublic String getEmail_address();",
"public java.lang.String getEmail() {\r\n return email;\r\n }",
"public String getEmail()\r\n {\r\n return getAttribute(\"email\");\r\n }",
"public String getEmailAddress();",
"private String getUserEmailAddress() {\n\t\tUser user = UserDirectoryService.getCurrentUser();\n\t\tString emailAddress = user.getEmail();\n\n\t\treturn emailAddress;\n\t}",
"String getEmailLocation();",
"public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Email getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\n\n String dataField = null;\n sharedPreference_login = new SharedPreference_Login(activity);\n if (sharedPreference_login.IsSaved()) {\n dataField = sharedPreference_login.email();\n }\n\n\n return dataField;\n }",
"public synchronized String getMail()\r\n {\r\n return mail;\r\n }",
"@Override\r\n\tpublic String getEmail() {\n\t\treturn email;\r\n\t}",
"public final String getEmail() {\n\t\treturn email;\n\t}",
"public String getUserEmailAdress() throws Exception\r\n {\n return null;\r\n }",
"public String getEmail()\r\n {\r\n return email;\r\n }",
"public final String getEmail() {\n return email;\n }",
"public String getEmail()\n\t{\n\t\treturn this._email;\n\t}",
"@java.lang.Override\n public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n email_ = s;\n return s;\n }\n }",
"public String adcionarEmail() {\n\t\tpessoa.adicionaEmail(email);\n\t\tthis.email = new Email();\n\t\treturn null;\n\t}",
"public Email getEmail()\r\n {\r\n /**\r\n * Ya hemos leido. Se devuelve una nueva instancia en cada envio de mail para evitar problemas de sincronizacion.\r\n */\r\n return createEmailInstance();\r\n }",
"public String getFromEMail() {\n return fromEMail;\n }",
"public static String getUserEmail() {\r\n return null;\r\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n email_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n email_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@Override\n public String getEmailAddress() {\n\n if(this.emailAddress == null){\n\n this.emailAddress = TestDatabase.getInstance().getClientField(token, id, \"emailAddress\");\n }\n\n return emailAddress;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getEmail() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(EMAIL_PROP.get());\n }",
"public String getEmail() {return email; }",
"public String getEmail()\n\t{\n\t\treturn getEmail( getSession().getSessionContext() );\n\t}",
"public String getEmail()\n\t{\n\t\treturn getEmail( getSession().getSessionContext() );\n\t}",
"public String getEmail()\n\t{\n\t\treturn this.email;\n\t}",
"Object getMailhost();",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n email_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getEmail() {\n\t\t\t\tjava.lang.Object ref = email_;\n\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\temail_ = s;\n\t\t\t\t\treturn s;\n\t\t\t\t} else {\n\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t}\n\t\t\t}",
"public abstract String getEmail( String [ ] strLineDataArray );",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n email_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n email_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n email_ = s;\n }\n return s;\n }\n }",
"public String getEmailAddress() {\r\n return email;\r\n }",
"public String getEmail()\n {\n return emailAddress;\n }",
"public java.lang.String getEmail() {\n\t\t\tjava.lang.Object ref = email_;\n\t\t\tif (ref instanceof java.lang.String) {\n\t\t\t\treturn (java.lang.String) ref;\n\t\t\t} else {\n\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\temail_ = s;\n\t\t\t\treturn s;\n\t\t\t}\n\t\t}",
"public String geteMail() {\n return eMail;\n }",
"public String geteMail() {\n return eMail;\n }",
"public String getEmail()\n {\n return email;\n }",
"public String getEmail()\n {\n return email;\n }",
"private EMail extractEMail() {\n final String emailAddress = extractEMailAddress();\n if (null == emailAddress) {\n return null;\n } else {\n try {\n return EMailBuilder.parse(emailAddress);\n } catch (final EMailFormatException emfx) {\n return null;\n }\n }\n }",
"public java.lang.String getEmail() {\n return localEmail;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getEmail() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(EMAIL_PROP.get());\n }",
"public String getEmail() {\r\n\t\treturn email;\r\n\t}",
"public String getEmail() {\r\n\t\treturn email;\r\n\t}",
"public String getEmail() {\r\n\t\treturn email;\r\n\t}",
"public String getEmail(){\n\t\treturn email;\n\t}",
"public String getEmail(){\n\t\treturn email;\n\t}",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n email_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n return email;\n }",
"Optional<String> email();",
"public String getEmail() {\n return _email;\n }"
]
| [
"0.86292315",
"0.86292315",
"0.86292315",
"0.86292315",
"0.86292315",
"0.86292315",
"0.8240246",
"0.81557655",
"0.81557655",
"0.81557655",
"0.81557655",
"0.81557655",
"0.81153",
"0.7707257",
"0.7643837",
"0.75794697",
"0.7517235",
"0.74842304",
"0.7417828",
"0.7355457",
"0.72674835",
"0.7226435",
"0.7226435",
"0.7220493",
"0.720769",
"0.71944124",
"0.7179396",
"0.71709013",
"0.7164483",
"0.71592474",
"0.7131752",
"0.71299565",
"0.7123776",
"0.71030253",
"0.7102029",
"0.7095773",
"0.7091529",
"0.70902437",
"0.7080854",
"0.7080335",
"0.7079613",
"0.7072423",
"0.7060646",
"0.70554394",
"0.70409894",
"0.7037952",
"0.7033299",
"0.7033299",
"0.7033299",
"0.7033299",
"0.70325804",
"0.70325804",
"0.70310986",
"0.70224726",
"0.702169",
"0.701834",
"0.701834",
"0.7016418",
"0.7015653",
"0.701287",
"0.701287",
"0.701287",
"0.701287",
"0.701287",
"0.701287",
"0.701287",
"0.701287",
"0.701287",
"0.701287",
"0.701287",
"0.7011557",
"0.7009088",
"0.70080787",
"0.7006836",
"0.7006836",
"0.7006836",
"0.70064116",
"0.7005522",
"0.6989259",
"0.698538",
"0.698538",
"0.6983555",
"0.6983555",
"0.69827956",
"0.69808644",
"0.6960492",
"0.6943364",
"0.6943364",
"0.6943364",
"0.6942272",
"0.6942272",
"0.69382155",
"0.69204295",
"0.69061774",
"0.6901185",
"0.6892767"
]
| 0.0 | -1 |
this function to get address | public String getAddress() {
return address;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"String getAddress();",
"String getAddress();",
"public String getInternalAddress();",
"public String getExternalAddress();",
"AddressI getAddress();",
"public String getAddress();",
"String getAddr();",
"String getAddress(int type);",
"public String getAddress()\r\n {\r\n return address.getFullAddress();\r\n }",
"public String getAddress()\r\n {\r\n return address.getFullAddress();\r\n }",
"public String getAddress() {\r\n\t\t// Still deciding how to do the address to incorporate apartments\r\n\t\treturn address;\t\t\r\n\t}",
"public String getAddress()\r\n\t{\r\n\t\treturn address;\r\n\t}",
"private String getAddress() {\n String add = \"\";\n if (mLocationHelper != null) {\n add = getString(R.string.address, mLocationHelper.getAddress());\n }\n return add;\n }",
"public final String getAddress() {\n return address;\n }",
"@Override\n public String getAddress() {\n\n if(this.address == null){\n\n this.address = TestDatabase.getInstance().getClientField(token, id, \"address\");\n }\n\n return address;\n }",
"public InternetAddress getFromAddress();",
"public String getAddress()\n {\n \treturn address;\n }",
"MessageAddress getMessageAddress();",
"@AutoEscape\n\tpublic String getAddress();",
"@AutoEscape\n\tpublic String getAddress();",
"@AutoEscape\n\tpublic String getAddress();",
"@AutoEscape\n\tpublic String getAddress();",
"public String getAddress() throws JAXRException{\n return address;\n }",
"public String getAddress() {\n\t\tlog.info(\"NOT IMPLEMENTED\");\n\t\treturn \"\";\n\t}",
"public java.lang.String getAddress () {\n\t\treturn address;\n\t}",
"public java.lang.String getAddress() {\r\n return address;\r\n }",
"public String address() {\n return Codegen.stringProp(\"address\").config(config).require();\n }",
"public java.lang.String getAddress() {\r\n return localAddress;\r\n }",
"private String getAddress() {\n\t\tif (localIp != null) {\n\t\t\treturn localIp;\n\t\t}\n\t\tString address = \"\";\n\t\tInetAddress lanIp = null;\n\t\ttry {\n\t\t\tString ipAddress = null;\n\t\t\tEnumeration<NetworkInterface> net = null;\n\t\t\tnet = NetworkInterface.getNetworkInterfaces();\n\t\t\twhile (net.hasMoreElements()) {\n\t\t\t\tNetworkInterface element = net.nextElement();\n\t\t\t\tEnumeration<InetAddress> addresses = element.getInetAddresses();\n\t\t\t\twhile (addresses.hasMoreElements()) {\n\t\t\t\t\tInetAddress ip = addresses.nextElement();\n\t\t\t\t\tif (ip instanceof Inet4Address) {\n\t\t\t\t\t\tif (ip.isSiteLocalAddress()) {\n\t\t\t\t\t\t\tipAddress = ip.getHostAddress();\n\t\t\t\t\t\t\tlanIp = InetAddress.getByName(ipAddress);\n\t\t\t\t\t\t\tSystem.out.println(\"found local address: \" + ipAddress);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (lanIp == null)\n\t\t\t\treturn null; \n\t\t\taddress = lanIp.toString().replaceAll(\"^/+\", \"\"); \n\t\t} catch (UnknownHostException ex) {\n\t\t\tex.printStackTrace();\n\t\t} catch (SocketException ex) {\n\t\t\tex.printStackTrace();\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn address;\n\n\t}",
"public String getAddress() {\r\n\t\treturn address;\r\n\t}",
"public String getAddress() {\r\n\t\treturn address;\r\n\t}",
"public String getNatAddress();",
"public String getAddress(){\n\t\treturn address;\n\t}",
"public String getAddr() {\n return addr;\n }",
"public String getAddr() {\n return addr;\n }",
"public String getAddr() {\n return addr;\n }",
"public long getAddress() {\n return origin + originOffset;\n }",
"public String getAddress() {\n return definition.getString(ADDRESS);\n }",
"@Override\r\n\tpublic String getAddress() {\n\t\treturn address;\r\n\t}",
"int getAddr();",
"public String getAddress(){\n\t\treturn this.address;\n\t}",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n\t\treturn this.address;\r\n\t}",
"public String getAddress() {\n\t\treturn address;\n\t}",
"public String getAddress() {\n\t\treturn address;\n\t}",
"public String getAddress() {\n\t\treturn address;\n\t}",
"public String getAddress() {\n\t\treturn address;\n\t}",
"public String getAddress() {\n\t\treturn address;\n\t}",
"public String getAddress() {\n\t\treturn address;\n\t}",
"public String getAddress() {\n\t\treturn address;\n\t}",
"InetAddress getAddress();",
"InetAddress getAddress();",
"public String getAddress() {\n return this._address;\n }",
"public java.lang.String getAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ADDRESS$2);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public java.lang.String getAddress() {\n\treturn address;\n}",
"public java.lang.String getAddress() {\n\treturn address;\n}",
"public String getAddress()\r\n\t{\r\n\t\treturn address.getModelObjectAsString();\r\n\t}",
"@Override\n\tpublic String getAddress() {\n\t\treturn address;\n\t}",
"public String getAddress() {\n\t\treturn this.address;\n\t}",
"public String getAddr() {\n\t\treturn addr;\n\t}",
"public abstract LinphoneAddress getAddress();",
"public InetSocketAddress getAddress ( ) {\n\t\treturn extract ( handle -> handle.getAddress ( ) );\n\t}",
"public String getFromAddress()\n {\n return _fromAddress;\n }",
"java.lang.String getHotelAddress();",
"public java.lang.String getAddress() {\n\t\t\t\t\tjava.lang.Object ref = address_;\n\t\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\t\tcom.google.protobuf.ByteString bs =\n\t\t\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\t\taddress_ = s;\n\t\t\t\t\t\treturn s;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t\t}\n\t\t\t\t}",
"public void getAddress() {\n if (mLocation != null) {\n mBusinessAddress = AppUtil.getAddress(getContext(), mLocation);\n } else {\n mLocation = null;\n if (ActivityCompat.checkSelfPermission(getContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), android.Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n LocationManager locationManager = (LocationManager) getActivity().getSystemService(LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n Location currLocation = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));\n if (currLocation != null) {\n mBusinessAddress = AppUtil.getAddress(getContext(), new LatLng(currLocation.getLatitude(), currLocation.getLongitude()));\n } else {\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000, 5, this);\n if (mCurrLocation != null) {\n mBusinessAddress = AppUtil.getAddress(getContext(), new LatLng(mCurrLocation.getLatitude(), mCurrLocation.getLongitude()));\n } else {\n // Default location in case location search doesn't work on first try\n mBusinessAddress = DiscoverConstants.DEFAULT_LOCATION;\n }\n }\n } else {\n mBusinessAddress = null;\n }\n }\n }",
"public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAddress() {\n\t\t\t\tjava.lang.Object ref = address_;\n\t\t\t\tif (ref instanceof java.lang.String) {\n\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t} else {\n\t\t\t\t\tcom.google.protobuf.ByteString bs =\n\t\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\taddress_ = s;\n\t\t\t\t\treturn s;\n\t\t\t\t}\n\t\t\t}",
"public String getAddress() {\n return this.address;\n }",
"public String getAddress() {\n return this.address;\n }",
"public String getaddress() {\n\t\treturn _address;\n\t}",
"String getAddress( String filename, String generator);",
"public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n address_ = s;\n }\n return s;\n }\n }"
]
| [
"0.881137",
"0.881137",
"0.881137",
"0.881137",
"0.881137",
"0.881137",
"0.85327375",
"0.85327375",
"0.8229366",
"0.81955993",
"0.8162752",
"0.80535525",
"0.80219066",
"0.7957454",
"0.77551556",
"0.77551556",
"0.7687917",
"0.7682696",
"0.7647441",
"0.7646091",
"0.76356983",
"0.7596277",
"0.7589055",
"0.7589021",
"0.7579657",
"0.7579657",
"0.7579657",
"0.7579657",
"0.75764143",
"0.7572062",
"0.75689",
"0.755586",
"0.75496334",
"0.75444967",
"0.7534224",
"0.74985945",
"0.74985945",
"0.74819803",
"0.7475945",
"0.7462607",
"0.7462607",
"0.7462607",
"0.74586207",
"0.74526036",
"0.74525654",
"0.74510825",
"0.7440029",
"0.7428529",
"0.7428529",
"0.7428529",
"0.7428529",
"0.7428529",
"0.7428529",
"0.7428529",
"0.7421671",
"0.7415515",
"0.7415515",
"0.7415515",
"0.7415515",
"0.7415515",
"0.7415515",
"0.7415515",
"0.7413681",
"0.7413681",
"0.74043703",
"0.7396867",
"0.739584",
"0.739584",
"0.73720753",
"0.7368048",
"0.7343189",
"0.7342044",
"0.73274827",
"0.73243773",
"0.73146063",
"0.7299884",
"0.7298963",
"0.72953755",
"0.72946936",
"0.7294039",
"0.7292134",
"0.7292134",
"0.7288216",
"0.7280379",
"0.7270057"
]
| 0.0 | -1 |
this function to get phone | public long getPhone() {
return phone;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getPhone();",
"java.lang.String getUserPhone();",
"String getPhone(int type);",
"java.lang.String getPhoneNumber();",
"java.lang.String getPhoneNumber();",
"java.lang.String getPhoneNumber();",
"public String getPhoneNumber(){\n\t\t \n\t\t TelephonyManager mTelephonyMgr;\n\t\t mTelephonyMgr = (TelephonyManager)\n\t\t activity.getSystemService(Context.TELEPHONY_SERVICE); \n\t\t return mTelephonyMgr.getLine1Number();\n\t\t \n\t\t}",
"int getPhone();",
"java.lang.String getPhonenumber();",
"public String getPhone(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, PHONE);\n\t}",
"public String getPhone(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, PHONE);\n\t}",
"public Long getHome_phone();",
"public java.lang.String getPhone () {\n\t\treturn phone;\n\t}",
"public final String getPhone() {\n return phone;\n }",
"public Long getMobile_phone();",
"@Override\r\n\tpublic String getPhone() {\n\t\treturn phone;\r\n\t}",
"public String getPhone() {\r\n\t\treturn this.phone;\r\n\t}",
"public java.lang.String getTelphone () {\r\n\t\treturn telphone;\r\n\t}",
"public String getPhone(){\n\t\treturn phone;\n\t}",
"public abstract String getPhone3();",
"public String getPhone() {\n\t\treturn phone;\n\t}",
"public String getPhone() {\n return phone;\n }",
"private String getMyPhoneNO() {\n String mPhoneNumber;\n TelephonyManager tMgr = (TelephonyManager) this.getActivity().getSystemService(Context\n .TELEPHONY_SERVICE);\n mPhoneNumber = tMgr.getLine1Number();\n if(mPhoneNumber == null)\n mPhoneNumber = \"+NoNotFound\";\n return mPhoneNumber;\n }",
"private void getphoneinformaition() {\n\t\ttry {\n\t\t\tsoftVersion = this.getPackageManager().getPackageInfo(\n\t\t\t\t\tthis.getPackageName(), 0).versionName;\n\t\t} catch (NameNotFoundException e) {\n\t\t\tsoftVersion = \"NULL\";\n\t\t}\n\n\t\tif (Build.BRAND != null) {\n\t\t\tphoneBrand = Build.BRAND;\n\t\t}\n\t\tif (Build.MODEL != null) {\n\t\t\tphoneModel = Build.MODEL;\n\t\t}\n\t\tif (Build.VERSION.RELEASE != null) {\n\t\t\tphoneOs = Build.VERSION.RELEASE;\n\t\t}\n\n\t\ttry {\n\t\t\tDisplayMetrics metric = new DisplayMetrics();\n\t\t\tgetWindowManager().getDefaultDisplay().getMetrics(metric);\n\t\t\tint width = metric.widthPixels; // 屏幕宽度(像素)\n\t\t\tint height = metric.heightPixels; // 屏幕高度(像素)\n\t\t\tString w = String.valueOf(width);\n\t\t\tString h = String.valueOf(height);\n\t\t\tStringBuffer s = new StringBuffer();\n\t\t\ts.append(w);\n\t\t\ts.append(\"*\");\n\t\t\ts.append(h);\n\t\t\tphoneResolution = s.toString();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tphoneResolution = \"NULL\";\n\t\t}\n\n\t\tFileLog.i(TAG, softVersion);\n\t\tFileLog.i(TAG, phoneBrand);\n\t\tFileLog.i(TAG, phoneModel);\n\t\tFileLog.i(TAG, phoneOs);\n\t\tFileLog.i(TAG, phoneResolution);\n\n\t}",
"public String getPhone() {\r\n return phone;\r\n }",
"public String getPhone() {\r\n return phone;\r\n }",
"public String getPhone() {\r\n return phone;\r\n }",
"public String getPhone() {\r\n return phone;\r\n }",
"public String getPhone() {\r\n return phone;\r\n }",
"public String getPhone() {\r\n return phone;\r\n }",
"public String getPhone() {\n return _phone;\n }",
"@Override\n public String getphoneNumber() {\n return ((EditText)findViewById(R.id.phoneNumberUserPage)).getText().toString().trim();\n }",
"public abstract String getPhone2();",
"public String getTelphone() {\n return telphone;\n }",
"public String getTelphone() {\n return telphone;\n }",
"public String getTelphone() {\n return telphone;\n }",
"java.lang.String getTelefon();",
"public String getaPhone() {\n return aPhone;\n }",
"@Override\n public String getPhoneNumber() {\n\n if(this.phoneNumber == null){\n\n this.phoneNumber = TestDatabase.getInstance().getClientField(token, id, \"phoneNumber\");\n }\n\n return phoneNumber;\n }",
"public java.lang.String getPhone() {\n return phone;\n }",
"public abstract String getPhone1();",
"public String returnPhoneNumber() {\n\t\treturn this.registration_phone.getAttribute(\"value\");\r\n\t}",
"public String getPhone() {\r\n // Bouml preserved body begin 00040C82\r\n\t return phoneNumber;\r\n // Bouml preserved body end 00040C82\r\n }",
"private String getPrimaryNumber(long _id) {\n String primaryNumber = null;\n try {\n Cursor cursor = getContentResolver().query( ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n new String[]{ContactsContract.CommonDataKinds.Phone.NUMBER, ContactsContract.CommonDataKinds.Phone.TYPE},\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID +\" = \"+ _id, // We need to add more selection for phone type\n null,\n null);\n if(cursor != null) {\n while(cursor.moveToNext()){\n switch(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE))){\n case ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE :\n primaryNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_HOME :\n primaryNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_WORK :\n primaryNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_OTHER :\n }\n if(primaryNumber != null)\n break;\n }\n }\n } catch (Exception e) {\n Log.i(\"test\", \"Exception \" + e.toString());\n } finally {\n if(cursor != null) {\n cursor.deactivate();\n cursor.close();\n }\n }\n return primaryNumber;\n }",
"public String Phone() throws Exception {\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(phone);\r\n\t\t\t\tStr_phoneno = element.getText();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Phone Number NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn Str_phoneno;\r\n\t\t\t\r\n\t\t}",
"public static String getPhoneByID(Context context, String id)\n\t{\n\t\tCursor secC = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null,\n ContactsContract.CommonDataKinds.Phone.LOOKUP_KEY +\" = ?\",\n new String[] {id},\n null);\n \tif (secC.moveToFirst())\n\t\t{\n\t\t\tString phone = secC.getString(secC.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n\t\t\tsecC.close();\n\t\t\treturn phone;\n\t\t}\n\t\tsecC.close();\n \treturn \"+1-541-754-3010\";\n\t}",
"public String getUserphone() {\n return userphone;\n }",
"void getContributeToday(String phone);",
"public String getUserPhone() {\r\n return userPhone;\r\n }",
"public String getPhone() {\n return phone;\n }",
"public String getPhone() {\n return phone;\n }",
"public String getPhone() {\n return phone;\n }",
"public String getPhone() {\n return phone;\n }",
"public String getPhone() {\n return phone;\n }",
"public String getPhone() {\n return phone;\n }",
"public String getPhone() {\n return phone;\n }",
"public String getPhone() {\n return phone;\n }",
"public String getPhone() {\n return phone;\n }",
"public String getPhone() {\n return phone;\n }",
"public String getPhone() {\n return phone;\n }",
"public String getPhone() {\n return phone;\n }",
"public String getPhone() {\n return phone;\n }",
"public String getPhone() {\n return phone;\n }",
"public String getPhone() {\n return phone;\n }",
"public String getPhone() {\n return phone;\n }",
"public String getTelephone() {\n return (String) get(\"telephone\");\n }",
"private String getPhone()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"\");\n System.out.print(\"Indtast telefonnummer: \");\n return scanner.nextLine();\n }",
"public String getPhone()\r\n/* 41: */ {\r\n/* 42:54 */ return this.phone;\r\n/* 43: */ }",
"public String getPhone()\n\t{\n\t\treturn getPhone( getSession().getSessionContext() );\n\t}",
"public String getPhone()\n\t{\n\t\treturn getPhone( getSession().getSessionContext() );\n\t}",
"public Phone getPhone() {\n\t\treturn phone;\n\t}",
"public java.lang.String getPhone() {\n java.lang.Object ref = phone_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n phone_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getMyPhoneNumber() {\n return ((TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE))\n .getLine1Number();\n }",
"public String getPhoneNum()\r\n {\r\n\treturn phoneNum;\r\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getPhone() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(PHONE_PROP.get());\n }",
"public static String getPhoneById(String cid, Context context){\n\t\t\n\n\t\t \tString contactNumber = \"\";\n\t\t \t//String contactName = \"\";\n\t \tCursor cursor = context.getContentResolver().query( \n\t \t\t\tContactsContract.Contacts.CONTENT_URI, null, \n\t \t\t\tContactsContract.Contacts._ID + \"=?\", \n\t \t new String[]{cid}, null); \n\t \t\n\t \t//Log.e(\"PARSER\", \"1\");\n\t \tif(cursor.moveToFirst()){\n\t\n\t \t//contactName = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n Cursor pCur = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,null,ContactsContract.CommonDataKinds.Phone.CONTACT_ID +\" = ?\",new String[]{ cid }, null);\n while (pCur.moveToNext()){\n \t\n \t\n contactNumber = pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n contactNumber = contactNumber.replaceAll(\" \", \"\");\n // contactName = pCur.getString(pCur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n //Log.e(\"PARSER\"+contactNumber, \"Name\"+contactNumber);\n //result.put(contactNumber, contactName);\n } \n pCur.close();\n\t //}\n\t \n\t\t\t}\n\t \tcursor.close();\n return contactNumber;\n\t}",
"public java.lang.String getTelePhone() {\r\n return telePhone;\r\n }",
"public String getUserPhone()\n {\n return userPhone;\n }",
"public java.lang.String getInternalphone() {\n\treturn internalphone;\n}",
"public String getPhone() {\n return mPhone;\n }",
"public String getPhone() {\n return mPhone;\n }",
"public java.lang.String getPhone() {\n java.lang.Object ref = phone_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n phone_ = s;\n }\n return s;\n }\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getPhone() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(PHONE_PROP.get());\n }",
"@AutoEscape\n\tpublic String getPhone();",
"SdkPhone selectOne(SdkPhoneExample example);",
"public String getTelephone() {\n return telephone;\n }",
"public String getTelephone() {\n return telephone;\n }",
"public String getPhoneNumber(){\r\n\t\treturn phoneNumber;\r\n\t}",
"public String getPhone(){\n return phone;\n }",
"public String getPhone(){\n return phone;\n }",
"public String getPhoneNum()\r\n {\r\n return phoneNum;\r\n }",
"public java.lang.CharSequence getPhoneNumber() {\n return phone_number;\n }",
"cb.Careerbuilder.Company.PhoneNumber getPhone(int index);",
"com.demo.springprotobuff.Demoproto.Student.PhoneNumber getPhone(int index);",
"@Override\n\tpublic String getTelephoneByOpenid(String openId) {\n\t\ttry {\n\t\t\treturn register.getPhoneByOpenId(openId);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"public String getPhoneNumber(int n) {\r\n\t\tif(phone.size()>n && n>=0)\r\n\t\t\treturn phone.get(n);\r\n\t\telse\r\n\t\t\treturn null;\t\t\r\n\t}",
"public java.lang.CharSequence getPhoneNumber() {\n return phone_number;\n }",
"public String getphoneNum() {\n\t\treturn _phoneNum;\n\t}",
"private String generatePhone() {\n\t\tString ret = \"\";\n\t\tString[] areaCode = { \"051\", \"055\", \"045\", \"043\", \"053\" };\n\n\t\t// Gets an area code\n\t\tret = areaCode[(new Random()).nextInt(5)];\n\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tint n = (new Random()).nextInt(9);\n\n\t\t\t// Checks if the first number is 0\n\t\t\tif (i == 0 && n == 0) {\n\t\t\t\ti -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tret += n;\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t}",
"public long getPhoneNumber() {\r\n\t\treturn phoneNumber;\r\n\t}"
]
| [
"0.8168533",
"0.81559986",
"0.7741906",
"0.7600434",
"0.7600434",
"0.7600434",
"0.75481486",
"0.75063735",
"0.7422531",
"0.7405084",
"0.7405084",
"0.73141116",
"0.7211365",
"0.72071266",
"0.7193043",
"0.7173769",
"0.717075",
"0.7148977",
"0.7107203",
"0.7092842",
"0.7091419",
"0.70621437",
"0.70617074",
"0.7044166",
"0.70387816",
"0.70387816",
"0.70387816",
"0.70387816",
"0.70387816",
"0.70387816",
"0.70352036",
"0.703273",
"0.7030504",
"0.70249385",
"0.70249385",
"0.70249385",
"0.70082086",
"0.6987941",
"0.6985489",
"0.69712794",
"0.69579744",
"0.6944598",
"0.69298106",
"0.69257057",
"0.6925217",
"0.6922065",
"0.6902597",
"0.6866069",
"0.68570995",
"0.68562335",
"0.68562335",
"0.68562335",
"0.68562335",
"0.68562335",
"0.68562335",
"0.68562335",
"0.68562335",
"0.68562335",
"0.68562335",
"0.68562335",
"0.68562335",
"0.68562335",
"0.68562335",
"0.68562335",
"0.68562335",
"0.6853026",
"0.68506783",
"0.68446475",
"0.6822338",
"0.6822338",
"0.6785652",
"0.6784934",
"0.677392",
"0.6764981",
"0.6755813",
"0.67417616",
"0.67409456",
"0.6737032",
"0.6729894",
"0.67297035",
"0.67297035",
"0.67202526",
"0.6697612",
"0.6659956",
"0.6627435",
"0.66083825",
"0.66083825",
"0.660537",
"0.6602863",
"0.6602863",
"0.659613",
"0.65957147",
"0.65907604",
"0.6577516",
"0.65743077",
"0.6573426",
"0.6573349",
"0.6548151",
"0.65458965",
"0.6542146"
]
| 0.67414284 | 76 |
this function to get password | public int getPassword() {
return password;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"public java.lang.String getPassword();",
"String getUserPassword();",
"public String getPassword();",
"public String getPassword();",
"String password();",
"Password getPsw();",
"String getTemporaryPassword();",
"public String getPassword()\r\n/* 21: */ {\r\n/* 22:38 */ return this.password;\r\n/* 23: */ }",
"private char[] getPass()\n {\n return password.getPassword();\n }",
"java.lang.String getPasswd();",
"public char[] getPassword();",
"java.lang.String getPwd();",
"java.lang.String getPass();",
"java.lang.String getPass();",
"String getPass();",
"public String getPassword() {\r\n \t\treturn properties.getProperty(KEY_PASSWORD);\r\n \t}",
"public abstract String getPassword() throws DataServiceException;",
"public String Password()// method for getting the password given by user\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tSystem.out.println(\"enter password: \");\n\t\tString password = sc.next();\n\n\t\treturn password;\n\t}",
"public String getPassword() {\r\n\t\t// Get the password\r\n\t\tchar []code = password.getPassword();\r\n\t\t\r\n\t\t// Make the password string\r\n\t\tString password = \"\";\r\n\t\t\r\n\t\t// convert the char[] to string\r\n\t\tfor (char c: code){\r\n\t\t\tpassword += c;\r\n\t\t}\r\n\t\t\r\n\t\t// Return the password string\r\n\t\treturn password;\r\n\t}",
"private String getPasswordFromUser() {\n JPasswordField passField = new JPasswordField(10);\n int action = JOptionPane.showConfirmDialog(null, passField, \"Please enter your password:\", JOptionPane.OK_CANCEL_OPTION);\n\n if (action < 0) {\n System.exit(0);\n }\n\n __logger.info(\"Got password from user\");\n\n return new String(passField.getPassword());\n }",
"private String extractPassword() {\n return SwingUtil.extract(passwordJPasswordField, Boolean.TRUE);\n }",
"public String getPassword() {return password;}",
"public String getPassword() {\n\treturn strPasswd;\n }",
"@Override\n\tpublic String getPass() {\n\t\treturn password;\n\t}",
"public String getPassword() {\n return txtPassword().getText();\n }",
"public String getPassword(){\n \treturn password;\n }",
"public String getPassword() throws RemoteException;",
"private String getPassword() {\n\t\tif (null == password || password.isBlank() || password.isEmpty()) {\n\t\t\tConsole cons;\n\t\t\tchar[] passwd = null;\n\t\t\tif ((cons = System.console()) != null) {\n\t\t\t\tpasswd = cons.readPassword(\"[%s]\", \"Password : \");\n\t\t\t\tpassword = Arrays.toString(passwd);\n\t\t\t} else {\n\t\t\t\tSystem.err.println(\"Console not found\");\n\t\t\t\tpassword = getProperty(\"password\");\n\t\t\t}\n\t\t}\n\t\treturn password;\n\t}",
"String getNewPassword();",
"public String getPassword(){\n return password;\n\t}",
"public String get_password()\r\n\t{\r\n\t\treturn this.password;\r\n\t}",
"public String getPassword()\r\n {\r\n return password;\r\n }",
"public String getPassword()\r\n {\r\n return password;\r\n }",
"public String getPassword()\n \t{\n \t\treturn password;\n \t}",
"public String getPassword() {\n return (String) getObject(\"password\");\n }",
"public String getPassWord() {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\treturn sharedPreferences.getString(\"PASSWORD\", null);\n\t}",
"public String getPassword()\r\n {\r\n return password;\r\n }",
"public String getPassword()\n {\n return _password;\n }",
"public static String getPassword()\n\t{\n\t\tScanner kb = new Scanner(System.in);\n\n\t\tp(\"Guideline for password:\");\n\t\tp(\"The password should be at least six characters long.\");\n\t\tp(\"The password should contain at least one uppercase and at least one lowercase letter.\");\n\t\tp(\"The password should have at least one digit.\");\n\t\tp(\"Enter a password:\");\n\t\treturn kb.nextLine();\n\t}",
"public String getPassword()\n {\n return password;\n }",
"public String getPassword()\n {\n return password;\n }",
"public String getPassword()\n {\n return _password;\n }",
"com.google.protobuf.ByteString\n getPasswordBytes();",
"com.google.protobuf.ByteString\n getPasswordBytes();",
"public String getPassword() {\n return password;\r\n }",
"public String getPassword() { \n return this.password; \n }",
"@Override public String getPassword()\r\n {\r\n return password;\r\n }",
"public String getPassword(){\r\n\t\ttry {\r\n\t\t\treturn this.workerobj.getString(WorkerController.PASSWORD);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public java.lang.String getSpPassword(){\r\n return localSpPassword;\r\n }",
"public String getPassword()\n {\n return password;\n }",
"public String getPassword()\n {\n return password;\n }",
"public String getPassword() {\n return instance.getPassword();\n }",
"public String getPassword() {\n return instance.getPassword();\n }",
"@Override\n\tpublic String getPassword() {\n\t\treturn user.getUserPwd();\n\t}",
"private String getPassword(){\n System.out.println(\"Enter the Password Minimum Of 8 Charters\");\n return sc.next();\n }",
"public String getPassword(){\r\n\t\treturn password;\r\n\t}",
"public int getPassword(){\n return password;\r\n }",
"com.google.protobuf.ByteString\n getPasswordBytes();",
"public String getPassword()\n {\n return this.password;\n }",
"private String getPasswordFor(String name) {\n return new StringBuilder().append(PASSWORD_FOR).append(\" '\").append(name).append(\"': \").toString();\n }",
"public String getPassword() {\n \t\treturn password;\n \t}",
"public String getPassword(){\n\t\treturn this.password;\n\t}",
"public String getPassword(){\n return this.password;\n }",
"public String getaPassword() {\n return aPassword;\n }",
"public String getPassword() {\r\n return password;\r\n }",
"@Override\n public String getPassword() {\n return password;\n }",
"@Override\n\tpublic String getPassword() {\n\t\treturn user.getPassword();\n\t}",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\n\t\treturn String.valueOf(password.getPassword());\n\t}",
"public java.lang.String getPassword () {\r\n\t\treturn password;\r\n\t}",
"public String getPassword() {\n\treturn password;\n}",
"public String getPassword() {\r\n return this.password;\r\n }",
"public String returnPassword() {\n\t\treturn this.registration_password.getAttribute(\"value\");\r\n\t}",
"public java.lang.String getPassword() {\n java.lang.Object ref = password_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n password_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }"
]
| [
"0.88998705",
"0.88998705",
"0.88998705",
"0.88998705",
"0.88998705",
"0.88998705",
"0.88998705",
"0.86998236",
"0.86998236",
"0.86998236",
"0.86998236",
"0.86998236",
"0.86998236",
"0.86998236",
"0.86998236",
"0.86998236",
"0.8552063",
"0.852213",
"0.8349757",
"0.8349757",
"0.82695013",
"0.8151402",
"0.79998446",
"0.79842454",
"0.79665923",
"0.7943271",
"0.79394865",
"0.78694385",
"0.7852727",
"0.7852727",
"0.78359306",
"0.7774625",
"0.7737045",
"0.7735489",
"0.7721156",
"0.7691622",
"0.7656059",
"0.7650352",
"0.76429033",
"0.76263815",
"0.7608057",
"0.7584579",
"0.75805724",
"0.75798887",
"0.7578876",
"0.75786185",
"0.75742984",
"0.75660837",
"0.75590247",
"0.75417453",
"0.74972194",
"0.7484935",
"0.7483253",
"0.746731",
"0.74669653",
"0.7453363",
"0.7453363",
"0.74511534",
"0.7445241",
"0.7445241",
"0.7435606",
"0.7424844",
"0.7422583",
"0.74216545",
"0.7411636",
"0.7409194",
"0.7409194",
"0.74058354",
"0.74058354",
"0.7395842",
"0.7393113",
"0.73910785",
"0.73904836",
"0.737301",
"0.73728776",
"0.73657495",
"0.7360645",
"0.7357946",
"0.735552",
"0.7350675",
"0.7349633",
"0.7346557",
"0.73431927",
"0.733693",
"0.733693",
"0.733693",
"0.733693",
"0.733693",
"0.733693",
"0.733693",
"0.733693",
"0.733693",
"0.733693",
"0.733693",
"0.73286605",
"0.7326384",
"0.7316329",
"0.7315572",
"0.7313095",
"0.73109794"
]
| 0.7312391 | 99 |
Created by sreelal on 22/1/18. | public interface MvpView {
void SnakBarId(int msg);
void SnakBarString(String msg);
void SnakBarStringSucc(String msg);
void SnakBarStringFail(String msg);
void progresShow(boolean load);
void progresCancel(boolean cancel);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tprotected void interr() {\n\t}",
"private void m50366E() {\n }",
"private void poetries() {\n\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public void method_4270() {}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"@Override\r\n\tpublic void init() {}",
"public void mo4359a() {\n }",
"@Override\n public void init() {}",
"@Override\n protected void init() {\n }",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n void init() {\n }",
"private void init() {\n\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"public void m23075a() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"public abstract void mo70713b();",
"@Override\n protected void getExras() {\n }",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"private void strin() {\n\n\t}",
"private void m50367F() {\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"public void mo12628c() {\n }",
"public void mo21877s() {\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void mo21779D() {\n }",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}"
]
| [
"0.60419065",
"0.5913406",
"0.5896843",
"0.5865577",
"0.58566004",
"0.5843134",
"0.57946277",
"0.57946277",
"0.57764655",
"0.5757907",
"0.57373303",
"0.5709392",
"0.56995445",
"0.56951666",
"0.5689013",
"0.56792915",
"0.56752527",
"0.56618524",
"0.56520075",
"0.56520075",
"0.56520075",
"0.56520075",
"0.56520075",
"0.5646596",
"0.5639517",
"0.5629387",
"0.562913",
"0.56050885",
"0.55998707",
"0.5583857",
"0.5582405",
"0.556615",
"0.5558166",
"0.55529594",
"0.5547799",
"0.55297595",
"0.5524631",
"0.55228686",
"0.55203456",
"0.5508869",
"0.5506737",
"0.5506737",
"0.54895884",
"0.54884094",
"0.54839087",
"0.54796255",
"0.5476961",
"0.54693204",
"0.54672235",
"0.54661375",
"0.54661375",
"0.54661375",
"0.54635406",
"0.54635406",
"0.54635406",
"0.54570574",
"0.5456667",
"0.5449149",
"0.5449149",
"0.5449149",
"0.5448605",
"0.54334444",
"0.54307425",
"0.54288644",
"0.5427702",
"0.5426222",
"0.5426222",
"0.5419935",
"0.5416104",
"0.54049927",
"0.53963685",
"0.5395544",
"0.5395544",
"0.5395544",
"0.5395544",
"0.5395544",
"0.5395544",
"0.5388699",
"0.53857374",
"0.5384333",
"0.5383536",
"0.5383536",
"0.5383536",
"0.5383536",
"0.5383536",
"0.5383536",
"0.5383536",
"0.53788054",
"0.53782487",
"0.53757954",
"0.5374558",
"0.5364112",
"0.5357377",
"0.5352659",
"0.53501004",
"0.53306055",
"0.5327454",
"0.5327281",
"0.5322505",
"0.53179055",
"0.53179055"
]
| 0.0 | -1 |
convert a stack trace to a String so it can be serialized | static public String generateStackTraceString(Throwable t) {
StringWriter s = new StringWriter();
t.printStackTrace(new PrintWriter(s));
return s.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String stackTraceToString( Throwable t ){\n StringWriter writer = new StringWriter();\n PrintWriter printWriter = new PrintWriter( writer );\n t.printStackTrace( printWriter );\n printWriter.flush();\n return writer.toString();\n }",
"String stacktraceToString(Throwable t) {\r\n\t\tStringWriter sw = new StringWriter();\r\n\t\tPrintWriter out = new PrintWriter(sw);\r\n\t\tt.printStackTrace(out);\r\n\t\tout.flush();\r\n\t\treturn sw.toString();\r\n\t}",
"public static String convertStackTrace(Exception e) {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n e.printStackTrace(pw);\n return sw.toString();\n }",
"String exceptionToStackTrace( Exception e ) {\n StringWriter stringWriter = new StringWriter();\n PrintWriter printWriter = new PrintWriter(stringWriter);\n e.printStackTrace( printWriter );\n return stringWriter.toString();\n }",
"public String throwableToString(Throwable throwable) {\n if (throwable == null) return \"\";\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n throwable.printStackTrace(pw);\n String stackTrace = sw.toString();\n\n return stackTrace;\n }",
"private String getStacktraceFromException(Exception e) {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tPrintStream ps = new PrintStream(baos);\n\t\te.printStackTrace(ps);\n\t\tps.close();\n\t\treturn baos.toString();\n\t}",
"public String getStackTraceString(Throwable tr) {\n if (tr == null) {\n return \"\";\n }\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n tr.printStackTrace(pw);\n return sw.toString();\n }",
"public static String getStackTraceAsString(Exception ex)\n {\n StringWriter errors = new StringWriter();\n ex.printStackTrace(new PrintWriter(errors));\n return errors.toString();\n }",
"public static String stackTrace(Exception exception) {\n\t\tStringWriter writer = new StringWriter();\n\t\tPrintWriter printWriter = new PrintWriter(writer);\n\t\texception.printStackTrace(printWriter);\n\t\tprintWriter.flush();\n\n\t\tString stackTrace = writer.toString();\n\t\treturn stackTrace;\n\t}",
"public String getStackTraceString() {\r\n\t\t// if there's no nested exception, there's no stackTrace\r\n\t\tif (nestedException_ == null)\r\n\t\t\treturn null;\r\n\r\n\t\tStringBuffer traceBuffer = new StringBuffer();\r\n\r\n\t\tif (nestedException_ instanceof WebAppException) {\r\n\r\n\t\t\ttraceBuffer.append(((WebAppException) nestedException_)\r\n\t\t\t\t\t.getStackTraceString());\r\n\t\t\ttraceBuffer.append(\"-------- nested by:\\n\");\r\n\t\t}\r\n\r\n\t\ttraceBuffer.append(stackTraceString_);\r\n\t\treturn traceBuffer.toString();\r\n\t}",
"public static String getStackTraceAsString(Throwable t) {\n Writer result = new StringWriter();\n PrintWriter printWriter = new PrintWriter(result);\n t.printStackTrace(printWriter);\n return result.toString();\n }",
"public static String getStackMessage(Throwable exception) {\n\t\tStringWriter sw = new StringWriter();\n\t\tPrintWriter pw = new PrintWriter(sw);\n\t\tpw.print(\" [ \");\n\t\tpw.print(exception.getClass().getName());\n\t\tpw.print(\" ] \");\n\t\texception.printStackTrace(pw);\n\t\treturn sw.toString();\n\t}",
"static public String getStackTrace(Exception e) {\n java.io.StringWriter s = new java.io.StringWriter(); \n e.printStackTrace(new java.io.PrintWriter(s));\n String trace = s.toString();\n \n if(trace==null || trace.length()==0 || trace.equals(\"null\"))\n return e.toString();\n else\n return trace;\n }",
"private String getStackTrace(Exception ex) {\r\n\t\tStringWriter sw = new StringWriter();\r\n\t\tex.printStackTrace(new PrintWriter(sw));\r\n return sw.toString();\r\n\t}",
"public static String getPrintStackTraceAsString(Throwable e) {\n\t\tStringWriter sw = new StringWriter();\n\t\te.printStackTrace(new PrintWriter(sw));\n\t\treturn sw.toString();\n\t}",
"public static String getStackTraceString(Throwable tr) {\n if (tr == null) {\n return \"\";\n }\n\n // This is to reduce the amount of log spew that apps do in the non-error\n // condition of the network being unavailable.\n Throwable t = tr;\n while (t != null) {\n if (t instanceof UnknownHostException) {\n return \"\";\n }\n t = t.getCause();\n }\n\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n tr.printStackTrace(pw);\n pw.flush();\n return sw.toString();\n }",
"public static String getExceptionStackTrace(Exception exception) {\n final StringBuilder sb = new StringBuilder(1024);\n sb.append(exception.getMessage());\n sb.append(\"\\n\");\n try (StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw)) {\n exception.printStackTrace(pw);\n sb.append(sw.toString());\n } catch (Exception e) {\n LOGGER.error(\"Exception while converting exception's stack trace to string!\\n{}\",\n e.getMessage());\n }\n return sb.toString();\n }",
"public String stackTraceToString(DataBaseFailException dbf) {\n\t\tString stackTrace = Arrays.toString(dbf.getStackTrace());\n\t\tstackTrace = stackTrace.replace(\",\", \"\\n\");\n\t\treturn stackTrace;\n\t}",
"public static String getStackTrace(Throwable t) {\n StringWriter sw = new StringWriter();\n t.printStackTrace(new PrintWriter(sw));\n String stackTrace = sw.toString();\n stackTrace = stackTrace.replaceAll(\"<\", \"<\");\n stackTrace = stackTrace.replaceAll(\">\", \">\");\n\n return stackTrace;\n }",
"public static String getStackTrace(final Exception ex)\n\t{\n\t\tfinal StringWriter sw = new StringWriter();\n\t\tfinal PrintWriter pw = new PrintWriter(sw, true);\n\t\tex.printStackTrace(pw);\n\t\tpw.flush();\n\t\tsw.flush();\n\t\treturn sw.toString();\n\t}",
"private static String stackTraceToString(final Exception exception) {\n StringBuilder buf = new StringBuilder();\n\n for (Throwable cause = exception; cause != null; cause = cause.getCause()) {\n buf.append(\"Caused by: \");\n buf.append(cause.getMessage());\n buf.append('\\n');\n for (StackTraceElement element : cause.getStackTrace()) {\n buf.append(element.toString());\n buf.append('\\n');\n }\n buf.append('\\n');\n }\n\n return buf.toString();\n }",
"String getLogStackTrace();",
"private String getStackTrace(Throwable throwable) {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n throwable.printStackTrace(pw);\n return sw.toString();\n }",
"public static String getStackTrace(Exception aInException) {\n\n StringWriter lStringWriter = new StringWriter();\n aInException.printStackTrace(new PrintWriter(lStringWriter));\n return lStringWriter.toString();\n\n }",
"public static String getStackTrace( Throwable exception ) {\r\n\t\tStringWriter sw = new StringWriter();\r\n\t\tPrintWriter pw = new PrintWriter( sw );\r\n\t\texception.printStackTrace( pw );\r\n\t\treturn sw.toString();\r\n\t}",
"private String toString(final Throwable throwable) {\n final StringWriter writer = new StringWriter();\n final PrintWriter printer = new PrintWriter(writer);\n throwable.printStackTrace(printer);\n return writer.toString();\n }",
"public static String getStackTrace(Throwable t) {\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n PrintStream ps = new PrintStream(os);\n t.printStackTrace(ps);\n return os.toString();\n }",
"public static String getPrintStackTrace(Exception e){\n\t\tStringWriter sw = new StringWriter();\n\t\t//PrintWriter integrates with StringWriter\n\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t//This line used to write in catch block then it will writes in the console prints upon the console\n\t\t//Basically prints the data upon the console\n\t\te.printStackTrace(pw);\n\t\t//it will converts to tostring method into some meaningful data\n\t\treturn sw.toString();\n\t}",
"static String handleStackTrace(Throwable ex){\n // add the stack trace message\n StringBuilder builder = new StringBuilder(SPACE);\n builder.append(ex.getMessage());\n builder.append(NEWLINE);\n\n // add each line of the stack trace.\n for (StackTraceElement element : ex.getStackTrace()){\n builder.append(SPACE);\n builder.append(element.toString());\n builder.append(NEWLINE);\n }\n return builder.toString();\n }",
"public String getExceptionString(Exception e) {\n StringBuffer sb = new StringBuffer();\n int icount = 0;\n try {\n\n sb.append(\"Exception : \");\n for (int i = e.getStackTrace().length - 1; i >= 0; i--) {\n sb.append(e.getStackTrace()[i].getClassName());\n sb.append(\".\");\n sb.append(e.getStackTrace()[i].getMethodName());\n sb.append(\" at Line \");\n sb.append(e.getStackTrace()[i].getLineNumber());\n sb.append(\" : \");\n }\n sb.append(e.getMessage().toUpperCase().replaceAll(\"JAVA.LANG.\", \"\"));\n\n return sb.toString();\n } catch (Exception e1) {\n return (e.toString() + \" : \" + e1.toString());\n }\n }",
"public static String getStackTrace(Throwable t) {\n String stackTrace = null;\n try {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n t.printStackTrace(pw);\n pw.close();\n sw.close();\n stackTrace = sw.getBuffer().toString();\n } catch (Exception ex) {\n }\n return stackTrace;\n }",
"public static String toString(final Throwable throwable)\n\t{\n\t\tif (throwable != null)\n\t\t{\n\t\t\tArrayList<Throwable> al = new ArrayList<Throwable>();\n\t\t\tThrowable cause = throwable;\n\t\t\tal.add(cause);\n\t\t\twhile (cause.getCause() != null && cause != cause.getCause())\n\t\t\t{\n\t\t\t\tcause = cause.getCause();\n\t\t\t\tal.add(cause);\n\t\t\t}\n\n\t\t\tAppendingStringBuffer sb = new AppendingStringBuffer(256);\n\t\t\t// first print the last cause\n\t\t\tint length = al.size() - 1;\n\t\t\tcause = al.get(length);\n\t\t\tif (throwable instanceof WicketRuntimeException)\n\t\t\t{\n\t\t\t\tsb.append(\"WicketMessage: \");\n\t\t\t\tsb.append(throwable.getMessage());\n\t\t\t\tsb.append(\"\\n\\n\");\n\t\t\t}\n\t\t\tsb.append(\"Root cause:\\n\\n\");\n\t\t\toutputThrowable(cause, sb, false);\n\n\t\t\tif (length > 0)\n\t\t\t{\n\t\t\t\tsb.append(\"\\n\\nComplete stack:\\n\\n\");\n\t\t\t\tfor (int i = 0; i < length; i++)\n\t\t\t\t{\n\t\t\t\t\toutputThrowable(al.get(i), sb, true);\n\t\t\t\t\tsb.append(\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"<Null Throwable>\";\n\t\t}\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\tString stackString = \"\";\r\n\t\tfor (T e: stack) {\r\n\t\t\tstackString = stackString +e;\r\n\t\t}\r\n\t\treturn stackString;\r\n}",
"public static String getStackTrace(Throwable throwable)\n {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter( sw, true );\n throwable.printStackTrace( pw );\n return sw.getBuffer().toString();\n }",
"public String getOriginalStackTrace() {\n StringBuilder builder = new StringBuilder();\n\n builder.append(this.firstLine).append(\"\\n\");\n for (StackTraceElement element : stackTraceLines) {\n builder.append(\"\\tat \").append(element).append(\"\\n\");\n }\n\n return builder.substring(0, builder.length() - 1);\n }",
"public static String getStackTrace(final Throwable throwable) {\n final StringWriter sw = new StringWriter();\n final PrintWriter pw = new PrintWriter(sw, true);\n throwable.printStackTrace(pw);\n return sw.getBuffer().toString();\n }",
"public static String getStackTrace(final Throwable throwable) {\n final StringWriter sw = new StringWriter();\n final PrintWriter pw = new PrintWriter(sw, true);\n throwable.printStackTrace(pw);\n return sw.getBuffer().toString();\n }",
"private String stackObjToString(Object o)\n {\n if (o instanceof byte[])\n return BtcUtil.hexOut((byte[]) o);\n else\n return o.toString();\n }",
"public final String getTraceString() throws StandardException {\n // Check if the value is SQL NULL.\n if (isNull()) {\n return \"NULL\";\n }\n\n // Check if we have a stream.\n if (hasStream()) {\n return (getTypeName() + \"(\" + getStream().toString() + \")\");\n }\n\n return (getTypeName() + \":Length=\" + getLength());\n }",
"public static String getStackTrace() {\n Exception e = new Exception();\n return getStackTrace(e);\n }",
"public String toString(int stack) {\n\t\tString stkStr = \"\";\n\t\tint start = stack * stackSize;\n\t\tfor (int i = start; i < start + stackPointer[stack]; i++) {\n\t\t\tstkStr += buffer[i] + \" -> \";\n\t\t}\n\t\tstkStr += \"END\";\n\t\treturn stkStr;\n\t}",
"public static String getStackTrace(final Throwable lThrowable) {\n final StringWriter sw = new StringWriter();\n final PrintWriter pw = new PrintWriter(sw, true);\n lThrowable.printStackTrace(pw);\n return sw.getBuffer().toString();\n }",
"public String toString ()\n {\n if (exception != null) {\n return exception.toString();\n } else {\n return super.toString();\n }\n }",
"protected String getStackTrace( final Throwable throwable, final String format )\n {\n if( null == throwable )\n {\n return \"\";\n }\n return ExceptionUtil.printStackTrace( throwable, m_stackDepth, m_printCascading );\n }",
"public static String toString(final Throwable throwable) {\n StringWriter w = new StringWriter();\n try (PrintWriter p = new PrintWriter(w)) {\n throwable.printStackTrace(p);\n }\n return w.toString();\n }",
"protected String createExceptionDataString(Throwable t) {\n StringBuilder exceptionData = new StringBuilder();\n exceptionData.append(\"<dl class=\\\"dl-horizontal\\\">\");\n exceptionData.append(createDescription(\"Cause\", t.toString()));\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n t.printStackTrace(pw);\n exceptionData.append(createDescription(\"Stacktrace\", sw.toString()));\n exceptionData.append(\"</dl>\");\n return exceptionData.toString();\n }",
"public String dump() {\n String result = \"\";\n Iterator stackIt = framePointers.iterator();\n int frameEnd;\n int old;\n int pos = 0;\n frameEnd = (int)stackIt.next();\n if(stackIt.hasNext()) {\n frameEnd = (int)stackIt.next();\n }\n else {\n frameEnd = -1;\n }\n while(pos < runStack.size()) {\n result += \"[\";\n if(frameEnd == -1) {\n while(pos < runStack.size()-1) {\n result += runStack.get(pos) + \",\";\n pos++;\n }\n result += runStack.get(pos)+\"] \";\n pos++;\n }\n else {\n while(pos < frameEnd-1) {\n result += runStack.get(pos) + \",\";\n pos++;\n }\n if(pos < frameEnd){\n result += runStack.get(pos);\n pos++;\n }\n result += \"]\";\n }\n if(stackIt.hasNext()) {\n frameEnd = (int)stackIt.next();\n }\n else {\n frameEnd = -1;\n }\n }\n return result;\n }",
"public static String getIdentedStackTraceString(List<StackTraceElement> stackTrace, Locale locale)\n {\n StringBuilder sb = new StringBuilder();\n for (StackTraceElement e : stackTrace)\n {\n if (sb.length() > 0)\n {\n sb.append('\\n');\n }\n String message = InternationalizationUtilities.MESSAGE_REPOSITORY.getFormattedMessage(locale,\n \"bsj.string.stackTrace.element\", Arrays.<Object> asList(e.toString()),\n Collections.singletonMap(\"element\", 1));\n sb.append(message);\n }\n return sb.toString();\n }",
"public String toString() {\r\n\t\tStringBuilder sb = new StringBuilder(\"(\");\r\n\t\tfor (int j = t; j >= 0; j--) {\r\n\t\t\tsb.append(stack[j]);\r\n\t\t\tif (j > 0)\r\n\t\t\t\tsb.append(\", \");\r\n\t\t}\r\n\t\tsb.append(\")\");\r\n\t\treturn sb.toString();\r\n\t}",
"public static String write(WorkflowTrace trace) throws JAXBException, IOException {\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n WorkflowTraceSerializer.write(bos, trace);\n return new String(bos.toByteArray(), \"UTF-8\");\n }",
"public java.lang.String toDebugString () { throw new RuntimeException(); }",
"private static String getNormalizedStackTrace(Throwable throwable, String... arguments) {\n var sw = new StringWriter();\n var pw = new PrintWriter(sw);\n throwable.printStackTrace(pw);\n String newStValue = sw.toString().replace('|', '!').replace(\"\\n\", \" - \");\n int curSize = arguments == null ? 0 : arguments.length;\n var newArgument = new StringBuilder();\n for (var i = 0; i < curSize; i++) {\n newArgument.append(arguments[i]);\n newArgument.append(\":\");\n }\n newArgument.append(newStValue);\n return newArgument.toString();\n }",
"public String getThrowInfo() {\n if (null == throwable) {\n return throwText;\n }\n // return from throwable;\n StringBuffer sb = new StringBuffer();\n StackTraceElement[] stackArray = throwable.getStackTrace();\n for (int i = 0; i < stackArray.length; ++i) {\n StackTraceElement element = stackArray[i];\n sb.append(element.toString() + \"\\n\");\n }\n return sb.toString();\n }",
"public String getTraceContextString() {\n Map<String, String> traceInfo = getTraceContext();\n if (traceInfo == null) {\n DDLogger.getLoggerImpl().debug(\"No Trace/Log correlation IDs returned\");\n return \"\";\n }\n\n String traceID = traceInfo.get(this.tracing.TRACE_ID_KEY);\n String spanID = traceInfo.get(this.tracing.SPAN_ID_KEY);\n return formatTraceContext(this.tracing.TRACE_ID_KEY, traceID, this.tracing.SPAN_ID_KEY, spanID);\n }",
"public String toString() {\n\t\tString ss = super.toString();\n\t\tss = ss.replace(\"GenericStackLimitedCapcity\", \"GenericStack\");\n\t\treturn ss;\n\t}",
"public static String toString(final Throwable throwable)\n\t{\n\t\tif (throwable != null)\n\t\t{\n\t\t\tfinal StringWriter stringWriter = new StringWriter();\n\t\t\tthrowable.printStackTrace(new PrintWriter(stringWriter));\n\t\t\treturn Strings.replaceAll(stringWriter.toString(), \"\\t\", \" \");\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"<Null Throwable>\";\n\t\t}\n\t}",
"@Override\n public String toString() {\n \tString retString = \"Stack[\";\n \tfor(int i = 0; i < stack.size() - 1; i++) // append elements up to the second to last onto the return string\n \t\tretString += stack.get(i) + \", \";\n \tif(stack.size() > 0)\n \t\tretString += stack.get(stack.size() - 1); // append final element with out a comma after it\n \tretString += \"]\";\n \treturn retString;\n }",
"public final String toString() {\r\n final String result = String.format(\r\n \"%s(%d,%d,%d): %s\", this.source, this.line, this.start, this.end, this.message\r\n );\r\n\r\n return result.replaceAll(\"<unknown>\", \"\");\r\n }",
"public static String printStackTrace() {\n StringBuilder sb = new StringBuilder();\n StackTraceElement[] trace = Thread.currentThread().getStackTrace();\n for (StackTraceElement traceElement : trace) {\n sb.append(\"\\t \").append(traceElement);\n sb.append(System.lineSeparator());\n }\n return sb.toString();\n }",
"String serialize(PushEventSource eventSource);",
"static String frameToString(RecordedFrame frame, boolean lineNumbers) {\n StringBuilder builder = new StringBuilder();\n RecordedMethod method = frame.getMethod();\n RecordedClass clazz = method.getType();\n if (clazz == null) {\n builder.append(\"<<\");\n builder.append(frame.getType());\n builder.append(\">>\");\n } else {\n builder.append(clazz.getName());\n }\n builder.append(\"#\");\n builder.append(method.getName());\n builder.append(\"()\");\n if (lineNumbers) {\n builder.append(\":\");\n if (frame.getLineNumber() == -1) {\n builder.append(\"(\" + frame.getType() + \" code)\");\n } else {\n builder.append(frame.getLineNumber());\n }\n }\n return builder.toString();\n }",
"@NonNull\n public String getStackTrace() {\n return requireNonNull(mStackTrace);\n }",
"public static String writeStackToString (ItemStack stack) {\n \n return stack.getItem().getRegistryName().toString() + \"#\" + stack.getItemDamage();\n }",
"public interface StackTrace {\r\n\r\n\t /**\r\n\t * Gets the class from which the stack is tracking.\r\n\t * \r\n\t * @return\t\t\tThe name of the class\r\n\t */\r\n public String getClazz();\r\n\r\n /**\r\n * Sets the class from which the stack should tracking.\r\n * \r\n * @param clazz\tThe name of the class\r\n */\r\n public void setClazz(String clazz);\r\n\r\n /**\r\n * Gets the current message from the StackTrace.\r\n * \r\n * @return\t\t\tThe message\r\n */\r\n public String getMessage();\r\n\r\n /**\r\n * Sets a message to the StackTrace.\r\n * \r\n * @param message\tThe message\r\n */\r\n public void setMessage(String message);\r\n\r\n /**\r\n * Gets the current stack.\r\n * \r\n * @return\t\t\tThe current stack\r\n */\r\n public String getStack();\r\n\r\n /**\r\n * Sets the current stack.\r\n * \r\n * @param stack\tThe new stack\r\n */\r\n public void setStack(String stack);\r\n}",
"public static String getExceptionInfo(Exception exception)\n {\n return String.format(\"%s ; %s\", exception.toString(), exception.getStackTrace()[0].toString());\n }",
"public static String convertError(Throwable error) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"<font color=\\\"red\\\">\");\n for (StackTraceElement element : error.getStackTrace()) {\n sb.append(element.toString());\n sb.append(\"<br>\");\n }\n sb.append(\"</font>\");\n\n return sb.toString();\n }",
"public static String currentStack()\n {\n StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();\n StringBuilder sb = new StringBuilder(500);\n for (StackTraceElement ste : stackTrace)\n {\n sb.append(\" \").append(ste.getClassName()).append(\"#\").append(ste.getMethodName()).append(\":\").append(ste.getLineNumber()).append('\\n');\n }\n return sb.toString();\n }",
"public interface CommonUtils {\n\tpublic static String getPrintStackTrace(Exception e){\n\t\t//StringWriter writes upon the string\n\t\tStringWriter sw = new StringWriter();\n\t\t//PrintWriter integrates with StringWriter\n\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t//This line used to write in catch block then it will writes in the console prints upon the console\n\t\t//Basically prints the data upon the console\n\t\te.printStackTrace(pw);\n\t\t//it will converts to tostring method into some meaningful data\n\t\treturn sw.toString();\n\t}\n}",
"public String getSuppressedStackTrace() {\n final ThrowableProxy[] suppressed = getSuppressedProxies();\n if (suppressed == null || suppressed.length == 0) {\n return \"\";\n }\n final StringBuilder sb = new StringBuilder(\"Suppressed Stack Trace Elements:\\n\");\n for (final ThrowableProxy proxy : suppressed) {\n sb.append(proxy.getExtendedStackTrace());\n }\n return sb.toString();\n }",
"private void printStackTrace(Exception ex, GUILog gl) {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n ex.printStackTrace(pw);\n gl.log(sw.toString()); // stack trace as a string\n ex.printStackTrace();\n }",
"public String toString()\r\n {\r\n return e.toString();\r\n }",
"public String toString()\r\n {\r\n String result = \"\";\r\n \r\n for (int index=0; index < top; index++) \r\n result = result + stack[index].toString() + \"\\n\";\r\n \r\n return result;\r\n }",
"static String getExtendedThrowableMessage(Throwable throwable) {\n StringBuilder messageBuilder = new StringBuilder();\n if (throwable == null) {\n return \"\";\n }\n messageBuilder.append(throwable.getClass().getName()).append(\": \");\n messageBuilder.append(throwable.getMessage());\n Throwable cause = throwable.getCause();\n while (cause != null) {\n if (!isDelimiter(messageBuilder.charAt(messageBuilder.length()-1))) {\n messageBuilder.append(\".\");\n }\n messageBuilder.append(\" Caused by \")\n .append(cause.getClass().getName())\n .append(\": \")\n .append(cause.getMessage());\n cause = cause.getCause();\n }\n return messageBuilder.toString();\n }",
"public String toString() {\n return (\"AgentException occurred with cause: \" + cause);\n }",
"public String getStack();",
"public static String oneLiner(Throwable thrown)\n {\n StackTraceElement[] stack = thrown.getStackTrace();\n String topOfStack = null;\n if (stack.length > 0)\n {\n topOfStack = String.valueOf(stack[0]);\n }\n return thrown.toString() + \" at \" + topOfStack;\n }",
"@Override\n public String toString() {\n return new ToStringBuilder(this)\n .append(\"faultCode\", faultCode)\n .append(\"faultString\", faultString)\n .toString();\n }",
"@Override\n\tpublic String toString() {\n\t\tString result = \"\";\n\t\t\n\t\tfor(int i = 0; i < top; i++) {\n\t\t\tresult = result + stack[i].toString() + \"\\n\";\t//shouldn't it start at max --> 0 since its a stack\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public String getTrace() throws RemoteException;",
"String dump(Stack<Context> contexts) {\r\n\t\tStringBuilder s = new StringBuilder(\"\");\r\n\t\tfor (Context context : contexts) \r\n\t\t\ts.append(s.length() == 0 ? context.name() : \", \" + context.name());\r\n\t\treturn s.toString();\r\n\t}",
"void dumpTraceLine(String s)\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"[trace] \"); //$NON-NLS-1$\n\t\tsb.append(s);\n\t\tout(sb.toString());\n\t}",
"private static String getEventString(final JobLogEvent event)\n {\n if (event == null) {\n return \"NullJobEvent\";\n }\n final StringBuilder sb = new StringBuilder();\n if (event.getScheduler() != null) {\n sb.append(\" Scheduler=\").append(event.getScheduler()).append(\"\\n\");\n }\n // if (event.getRunner() != null) {\n // sb.append(\" Runner=\").append(event.getRunner()).append(\"\\n\");\n // }\n if (event.getJob() != null) {\n sb.append(\" Job=\").append(event.getJob()).append(\"\\n\");\n }\n if (event.getJobDefinition() != null) {\n sb.append(\" Definition=\").append(event.getJobDefinition()).append(\"\\n\");\n }\n if (event.getJobResult() != null) {\n sb.append(\" Result=\").append(event.getJobResult()).append(\"\\n\");\n }\n if (event.getJobStatus() != null) {\n sb.append(\" Status=\").append(event.getJobStatus()).append(\"\\n\");\n }\n return sb.toString();\n }",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();"
]
| [
"0.7681204",
"0.76693344",
"0.7413814",
"0.7093999",
"0.70766616",
"0.7061839",
"0.70200485",
"0.69938314",
"0.6958016",
"0.6924462",
"0.68860114",
"0.6857174",
"0.6819377",
"0.6782677",
"0.66981566",
"0.66895646",
"0.66638416",
"0.6660633",
"0.6606424",
"0.65919584",
"0.6583747",
"0.6551337",
"0.6490928",
"0.6489088",
"0.6468539",
"0.6450388",
"0.6413058",
"0.63929164",
"0.6344918",
"0.63364154",
"0.63348126",
"0.62544185",
"0.6214138",
"0.6156916",
"0.61498404",
"0.61305356",
"0.61305356",
"0.6128957",
"0.61024624",
"0.60423344",
"0.60221374",
"0.5999146",
"0.59779865",
"0.5953475",
"0.59432316",
"0.59154",
"0.5902093",
"0.58818144",
"0.58561957",
"0.58489513",
"0.58226323",
"0.58055544",
"0.5773215",
"0.57588774",
"0.5725096",
"0.5696402",
"0.56940305",
"0.5688857",
"0.56502026",
"0.5647027",
"0.5638687",
"0.5592913",
"0.55777735",
"0.5575206",
"0.554321",
"0.55315393",
"0.5528336",
"0.5508852",
"0.548734",
"0.5478635",
"0.5413005",
"0.5412196",
"0.5401999",
"0.53983647",
"0.5375164",
"0.5373569",
"0.53657216",
"0.5358085",
"0.53494924",
"0.5345102",
"0.53446275",
"0.5340015",
"0.532962",
"0.532962",
"0.532962",
"0.532962",
"0.532962",
"0.532962",
"0.532962",
"0.532962",
"0.532962",
"0.532962",
"0.532962",
"0.532962",
"0.532962",
"0.532962",
"0.532962",
"0.532962",
"0.532962",
"0.532962"
]
| 0.66818106 | 16 |
Additional constructor with msg | public WebAppException(String message) {
super(message);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Message(){\n this(\"Not Specified\",\"Not Specified\");\n }",
"public LCAmsg2 () { }",
"private Message(){\n // default constructor\n }",
"public Message(){}",
"public Message() {}",
"public Message() {}",
"public MessageInfo() { }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3) {\n/* 93 */ return new SimpleMessage(message);\n/* */ }",
"public Message() {\n }",
"public Message() {\n }",
"public CallMessage() {\n\t}",
"public Message() {\n }",
"public Message newMessage(String message, Object p0, Object p1) {\n/* 77 */ return new SimpleMessage(message);\n/* */ }",
"public Message newMessage(String message, Object p0) {\n/* 69 */ return new SimpleMessage(message);\n/* */ }",
"public SystemMessage() {\r\n\t}",
"public Message newMessage(String message, Object... params) {\n/* 61 */ return new SimpleMessage(message);\n/* */ }",
"public Message() {\n\t\tsuper();\n\t}",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4) {\n/* 101 */ return new SimpleMessage(message);\n/* */ }",
"public Message newMessage(String message, Object p0, Object p1, Object p2) {\n/* 85 */ return new SimpleMessage(message);\n/* */ }",
"private ComporMessageFormat() {\r\n }",
"private Messages() {\n\t}",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) {\n/* 109 */ return new SimpleMessage(message);\n/* */ }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n/* 145 */ return new SimpleMessage(message);\n/* */ }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) {\n/* 118 */ return new SimpleMessage(message);\n/* */ }",
"public FlowMonMessage(){}",
"public CryptoSchemeMsg () { }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) {\n/* 136 */ return new SimpleMessage(message);\n/* */ }",
"public ImMessage() {\r\n }",
"public MessageParseException() {\n }",
"public void testCtor2() {\n instance = new LogMessage(type, id, operator, message);\n\n assertEquals(\"'type' should be correct.\", type, instance.getType());\n assertEquals(\"'id' should be correct.\", id, instance.getId());\n assertEquals(\"'message' should be correct.\", message, instance.getMessage());\n assertNull(\"'error' should be correct.\", instance.getError());\n }",
"public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) {\n/* 127 */ return new SimpleMessage(message);\n/* */ }",
"public FeedbackMessages()\n\t{\n\t}",
"private Message(MessageType handle, String srcName, String text) {\n msgType = handle;\n // Save the properly formatted identifier for the user sending the\n // message.\n msgSender = srcName;\n // Save the text of the message.\n msgText = text;\n }",
"private Message(MessageType handle, String srcName) {\n this(handle, srcName, null);\n }",
"public messages() {\n }",
"protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }",
"public Animal(String message){\n name=\"Bob the Animal\";\n System.out.println(message);\n }",
"private StatusMessage() {\n\n\t}",
"private StatusMessage() {\n\n\t}",
"public MyException() {\n super(\"This is my message. There are many like it but this one is mine.\");\n }",
"public MessageTran() {\n\t}",
"public MassMsgFrame() {\n\t}",
"public Message(){\n\t\ttimeStamp = System.currentTimeMillis();\n\t}",
"private Message(MessageType handle) {\n this(handle, null, null);\n }",
"public Alarm_Msg(){ }",
"private Constructor getConstructor() throws Exception {\r\n return type.getConstructor(Contact.class, label, Format.class);\r\n }",
"public PromoMessages() {\n }",
"public ServiceMessage() {\r\n\t}",
"public ValidationMessage() {\n }",
"private SocketMessage() {\n initFields();\n }",
"public Message(long msg) {\n m_msg = msg;\n m_type = getType(msg);\n parseMessage();\n }",
"public void testCtor1() {\n instance = new LogMessage(type, id, operator, message, error);\n\n assertEquals(\"'type' should be correct.\", type, instance.getType());\n assertEquals(\"'id' should be correct.\", id, instance.getId());\n assertEquals(\"'message' should be correct.\", message, instance.getMessage());\n assertSame(\"'error' should be correct.\", error, instance.getError());\n }",
"public InvalidRequestMsg() {\n\n this(\"\");\n\n }",
"private DiagnosticMessageUtilities()\n {\n }",
"@Test\n public void testConstructorWithMessage()\n {\n final LoaderException e = new LoaderException(\"Custom message\");\n assertEquals(\"Custom message\", e.getMessage());\n }",
"public MessageRequest() {\n\t}",
"public SMSLibException(String errorMessage)\n/* 10: */ {\n/* 11:34 */ super(errorMessage);\n\n/* 12: */ }",
"public A() {\r\n\tSystem.out.println(messageA);\r\n\t}",
"public VocabularioIOException(String msg)\n {\n message = msg;\n }",
"public MessageRecord() {\n super(Message.MESSAGE);\n }",
"public MessageFactory(int type, int id){\n super(type, id);\n }",
"private HeartBeatMessage() {\n initFields();\n }",
"public ReplicateObjectMessageFactory() {\n super(null);\n }",
"public EventMessage(Event event)\r\n {\r\n //super(\"EventMessage\");\r\n super(TYPE_IDENT, event);\r\n }",
"public LoadResult(String msg)\n {\n message = msg;\n }",
"public Error(String message) {\r\n \tsuper(message);\r\n \t}",
"public TriggerMessage() {\n\t}",
"public JsonParseException _constructError(String msg) {\n return new JsonParseException(this, msg).withRequestPayload(this._requestPayload);\n }",
"private void initMsgs() {\n }",
"private void initMsgs() {\n }",
"public PersonResult(String message){\n super(message);\n }",
"public ParseException(String msg) {\n this(msg, -1, -1, -1);\n }",
"private DebugMessage() {\n initFields();\n }",
"private Message createMsg(long type,Object event){\r\n Message msg=new Message(0,type,0,\"\",new Object[]{event},\r\n System.currentTimeMillis(),0,0,null,0,0,0);\r\n return msg;\r\n }",
"private Message(Builder builder) {\n super(builder);\n }",
"public AmqpMessage() {}",
"public messageList()\n {\n\n }",
"public notHumanBeingException(String message){// Message parameted created\n super(message);\n \n }",
"public ValidationException(String msg) {\n\t\tsuper(msg);\n\t}",
"private void __sep__Constructors__() {}",
"public CompilerMessage(MessageKind messageKind_) {\r\n this((SourceRange)null, messageKind_, null);\r\n }",
"private ParseException(String msg, long offset, int line, int column) {\n super(msg);\n this.offset = offset;\n this.line = line;\n this.column = column;\n }",
"public FIXMessageUtil() {\r\n }",
"public MultiChannelMessageImpl() {\n }",
"public CodecException(String msg) {\n\t\tsuper(msg);\n\t}",
"public abstract void initialize(P msg);",
"private MessageBundle() {\r\n // Nothing to do here.\r\n }",
"public MyCustomException( String message )\n {\n\n\t// Why are we doing this??\n super( message );\n }",
"public Protocol(char msgType, int numArgs, String[] args)\r\n {\r\n this.msgType = msgType;\r\n this.numArgs = numArgs;\r\n this.args = args;\r\n }",
"public Error(int code, String msg) {\r\n\tthis.code = code;\r\n\tthis.msg = msg;\r\n }",
"private MessageFeatureMap() {}",
"public ResolverSrdiMsgImpl() {\r\n }",
"MyException(String str)\n {\n //parametrize constructor\n super(str);\n }",
"public Chat(){ }",
"public Message () {\n\t\tthis.setCreationtime(Calendar.getInstance().getTimeInMillis());\n\t\tsetTimestamp();\n\t}",
"public ParcelableMessage(String name, String text) {\n\t\tsuper(name, text);\n\t}",
"private Message(String message, long visibleTime, long creationTime, long id){\n\t\tthis(message, visibleTime);\n\t\tthis.creationTime = creationTime;\n\t\tthis.id = id;\n\t}",
"public MessageResponse() {\r\n\t}",
"public Message(String message){\n\t\tthis(message, 5000);\n\t}",
"public abstract String construct();",
"public Constructor(){\n\t\t\n\t}"
]
| [
"0.7558258",
"0.748022",
"0.72168326",
"0.7117628",
"0.70282435",
"0.70282435",
"0.6990726",
"0.6916997",
"0.6900963",
"0.6900963",
"0.6881343",
"0.6864985",
"0.68613166",
"0.68582755",
"0.68433326",
"0.68394375",
"0.68129224",
"0.6791533",
"0.6778859",
"0.67400163",
"0.67281204",
"0.6724526",
"0.668931",
"0.6649496",
"0.66087747",
"0.6574789",
"0.655345",
"0.65506154",
"0.654368",
"0.65344346",
"0.6513807",
"0.6471497",
"0.6458539",
"0.6443302",
"0.6427284",
"0.6423682",
"0.6413597",
"0.64131796",
"0.64131796",
"0.63885146",
"0.638031",
"0.6360201",
"0.6352003",
"0.63473904",
"0.6336213",
"0.6332853",
"0.6318762",
"0.62989587",
"0.62915397",
"0.6272555",
"0.62636983",
"0.6251931",
"0.6239126",
"0.623264",
"0.62169343",
"0.6213308",
"0.6201285",
"0.6197059",
"0.6194802",
"0.61931384",
"0.6183451",
"0.6173633",
"0.6172016",
"0.61683667",
"0.6155764",
"0.61537516",
"0.61468464",
"0.61303973",
"0.6107135",
"0.6107135",
"0.60895485",
"0.6085693",
"0.60811615",
"0.606322",
"0.60595685",
"0.6053227",
"0.6049982",
"0.60437584",
"0.60423166",
"0.6040453",
"0.6037483",
"0.6036787",
"0.60365146",
"0.60304195",
"0.60288936",
"0.6024218",
"0.6021523",
"0.60178125",
"0.6012436",
"0.60068876",
"0.59946597",
"0.59929746",
"0.59894407",
"0.59802043",
"0.5976089",
"0.59699494",
"0.59689796",
"0.5966161",
"0.59623563",
"0.5958579",
"0.59560746"
]
| 0.0 | -1 |
Additional constructor nest the exceptions, storing the stack trace | public WebAppException(Throwable nestedException) {
this.nestedException_ = nestedException;
stackTraceString_ = generateStackTraceString(nestedException);
extractProperties(nestedException);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public SMSLibException(Throwable originalE)\n/* 17: */ {\n/* 18:45 */ this.originalE = originalE;\n/* 19: */ }",
"public Exception() {\n\t\t\tsuper();\n\t\t}",
"public StackException(String message){\n super(message);\n }",
"public Exception() {\n\tsuper();\n }",
"public SMSLibException(String errorMessage, Throwable originalE)\n/* 22: */ {\n/* 23:50 */ super(errorMessage);\n/* 24:51 */ this.originalE = originalE;\n/* 25: */ }",
"public TechnicalException() {\r\n }",
"protected MultiException() {\n\t\t// Can't delegate to the other constructor or GWT RPC gets cranky\n\t\tsuper(MULTIPLE);\n\t\t_causes = Collections.<Throwable> emptySet();\n\t}",
"public SMSLibException(String errorMessage)\n/* 10: */ {\n/* 11:34 */ super(errorMessage);\n\n/* 12: */ }",
"public TwoDAReadException(String message, Throwable cause){ super(message, cause); }",
"public MyException() {\n super(\"This is my message. There are many like it but this one is mine.\");\n }",
"@Test\n public void testConstructorWithMessageAndCause()\n {\n final RuntimeException cause = new RuntimeException();\n final LoaderException e = new LoaderException(\"Custom message\", cause);\n assertEquals(\"Custom message\", e.getMessage());\n assertEquals(cause, e.getCause());\n }",
"public PigPenException(Throwable z) {\n super(z);\n setStackTrace(new StackTraceElement[0]);\n }",
"public CanyonException()\r\n {\r\n super();\r\n }",
"GitletException() {\n super();\n }",
"public EncodingException(String s, Throwable ex) {\n\tsuper(s, null); // Disallow initCause\n\tthis.ex = ex;\n }",
"MyException(String str)\n {\n //parametrize constructor\n super(str);\n }",
"WireframeException(String message, Throwable e){\r\n super(message, e);\r\n }",
"public ExecutionError(Error cause) {\n/* 58 */ super(cause);\n/* */ }",
"public CustomException(Throwable cause) {\n super(cause == null ? null : cause.toString(), cause);\n }",
"public NoTraceOntimizeJEEException() {\r\n this((String) null);\r\n }",
"public CIMException() {\n\t\tthis((String) null, (Object[]) null);\n\t}",
"public SMSLibException() {}",
"public Exception(String s) {\n\tsuper(s);\n }",
"public CompilationException(Throwable t) {\n\t\tsuper(t);\n\t}",
"public TwoDAReadException(String message) { super(message); }",
"public MyException(String message)\n { super(message); }",
"public InstantiationException(AstLocation location, String message,\n Iterable<TypeReference> instantiationReferenceStack)\n {\n super(location, message);\n\n pushInstantiationStack(instantiationReferenceStack);\n }",
"public SearchException() {\n }",
"Constructor<? extends RefException> getExceptionConstructor(\n String qualifiedExceptionName,\n String qualifiedPackageName\n );",
"public FullCarException() {\r\n super(\"\");\r\n }",
"private ExceptionLogger() {\n }",
"public OLMSException() {\r\n super();\r\n }",
"public VelocityEmailException(Throwable nested)\n {\n super(nested);\n }",
"public UnmatchedException(){\r\n\r\n\t}",
"public JavaException()\r\n\t{\r\n\t\tsuper();\r\n\t}",
"public TeWeinigGeldException(Exception e) {this.e = e;}",
"public AuthException()\n {\n\n }",
"public WrappedException(Exception e) {\n super(e);\n }",
"public HttpException() {\n }",
"public MyCustomException( Throwable cause )\n {\n\n\t// Why are we doing this??\n super( cause );\n }",
"public ShopingCartException() {\n\tsuper(); // call superclass constructor\n\tmistake = \"unknown\";\n }",
"public StackOverflowException(String e) {\n\t\tsuper(e);\n\t}",
"public NSException() {\n\t\tsuper();\n\t\tthis.exception = new Exception();\n\t}",
"public ExceptionSubVersion() {\n this(\"EcologicaExcepciones\");\n }",
"public SucheException() {\n }",
"public SmppException(Exception e) {\n\t\tsuper(e);\n\t}",
"public SysAccessCodeException(int code, String businessMessage)\n/* */ {\n/* 21 */ this(businessMessage);\n/* */ }",
"public EmailException()\n {\n super();\n }",
"public ExecutionError(String message, Error cause) {\n/* 51 */ super(message, cause);\n/* */ }",
"public BusinessObjectException(Exception e) {\r\n super( \"\" + e );\r\n }",
"public CacheException() {\r\n\t\tsuper();\r\n\t}",
"public TaxException(String arg0, Throwable arg1)\n {\n super(arg0, arg1);\n }",
"public QueryException() {\n\n }",
"public AuthException(String message, Exception ex)\n {\n super(message,ex);\n }",
"public SmppException() {\n\t\tsuper();\n\t}",
"public BusinessObjectException() {\r\n super();\r\n }",
"public InstantiationException(ParserException exception,\n Iterable<TypeReference> instantiationReferenceStack)\n {\n super(exception);\n\n pushInstantiationStack(instantiationReferenceStack);\n }",
"public PropagationException() {\n }",
"public TrafficspacesAPIException() {\n \tthis(null, DEFAULT_MESSAGE);\n }",
"public AssertionFailedException(Exception ex) {\n/* 63 */ super(Messages.getString(\"AssertionFailedException.0\") + ex.toString() + Messages.getString(\"AssertionFailedException.1\"));\n/* */ }",
"public Exception(Throwable cause) {\n\t\t\tsuper(cause);\n\t\t}",
"public ExceptionUtils()\n {\n // nothing to do\n }",
"public OperationException(Throwable cause) {\n super(cause);\n }",
"public Exception(String message) {\n\t\t\tsuper(message);\n\t\t}",
"public CoderException(Throwable cause) {\n super(cause);\n }",
"public InstanceOverflowException() {\n\t\tsuper();\n\t}",
"public MRFException() {\n\t\tsuper();\n\t}",
"public EmailException(Throwable rootCause)\n {\n super(rootCause);\n }",
"public ContextElementFinderException(Throwable th)\r\n {\r\n super(th);\r\n }",
"public Throwable(Object out$) {\n super();\n }",
"public PriceModelException() {\n\n }",
"public MyCustomException( String message )\n {\n\n\t// Why are we doing this??\n super( message );\n }",
"public PreparationException() {\n\t\tsuper();\n\t}",
"public MyCustomException( String message, Throwable cause )\n {\n\n\t// Why are we doing this??\n super( message, cause );\n }",
"public OperationException() {\n super();\n }",
"public ExceptionDate(){\n\t\tsuper();\n\t}",
"public StackUnderflowException(String e) {\n\t\tsuper(e);\n\t}",
"public BaseException(String message) {\n super(message);\n setErrorCode();\n }",
"public NEOLoggerException()\n {\n }",
"WireframeException(String message){\r\n super(message);\r\n }",
"public NoTraceOntimizeJEEException(String message) {\r\n this(message, (Object[]) null);\r\n }",
"public MetricsException(Throwable cause) {\n\n super(cause);\n }",
"public ShazamEjbException(Throwable inCausa) {\n\t\tthis(inCausa, null, 0);\n\t}",
"public MyException(String message) {\r\n\t\tsuper(message);\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}",
"@Override\n public synchronized Throwable fillInStackTrace() {\n return this;\n }",
"public OLMSException(Throwable cause) {\r\n super(cause);\r\n }",
"@SuppressWarnings(\"unused\")\r\n\tprivate TransporterException(){\r\n\t\t\r\n\t}",
"public CassetteException(String message) {\r\n super(message);\r\n }",
"public CalculadoraException() {\r\n }",
"public DaoException(Throwable arg0) {\r\n\t\tsuper(arg0);\r\n\t}",
"public AuthenticationException() {\n }",
"public LexerException() {\n\n\t}",
"public GLMatrixStackUnderflowException() {\r\n\r\n\t\t}",
"public CanyonException( Throwable t )\r\n {\r\n super( t.getMessage() );\r\n m_cause = t;\r\n }",
"public EmptyStackException(Throwable cause) {\n\t\tsuper(cause);\n\t}",
"public UserDataLoadException() {\n }",
"public ExcelImportException() {\r\n\t\tsuper();\r\n\t}",
"@SuppressWarnings(\"unused\")\n\tprivate StackFrameDTO()\n\t{\n\t\tthis.lineNumber = -1;\n\t\tthis.file = null;\n\t\tthis.level = -1;\n\t}",
"public ScheduleException() {\r\n }",
"public DataAccessLayerException() {\n }"
]
| [
"0.68169093",
"0.6785377",
"0.67652863",
"0.6709408",
"0.6692156",
"0.65214825",
"0.6505175",
"0.648612",
"0.64708805",
"0.6465048",
"0.64580023",
"0.64294463",
"0.6370996",
"0.6356103",
"0.63531804",
"0.634365",
"0.6340128",
"0.63289845",
"0.6290644",
"0.6286749",
"0.6271661",
"0.62487227",
"0.6245658",
"0.6232906",
"0.62161636",
"0.62071216",
"0.62024575",
"0.62023824",
"0.61833715",
"0.6167893",
"0.6167139",
"0.6164335",
"0.6152248",
"0.6150958",
"0.6149645",
"0.6149049",
"0.6143781",
"0.61333287",
"0.6124388",
"0.6118446",
"0.61155504",
"0.6112202",
"0.6108339",
"0.6106411",
"0.60960424",
"0.6089802",
"0.60877687",
"0.60854036",
"0.6082052",
"0.607218",
"0.6063495",
"0.60620385",
"0.6045865",
"0.60409564",
"0.6024599",
"0.60128367",
"0.6012799",
"0.6005557",
"0.60018367",
"0.59995735",
"0.5988963",
"0.5978504",
"0.5974883",
"0.5968834",
"0.5967542",
"0.59616673",
"0.5961251",
"0.5960212",
"0.5957268",
"0.595556",
"0.5955057",
"0.5943587",
"0.5942527",
"0.59412014",
"0.59393454",
"0.5935517",
"0.59209085",
"0.59138656",
"0.59084314",
"0.5907245",
"0.5898893",
"0.5897689",
"0.5896008",
"0.5895808",
"0.58919805",
"0.5890931",
"0.5886594",
"0.5885629",
"0.58829993",
"0.58748376",
"0.5870736",
"0.58684033",
"0.58588785",
"0.58574224",
"0.5852498",
"0.5844355",
"0.5832239",
"0.5832064",
"0.5830523",
"0.5829238"
]
| 0.61848813 | 28 |
Additional constructor nest the exceptions, storing the stack trace | public WebAppException(String message, Throwable nestedException) {
this(message);
this.nestedException_ = nestedException;
stackTraceString_ = generateStackTraceString(nestedException);
extractProperties(nestedException);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public SMSLibException(Throwable originalE)\n/* 17: */ {\n/* 18:45 */ this.originalE = originalE;\n/* 19: */ }",
"public Exception() {\n\t\t\tsuper();\n\t\t}",
"public StackException(String message){\n super(message);\n }",
"public Exception() {\n\tsuper();\n }",
"public SMSLibException(String errorMessage, Throwable originalE)\n/* 22: */ {\n/* 23:50 */ super(errorMessage);\n/* 24:51 */ this.originalE = originalE;\n/* 25: */ }",
"public TechnicalException() {\r\n }",
"protected MultiException() {\n\t\t// Can't delegate to the other constructor or GWT RPC gets cranky\n\t\tsuper(MULTIPLE);\n\t\t_causes = Collections.<Throwable> emptySet();\n\t}",
"public SMSLibException(String errorMessage)\n/* 10: */ {\n/* 11:34 */ super(errorMessage);\n\n/* 12: */ }",
"public TwoDAReadException(String message, Throwable cause){ super(message, cause); }",
"public MyException() {\n super(\"This is my message. There are many like it but this one is mine.\");\n }",
"@Test\n public void testConstructorWithMessageAndCause()\n {\n final RuntimeException cause = new RuntimeException();\n final LoaderException e = new LoaderException(\"Custom message\", cause);\n assertEquals(\"Custom message\", e.getMessage());\n assertEquals(cause, e.getCause());\n }",
"public PigPenException(Throwable z) {\n super(z);\n setStackTrace(new StackTraceElement[0]);\n }",
"public CanyonException()\r\n {\r\n super();\r\n }",
"GitletException() {\n super();\n }",
"public EncodingException(String s, Throwable ex) {\n\tsuper(s, null); // Disallow initCause\n\tthis.ex = ex;\n }",
"MyException(String str)\n {\n //parametrize constructor\n super(str);\n }",
"WireframeException(String message, Throwable e){\r\n super(message, e);\r\n }",
"public ExecutionError(Error cause) {\n/* 58 */ super(cause);\n/* */ }",
"public CustomException(Throwable cause) {\n super(cause == null ? null : cause.toString(), cause);\n }",
"public NoTraceOntimizeJEEException() {\r\n this((String) null);\r\n }",
"public CIMException() {\n\t\tthis((String) null, (Object[]) null);\n\t}",
"public SMSLibException() {}",
"public Exception(String s) {\n\tsuper(s);\n }",
"public CompilationException(Throwable t) {\n\t\tsuper(t);\n\t}",
"public TwoDAReadException(String message) { super(message); }",
"public MyException(String message)\n { super(message); }",
"public InstantiationException(AstLocation location, String message,\n Iterable<TypeReference> instantiationReferenceStack)\n {\n super(location, message);\n\n pushInstantiationStack(instantiationReferenceStack);\n }",
"public SearchException() {\n }",
"public WebAppException(Throwable nestedException) {\r\n\t\tthis.nestedException_ = nestedException;\r\n\t\tstackTraceString_ = generateStackTraceString(nestedException);\r\n\t\textractProperties(nestedException);\r\n\t}",
"Constructor<? extends RefException> getExceptionConstructor(\n String qualifiedExceptionName,\n String qualifiedPackageName\n );",
"public FullCarException() {\r\n super(\"\");\r\n }",
"private ExceptionLogger() {\n }",
"public OLMSException() {\r\n super();\r\n }",
"public VelocityEmailException(Throwable nested)\n {\n super(nested);\n }",
"public UnmatchedException(){\r\n\r\n\t}",
"public JavaException()\r\n\t{\r\n\t\tsuper();\r\n\t}",
"public TeWeinigGeldException(Exception e) {this.e = e;}",
"public AuthException()\n {\n\n }",
"public WrappedException(Exception e) {\n super(e);\n }",
"public HttpException() {\n }",
"public MyCustomException( Throwable cause )\n {\n\n\t// Why are we doing this??\n super( cause );\n }",
"public ShopingCartException() {\n\tsuper(); // call superclass constructor\n\tmistake = \"unknown\";\n }",
"public StackOverflowException(String e) {\n\t\tsuper(e);\n\t}",
"public NSException() {\n\t\tsuper();\n\t\tthis.exception = new Exception();\n\t}",
"public ExceptionSubVersion() {\n this(\"EcologicaExcepciones\");\n }",
"public SucheException() {\n }",
"public SmppException(Exception e) {\n\t\tsuper(e);\n\t}",
"public SysAccessCodeException(int code, String businessMessage)\n/* */ {\n/* 21 */ this(businessMessage);\n/* */ }",
"public EmailException()\n {\n super();\n }",
"public ExecutionError(String message, Error cause) {\n/* 51 */ super(message, cause);\n/* */ }",
"public BusinessObjectException(Exception e) {\r\n super( \"\" + e );\r\n }",
"public CacheException() {\r\n\t\tsuper();\r\n\t}",
"public TaxException(String arg0, Throwable arg1)\n {\n super(arg0, arg1);\n }",
"public QueryException() {\n\n }",
"public AuthException(String message, Exception ex)\n {\n super(message,ex);\n }",
"public SmppException() {\n\t\tsuper();\n\t}",
"public BusinessObjectException() {\r\n super();\r\n }",
"public InstantiationException(ParserException exception,\n Iterable<TypeReference> instantiationReferenceStack)\n {\n super(exception);\n\n pushInstantiationStack(instantiationReferenceStack);\n }",
"public PropagationException() {\n }",
"public TrafficspacesAPIException() {\n \tthis(null, DEFAULT_MESSAGE);\n }",
"public AssertionFailedException(Exception ex) {\n/* 63 */ super(Messages.getString(\"AssertionFailedException.0\") + ex.toString() + Messages.getString(\"AssertionFailedException.1\"));\n/* */ }",
"public Exception(Throwable cause) {\n\t\t\tsuper(cause);\n\t\t}",
"public ExceptionUtils()\n {\n // nothing to do\n }",
"public OperationException(Throwable cause) {\n super(cause);\n }",
"public Exception(String message) {\n\t\t\tsuper(message);\n\t\t}",
"public CoderException(Throwable cause) {\n super(cause);\n }",
"public InstanceOverflowException() {\n\t\tsuper();\n\t}",
"public MRFException() {\n\t\tsuper();\n\t}",
"public EmailException(Throwable rootCause)\n {\n super(rootCause);\n }",
"public ContextElementFinderException(Throwable th)\r\n {\r\n super(th);\r\n }",
"public Throwable(Object out$) {\n super();\n }",
"public PriceModelException() {\n\n }",
"public MyCustomException( String message )\n {\n\n\t// Why are we doing this??\n super( message );\n }",
"public PreparationException() {\n\t\tsuper();\n\t}",
"public MyCustomException( String message, Throwable cause )\n {\n\n\t// Why are we doing this??\n super( message, cause );\n }",
"public OperationException() {\n super();\n }",
"public ExceptionDate(){\n\t\tsuper();\n\t}",
"public StackUnderflowException(String e) {\n\t\tsuper(e);\n\t}",
"public BaseException(String message) {\n super(message);\n setErrorCode();\n }",
"public NEOLoggerException()\n {\n }",
"WireframeException(String message){\r\n super(message);\r\n }",
"public NoTraceOntimizeJEEException(String message) {\r\n this(message, (Object[]) null);\r\n }",
"public MetricsException(Throwable cause) {\n\n super(cause);\n }",
"public ShazamEjbException(Throwable inCausa) {\n\t\tthis(inCausa, null, 0);\n\t}",
"public MyException(String message) {\r\n\t\tsuper(message);\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}",
"@Override\n public synchronized Throwable fillInStackTrace() {\n return this;\n }",
"public OLMSException(Throwable cause) {\r\n super(cause);\r\n }",
"@SuppressWarnings(\"unused\")\r\n\tprivate TransporterException(){\r\n\t\t\r\n\t}",
"public CassetteException(String message) {\r\n super(message);\r\n }",
"public CalculadoraException() {\r\n }",
"public DaoException(Throwable arg0) {\r\n\t\tsuper(arg0);\r\n\t}",
"public AuthenticationException() {\n }",
"public LexerException() {\n\n\t}",
"public GLMatrixStackUnderflowException() {\r\n\r\n\t\t}",
"public CanyonException( Throwable t )\r\n {\r\n super( t.getMessage() );\r\n m_cause = t;\r\n }",
"public EmptyStackException(Throwable cause) {\n\t\tsuper(cause);\n\t}",
"public UserDataLoadException() {\n }",
"public ExcelImportException() {\r\n\t\tsuper();\r\n\t}",
"@SuppressWarnings(\"unused\")\n\tprivate StackFrameDTO()\n\t{\n\t\tthis.lineNumber = -1;\n\t\tthis.file = null;\n\t\tthis.level = -1;\n\t}",
"public ScheduleException() {\r\n }",
"public DataAccessLayerException() {\n }"
]
| [
"0.68169093",
"0.6785377",
"0.67652863",
"0.6709408",
"0.6692156",
"0.65214825",
"0.6505175",
"0.648612",
"0.64708805",
"0.6465048",
"0.64580023",
"0.64294463",
"0.6370996",
"0.6356103",
"0.63531804",
"0.634365",
"0.6340128",
"0.63289845",
"0.6290644",
"0.6286749",
"0.6271661",
"0.62487227",
"0.6245658",
"0.6232906",
"0.62161636",
"0.62071216",
"0.62024575",
"0.62023824",
"0.61848813",
"0.61833715",
"0.6167893",
"0.6167139",
"0.6164335",
"0.6152248",
"0.6150958",
"0.6149645",
"0.6149049",
"0.6143781",
"0.61333287",
"0.6124388",
"0.6118446",
"0.61155504",
"0.6112202",
"0.6108339",
"0.6106411",
"0.60960424",
"0.6089802",
"0.60877687",
"0.60854036",
"0.6082052",
"0.607218",
"0.6063495",
"0.60620385",
"0.6045865",
"0.60409564",
"0.6024599",
"0.60128367",
"0.6012799",
"0.6005557",
"0.60018367",
"0.59995735",
"0.5988963",
"0.5978504",
"0.5974883",
"0.5968834",
"0.5967542",
"0.59616673",
"0.5961251",
"0.5960212",
"0.5957268",
"0.595556",
"0.5955057",
"0.5943587",
"0.5942527",
"0.59412014",
"0.59393454",
"0.5935517",
"0.59209085",
"0.59138656",
"0.59084314",
"0.5907245",
"0.5898893",
"0.5897689",
"0.5896008",
"0.5895808",
"0.58919805",
"0.5890931",
"0.5886594",
"0.5885629",
"0.58829993",
"0.58748376",
"0.5870736",
"0.58684033",
"0.58588785",
"0.58574224",
"0.5852498",
"0.5844355",
"0.5832239",
"0.5832064",
"0.5830523",
"0.5829238"
]
| 0.0 | -1 |
Descends through linkedlist of nesting exceptions, & output trace note that this displays the 'deepest' trace first | public String getStackTraceString() {
// if there's no nested exception, there's no stackTrace
if (nestedException_ == null)
return null;
StringBuffer traceBuffer = new StringBuffer();
if (nestedException_ instanceof WebAppException) {
traceBuffer.append(((WebAppException) nestedException_)
.getStackTraceString());
traceBuffer.append("-------- nested by:\n");
}
traceBuffer.append(stackTraceString_);
return traceBuffer.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deepList() throws Exception;",
"@Test\n public void testDumpError() {\n \n class TestExceptions {\n \n int start(int a, int b) {\n return sum(a, b);\n }\n \n int sum(int a, int b) {\n int result;\n \n try {\n result = a + product(a, b);\n } catch (Exception e) {\n throw new IllegalArgumentException(\"3 descendant exception\", e);\n }\n \n return result;\n }\n \n int product(int a, int b) {\n int result;\n \n try {\n result = division(a, b) * b;\n } catch (Exception e) {\n throw new IllegalArgumentException(\"2 descendant exception\", e);\n }\n \n return result;\n }\n \n int division(int a, int b) {\n int result;\n \n try {\n result = a / b;\n } catch (Exception e) {\n throw new IllegalArgumentException(\"1 descendant exception\", e);\n }\n \n return result;\n }\n }\n \n try {\n TestExceptions test = new TestExceptions();\n test.start(1, 0);\n } catch (Throwable e) {\n ErrorContainer errorContainer = new ErrorContainer(e);\n \n StringWriter writer = new StringWriter();\n e.printStackTrace(new PrintWriter(writer));\n \n assertEquals(e.getClass().getName(), errorContainer.getClassName());\n assertEquals(e.getMessage(), errorContainer.getMessage());\n assertEquals(writer.toString(), errorContainer.getStackTrace());\n }\n \n }",
"@Override\n public void printStackTrace() {\n super.printStackTrace(); \n \n if(previous != null){\n previous.printStackTrace();\n }\n }",
"private void appendStackTraceElements(StringBuilder builder, int indent, IThrowableProxy throwableProxy) {\n \n if (builder.length() > maxLength) {\n return;\n }\n StackTraceElementProxy[] stackTraceElements = throwableProxy.getStackTraceElementProxyArray();\n int commonFrames = throwableProxy.getCommonFrames();\n\n boolean appendingExcluded = false;\n int consecutiveExcluded = 0;\n int appended = 0;\n StackTraceElementProxy previousWrittenStackTraceElement = null;\n for (int i = 0; i < stackTraceElements.length - commonFrames; i++) {\n if (maxDepthPerThrowable > 0 && appended >= maxDepthPerThrowable) {\n /*\n * We reached the configure limit. Bail out.\n */\n appendPlaceHolder(builder, indent, stackTraceElements.length - commonFrames - maxDepthPerThrowable, \"frames truncated\");\n break;\n }\n StackTraceElementProxy stackTraceElement = stackTraceElements[i];\n if (i <= 1 || isIncluded(stackTraceElement)) {\n /*\n * We should append this line.\n * \n * consecutiveExcluded will be > 0 if we were previously skipping lines based on excludes\n */\n if (consecutiveExcluded >= 2) {\n /*\n * Multiple consecutive lines were excluded, so append a placeholder \n */\n appendPlaceHolder(builder, indent, consecutiveExcluded, \"frames excluded\");\n consecutiveExcluded = 0;\n } else if (consecutiveExcluded == 1) {\n /*\n * We only excluded one line, so just go back and include it\n * instead of printing the excluding message for it.\n */\n appendingExcluded = true;\n consecutiveExcluded = 0;\n i -= 2;\n continue;\n }\n appendStackTraceElement(builder, indent, stackTraceElement, previousWrittenStackTraceElement);\n previousWrittenStackTraceElement = stackTraceElement;\n appendingExcluded = false;\n appended++;\n } else if (appendingExcluded) {\n /*\n * We're going back and appending something we previously excluded\n */\n appendStackTraceElement(builder, indent, stackTraceElement, previousWrittenStackTraceElement);\n previousWrittenStackTraceElement = stackTraceElement;\n appended++;\n } else {\n consecutiveExcluded++;\n }\n }\n \n if (consecutiveExcluded > 0) {\n /*\n * We were excluding stuff at the end, so append a placeholder\n */\n appendPlaceHolder(builder, indent, consecutiveExcluded, \"frames excluded\");\n }\n \n if (commonFrames > 0) {\n /*\n * Common frames found, append a placeholder\n */\n appendPlaceHolder(builder, indent, commonFrames, \"common frames omitted\");\n }\n\n }",
"public static void getExceptionDescriptive(Exception e, StackTraceElement l, WebDriver driver) throws IOException{\n\t\t String message1 = \"\", message2 = \"\", firstLine = \"\", secondLine = \"\";\n\t\t String errorCause = \"\", location = \"\", exceptionThrown = \"\";\n\t\t String packageNameOnly = \"\", classNameOnly = \"\", xml = \"\";\n\t\t String description = \"\", detected = \"\", runtime = \"\", subtotal = \"\";\n\t\t try{\n\t\t // CREATING NEW OR UPDATING EXISTING FAILED COUNTER RECORD: \n\t\t\t counter(\"failed.num\");\n\t\t\t \t\t \n\t\t\t if( (e.getCause().toString().length() > 0) && (e.getMessage().length() > 0) ) { \n\t\t\t\t message1 = e.getCause().toString();\n\t\t\t\t message2 = e.getMessage();\n\t\t\t\t if(message1.contains(\"\\\\r\") && message2.contains(\"\\\\r\")) { \n\t\t\t\t\t String [] multiline1 = message1.replaceAll(\"\\\\r\", \"\").split(\"\\\\n\");\t\t\t\n\t\t\t\t\t String [] multiline2 = message2.replaceAll(\"\\\\r\", \"\").split(\"\\\\n\");\n\t\t\t\t\t if(multiline1.length > 0) { firstLine = multiline1[0]; } else { firstLine = \"Unknown\"; }\n\t\t\t\t\t if(multiline2.length > 0) { secondLine = multiline2[0]; } else { secondLine = \"Unknown\"; }\n\t\t\t\t\t errorCause = firstLine.substring(0,firstLine.indexOf(\":\"));\n\t\t\t\t\t exceptionThrown = errorCause.substring(1 + errorCause.lastIndexOf(\".\"), errorCause.length());\n\t\t\t\t\t }\n\t\t\t\t }\n\n\t\t\t packageNameOnly = l.getClassName().substring(0, l.getClassName().lastIndexOf(\".\"));\n\t\t\t classNameOnly = l.getClassName().substring(1 + l.getClassName().lastIndexOf(\".\"), l.getClassName().length());\n\t\t\t location = packageNameOnly + File.separator + classNameOnly + File.separator + l.getMethodName() + \", line # \" + l.getLineNumber();\n\t\t xml = \"<class name=\\\"\" + packageNameOnly + \".\" + classNameOnly + \"\\\"><methods><include name=\\\"\" + l.getMethodName() + \"\\\"/></methods></class>\";\n\t\t\t description = exceptionThrown;\n\t\t detected = getCurrentDateTimeFull();\n\t\t runtime = testRunTime(\"start.time\", System.currentTimeMillis());\n\t\t subtotal = testRunTime(\"ini.time\", System.currentTimeMillis());\n\t\t \n\t\t\t fileWriterPrinter(\"\\nError Cause: ---> \" + errorCause + \"\\nDescription: ---> \" + secondLine + \"\\n Location: ---> \" + location);\n\t\t\t getScreenShot(l, description, driver);\n\t\t\t \n\t\t // APPEND A NEW LOG RECORD:\n\t\t if (fileExist(\"run.log\", false)) {\n\t\t\t fileWriter(\"run.log\", \"Error Cause: ---> \" + errorCause);\n\t\t\t fileWriter(\"run.log\", \"Description: ---> \" + secondLine);\n\t\t\t fileWriter(\"run.log\", \" Location: ---> \" + location);\n\t \t\t // fileWriter(\"run.log\", \" Detected: ---> \" + detected);\n\t \t\t // fileWriter(\"run.log\", \" Runtime: ---> \" + runtime);\n\t \t\t // fileWriter(\"run.log\", \" Subtotal: ---> \" + subtotal);\t \t \n\t\t }\n\t\t \n\t\t // APPEND AN ERROR RECORD:\n\t\t\t fileWriter(\"failed.log\", \" Failure: #\" + fileScanner(\"failed.num\"));\n\t\t\t fileWriter(\"failed.log\", \" Test: #\" + fileScanner(\"test.num\"));\n\t\t\t fileWriter(\"failed.log\", \" Start: \" + convertCalendarMillisecondsAsStringToDateTimeHourMinSec(fileScanner(\"start.time\")));\n fileWriter(\"failed.log\", \" XML Path: \" + xml);\n\t\t\t fileWriter(\"failed.log\", \"Error Cause: ---> \" + errorCause);\n\t\t\t fileWriter(\"failed.log\", \"Description: ---> \" + secondLine);\n\t\t\t fileWriter(\"failed.log\", \" Location: ---> \" + location);\n\t\t\t fileWriter(\"failed.log\", \" Detected: \" + detected);\n\t\t \t fileWriter(\"failed.log\", \" Runtime: \" + runtime);\n\t\t \t fileWriter(\"failed.log\", \" Subtotal: \" + subtotal);\n\t\t \t fileWriter(\"failed.log\", \"\");\n\t\t \t \n\t\t // APPEND DESCRIPTIVE RECORD:\n\t\t\t Assert.assertFalse(true, \"\\n Error Cause: ---> \" + errorCause\n\t\t\t\t\t + \"\\n Description: ---> \" + secondLine\n\t\t\t\t\t + \"\\n Location: ---> \" + location\n\t\t\t\t\t\t\t\t\t + \"\\n Detected: ---> \" + detected\n\t\t\t\t\t\t\t\t\t + \"\\n Runtime: ---> \" + runtime\n\t\t\t\t\t\t\t\t\t + \"\\n Subtotal: ---> \" + subtotal\n\t\t\t\t\t + \"\\n\"\n\t\t\t\t\t\t\t + xml\n\t\t\t\t\t\t\t + \"\\n\"\n\t\t\t\t \t + \"\\nStack Traces:\");\n\t\t\t \n\t\t\t } catch(Exception e1) {\n\t\t\t\t String s = e1.toString(), m = s;\n\t\t\t\t if(s.contains(\".\") && s.contains(\"Exception\")) {\n\t\t\t\t \t m = \".getCause() by \" + s.substring(s.lastIndexOf(\".\") + 1, s.lastIndexOf(\"Exception\")) + \" Exception\";\n\t\t\t\t \t }\n\t\t\t\t exceptionDescriptive(m, l);\t\n\t\t\t\t }\t\t \n\t\t }",
"public AccessibilityNodeInfo getTraversalAfter() {\n/* 430 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"private static void outputThrowable(Throwable cause, AppendingStringBuffer sb,\n\t\t\tboolean stopAtWicketServlet)\n\t{\n\t\tsb.append(cause);\n\t\tsb.append(\"\\n\");\n\t\tStackTraceElement[] trace = cause.getStackTrace();\n\t\tfor (int i = 0; i < trace.length; i++)\n\t\t{\n\t\t\tString traceString = trace[i].toString();\n\t\t\tif (!(traceString.startsWith(\"sun.reflect.\") && i > 1))\n\t\t\t{\n\t\t\t\tsb.append(\" at \");\n\t\t\t\tsb.append(traceString);\n\t\t\t\tsb.append(\"\\n\");\n\t\t\t\tif (stopAtWicketServlet\n\t\t\t\t\t\t&& traceString.startsWith(\"wicket.protocol.http.WicketServlet\"))\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"String exceptionToStackTrace( Exception e ) {\n StringWriter stringWriter = new StringWriter();\n PrintWriter printWriter = new PrintWriter(stringWriter);\n e.printStackTrace( printWriter );\n return stringWriter.toString();\n }",
"void backtrace(Node n){\n\n\t\tif(n!=null){\n\n\t\t\tpath=path+\"-->\"+(n.node_id+1);\n\t\t\tSystem.out.print(\"-->\"+(n.node_id+1));\n\t\t\tn=n.root_node;\n\t\t\tbacktrace(n);\n\t\t}\n\n\t\telse{\n\t\t\tpath=path+\"*\";\n\t\t\tSystem.out.println(\"*\");\n\t\t}\n\t}",
"public static void printStackTrace(SQLException e, PrintWriter pw) {\r\n SQLException next = e;\r\n while (next != null) {\r\n next.printStackTrace(pw);\r\n next = next.getNextException();\r\n if (next != null) {\r\n System.out.println(\"Next SQLException:\");\r\n }\r\n }\r\n }",
"private List<String> getExceptionSynopsis(Throwable e) {\n Stack<Throwable> exceptions = new Stack<>();\n while (e != null && !exceptions.contains(e)) {\n // noinspection ThrowableResultOfMethodCallIgnored\n exceptions.push(e);\n e = e.getCause();\n }\n\n List<String> synopsis = new ArrayList<>();\n StringBuilder buffer = new StringBuilder();\n\n boolean foundTrace = false;\n while (!foundTrace && !exceptions.isEmpty()) {\n e = exceptions.pop();\n StackTraceElement[] elements = e.getStackTrace();\n for (StackTraceElement element : elements) {\n if (element.getClassName().startsWith(\"datawave.ingest\")) {\n foundTrace = true;\n }\n if (foundTrace) {\n buffer.append(e.getClass().getName());\n buffer.append('@');\n buffer.append(element.getClassName());\n buffer.append('.').append(element.getMethodName());\n buffer.append('(').append(element.getLineNumber()).append(')');\n synopsis.add(buffer.toString());\n buffer.setLength(0);\n break;\n }\n }\n }\n\n // NOTE: By definition, this method is only called by datawave.ingest.EventMapper, and only\n // available to be called by this class the condition on line 542 will always be satisfied\n // and so 'foundTrace' will always be set to true. So, this code can eventually be removed.\n if (!foundTrace) {\n assert e != null;\n buffer.append(e.getClass().getName());\n synopsis.add(buffer.toString());\n }\n\n return synopsis;\n }",
"private void printStackTraceHerder() {\n PrintStream printStream = System.err;\n synchronized (printStream) {\n System.err.println(super.getMessage() + \"; nested exception is:\");\n this.detail.printStackTrace();\n }\n }",
"private void printExceptionCountBreakdown() {\n\t SampleHandler.printMessage(\"\\nDestructive wrapping instances break down by project:\");\n\t for (String projectName : projectDestructiveWrappingInstancesMap.keySet()) {\n\t\t SampleHandler.printMessage(String.format(\"%s project: %d destructive wrapping instances flagged\",\n\t\t\t\t projectName, projectDestructiveWrappingInstancesMap.get(projectName).size()));\n\t }\n }",
"public static void exceptionDescriptive(String errorCause, StackTraceElement l) throws IOException {\n\t\t\t String secondLine = \"Browser Shut-Down\", location = \"\";\n\t\t\t String packageNameOnly, classNameOnly, xml, detected, runtime, subtotal;\n\n\t\t\t packageNameOnly = l.getClassName().substring(0, l.getClassName().lastIndexOf(\".\"));\n\t\t\t classNameOnly = l.getClassName().substring(1 + l.getClassName().lastIndexOf(\".\"), l.getClassName().length());\n\t\t\t location = packageNameOnly + File.separator + classNameOnly + File.separator + l.getMethodName() + \", line # \" + l.getLineNumber();\n\t\t xml = \"<class name=\\\"\" + packageNameOnly + \".\" + classNameOnly + \"\\\"><methods><include name=\\\"\" + l.getMethodName() + \"\\\"/></methods></class>\";\n\t\t detected = getCurrentDateTimeFull();\n\t\t runtime = testRunTime(\"start.time\", System.currentTimeMillis());\n\t\t subtotal = testRunTime(\"ini.time\", System.currentTimeMillis());\n\t\t \t \n\t\t // APPEND A NEW LOG RECORDS:\n\t\t fileWriterPrinter(\"\\nError Cause: ---> \" + errorCause + \"\\nDescription: ---> \" + secondLine + \"\\n Location: ---> \" + location);\t\n\t\t if (fileExist(\"run.log\", false)) {\n\t\t\t fileWriter(\"run.log\", \"Error Cause: ---> \" + errorCause);\n\t\t\t fileWriter(\"run.log\", \"Description: ---> \" + secondLine);\n\t\t\t fileWriter(\"run.log\", \" Location: ---> \" + location);\t \t \n\t\t }\n\t\t \n\t\t // APPEND AN ERROR RECORD:\n\t\t\t fileWriter(\"failed.log\", \" Failure: #\" + fileScanner(\"failed.num\"));\n\t\t\t fileWriter(\"failed.log\", \" Test: #\" + fileScanner(\"test.num\"));\n\t\t\t fileWriter(\"failed.log\", \" Start: \" + convertCalendarMillisecondsAsStringToDateTimeHourMinSec(fileScanner(\"start.time\")));\n fileWriter(\"failed.log\", \" XML Path: \" + xml);\n\t\t\t fileWriter(\"failed.log\", \"Error Cause: ---> \" + errorCause);\n\t\t\t fileWriter(\"failed.log\", \"Description: ---> \" + secondLine);\n\t\t\t fileWriter(\"failed.log\", \" Location: ---> \" + location);\n\t\t\t fileWriter(\"failed.log\", \" Detected: \" + detected);\n\t\t \t fileWriter(\"failed.log\", \" Runtime: \" + runtime);\n\t\t \t fileWriter(\"failed.log\", \" Subtotal: \" + subtotal);\n\t\t \t fileWriter(\"failed.log\", \"\");\n\t\t \t \n\t\t // APPEND DESCRIPTIVE RECORD:\n\t\t\t Assert.assertFalse(true, \"\\n Error Cause: ---> \" + errorCause\n\t\t\t\t\t + \"\\n Description: ---> \" + secondLine\n\t\t\t\t\t + \"\\n Location: ---> \" + location\n\t\t\t\t\t\t\t\t\t + \"\\n Detected: ---> \" + detected\n\t\t\t\t\t\t\t\t\t + \"\\n Runtime: ---> \" + runtime\n\t\t\t\t\t\t\t\t\t + \"\\n Subtotal: ---> \" + subtotal\n\t\t\t\t\t + \"\\n\"\n\t\t\t\t\t\t\t + xml\n\t\t\t\t\t\t\t + \"\\n\"\n\t\t\t\t \t + \"\\nStack Traces:\");\t\t\t \n\t\t }",
"public static String structureTraceback(){\r\n // Set multipleOptimal to false\r\n boolean multipleOptimal = false;\r\n\r\n // Set i,j values to 0\r\n int i = 0;\r\n int j = 0;\r\n\r\n // Set isPair to false\r\n boolean isPair = false;\r\n\r\n // Initialize string to store structure\r\n StringBuilder optimalStructure = new StringBuilder();\r\n\r\n // Loop through to traceback\r\n for (int k = 0; k < sequence.length()-1; k++) {\r\n // First thing to be added to string builder\r\n if (k == 0) {\r\n // Check if there are multiple paths\r\n if(DPMatrix[0][sequence.length() - 1] == DPMatrix[0][sequence.length() - 2] && DPMatrix[0][sequence.length() -1] == DPMatrix[1][sequence.length()-1]){\r\n // Set multiple optimal to true\r\n multipleOptimal = true;\r\n\r\n // Came from the left\r\n i = 0;\r\n\r\n // Keep going left\r\n j = sequence.length() - 2;\r\n\r\n // Add to optimal structure\r\n optimalStructure.insert(0,\".\");\r\n\r\n } else if (DPMatrix[0][sequence.length() - 1] == DPMatrix[0][sequence.length() - 2]) {\r\n // Came from left\r\n i = 0;\r\n\r\n // Keep going left\r\n j = sequence.length() - 2;\r\n\r\n // Add to optimal structure\r\n optimalStructure.insert(0,\".\");\r\n\r\n } else if (DPMatrix[0][sequence.length() - 1] == DPMatrix[1][sequence.length() - 1]){\r\n // Came from up\r\n i = 1;\r\n\r\n // Don't go left\r\n j = sequence.length() - 1;\r\n\r\n // Add to optimal structure\r\n optimalStructure.insert(0,\".\");\r\n\r\n } else if (checkPair(sequence.charAt(0), sequence.charAt(sequence.length() - 1)) == 1) {\r\n // Came from up (diagonal)\r\n i = 1;\r\n\r\n // Go left\r\n j = sequence.length() - 2;\r\n\r\n // It is a pair (with -2)\r\n isPair = true;\r\n\r\n // Add to optimal structure\r\n optimalStructure.insert(0, \"(\");\r\n\r\n } else if (checkPair(sequence.charAt(0), sequence.charAt(sequence.length() - 1)) == 2) {\r\n // Came form up (diagonal)\r\n i = 1;\r\n\r\n // Go left\r\n j = sequence.length() - 2;\r\n\r\n // It is a pair (with -3)\r\n isPair = true;\r\n\r\n // Add to optimal structure\r\n optimalStructure.insert(0, \"(\");\r\n\r\n } else {\r\n // Bifurcation\r\n optimalStructure.insert(0,\".\");\r\n }\r\n // Not first thing in string builder\r\n } else {\r\n //\r\n if (DPMatrix[i][j] == DPMatrix[i][j - 1] && DPMatrix[i][j] == DPMatrix[i + 1][j]){\r\n // Go left\r\n j = j-1;\r\n\r\n // Add to optimal structure\r\n optimalStructure.insert(0,\".\");\r\n\r\n // There is multiple optimal\r\n multipleOptimal = true;\r\n\r\n } else if (DPMatrix[i][j] == DPMatrix[i][j - 1]) {\r\n // Go left\r\n j = j-1;\r\n\r\n // Add to optimal structure\r\n optimalStructure.insert(0,\".\");\r\n\r\n } else if (DPMatrix[i][j] == DPMatrix[i + 1][j]){\r\n // Go down\r\n i = i+1;\r\n\r\n // Add to optimal structure\r\n optimalStructure.insert(0,\".\");\r\n\r\n // Check if it is a pair resulting in -2\r\n } else if (checkPair(sequence.charAt(i), sequence.charAt(j)) == 1) {\r\n // Move diagonally\r\n i = i+1;\r\n j = j-1;\r\n\r\n // If not pair\r\n if (!isPair) {\r\n // Add to optimal structure\r\n optimalStructure.insert(0, \")\");\r\n } else if (isPair){\r\n // Add to optimal structure\r\n optimalStructure.insert(0, \"(\");\r\n }\r\n\r\n // Set pair to true\r\n isPair = true;\r\n\r\n // Check if it is a pair resulting in -3\r\n } else if (checkPair(sequence.charAt(i), sequence.charAt(j)) == 2) {\r\n // Check if it is a pair resulting in -2\r\n if (DPMatrix[i][j] == DPMatrix[i + 1][j - 1] - 3){\r\n // Move diagonally\r\n i = i+1;\r\n j = j-1;\r\n\r\n // If not pair\r\n if (!isPair) {\r\n // Add to optimal structure\r\n optimalStructure.insert(0, \")\");\r\n } else if (isPair){\r\n // Add to optimal structure\r\n optimalStructure.insert(0, \"(\");\r\n }\r\n\r\n // Set pair to true\r\n isPair = true;\r\n }\r\n } else {\r\n // add to optimal structure\r\n optimalStructure.insert(0,\".\");\r\n }\r\n }\r\n }\r\n\r\n // If pair\r\n if (isPair) {\r\n // Add to optimal structure\r\n optimalStructure.insert(0, \"(\");\r\n } else {\r\n // Add to optimal structure\r\n optimalStructure.insert(0, \".\");\r\n }\r\n\r\n // Create file for multiple optimal\r\n File file = new File(\"5.o2\");\r\n\r\n // Try opening a file to write to\r\n try {\r\n // Create writer\r\n BufferedWriter writer = new BufferedWriter(new FileWriter(file));\r\n\r\n // Determine what to write\r\n if (multipleOptimal){\r\n writer.write(\"YES\");\r\n } else {\r\n writer.write(\"NO\");\r\n }\r\n\r\n // Close writer\r\n writer.close();\r\n\r\n } catch (IOException e) {\r\n // Display error message\r\n System.out.println(\"Error opening file 5.o2\");\r\n }\r\n\r\n // Change structure into a string\r\n String structure = optimalStructure.toString();\r\n\r\n // Return the string\r\n return structure;\r\n\r\n }",
"void L3() throws Exception{\n\t\tSystem.out.println(\"1\");\n\t\tthrow e;\n\t}",
"public void printStackTrace(final PrintWriter writer) {\n if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {\n super.printStackTrace(writer);\n }\n NestedThrowable.Util.print(nested, writer);\n }",
"static String handleStackTrace(Throwable ex){\n // add the stack trace message\n StringBuilder builder = new StringBuilder(SPACE);\n builder.append(ex.getMessage());\n builder.append(NEWLINE);\n\n // add each line of the stack trace.\n for (StackTraceElement element : ex.getStackTrace()){\n builder.append(SPACE);\n builder.append(element.toString());\n builder.append(NEWLINE);\n }\n return builder.toString();\n }",
"private static void traversals(Node root) {\n\t\tSystem.out.println(\"Node Pre \" + root.data);\n\t\tfor(Node child : root.children) {\n\t\t\tSystem.out.println(\"Edge Pre \" + root.data + \"--\" + child.data);\n\t\t\ttraversals(child);\n\t\t\tSystem.out.println(\"Edge Post \" + root.data + \"--\" + child.data);\n\t\t}\n\t\tSystem.out.println(\"Node Post \" + root.data);\n\t}",
"private static String[] traceAll(StackTraceElement[] stackTraceElements, int depth) {\n if (null == stackTraceElements) {\n return null;\n }\n if ((null != stackTraceElements) && (stackTraceElements.length >= depth)) {\n StackTraceElement source = stackTraceElements[depth];\n StackTraceElement caller = (stackTraceElements.length > (depth + 1))\n ? stackTraceElements[depth + 1]\n : ((stackTraceElements.length > depth) ? stackTraceElements[depth] : stackTraceElements[stackTraceElements.length - 1]);\n if (null != source) {\n if (null != caller) {\n String[] out = new String[8];\n out[0] = source.getFileName();\n out[1] = source.getMethodName();\n out[2] = Integer.toString(source.getLineNumber());\n out[3] = source.getClassName().substring(source.getClassName().lastIndexOf('.') + 1);\n out[4] = caller.getFileName();\n out[5] = caller.getMethodName();\n out[6] = Integer.toString(caller.getLineNumber());\n out[7] = caller.getClassName().substring(caller.getClassName().lastIndexOf('.') + 1);\n return out;\n }\n }\n }\n return null;\n }",
"private void reportStackProbes(List<StackTraceElement[]> stackProbes) {\n if (stackProbes.size() == 0)\n return;\n \n Iterator<StackTraceElement[]> i = stackProbes.iterator();\n List<StackTraceElement> commonRoot = new ArrayList<StackTraceElement>();\n commonRoot.addAll(Arrays.asList(i.next()));\n Collections.reverse(commonRoot);\n while (i.hasNext()) {\n List<StackTraceElement> sample = new ArrayList<StackTraceElement>(Arrays.asList(i.next()));\n Collections.reverse(sample);\n int k = 0;\n for (; k < Math.min(commonRoot.size(), sample.size()); k++) {\n if (!commonRoot.get(k).equals(sample.get(k)))\n break;\n }\n commonRoot.subList(k, commonRoot.size()).clear();\n }\n Collections.reverse(commonRoot);\n \n StringBuilder b = new StringBuilder();\n b.append(stackProbes.size())\n .append(\" stack trace probe(s) taken and the constant root was:\\n ...\\n\");\n traces.formatStackTrace(b, commonRoot);\n b.append(\"\\nDiverging stack paths from individual probes (if different than the common root):\\n\");\n \n int reported = 0;\n for (int j = 0; j < stackProbes.size(); j++) {\n StackTraceElement[] sample = stackProbes.get(j);\n List<StackTraceElement> divergent = \n Arrays.asList(sample).subList(0, sample.length - commonRoot.size());\n if (divergent.size() > 0) {\n b.append(\"Probe #\" + (j + 1) + \"\\n\");\n traces.formatStackTrace(b, divergent);\n b.append(\" ...\\n\");\n reported++;\n }\n }\n \n if (reported == 0) {\n b.append(\"(all stacks constant.)\\n\");\n }\n \n logger.warning(b.toString());\n }",
"private String stackTraceToString( Throwable t ){\n StringWriter writer = new StringWriter();\n PrintWriter printWriter = new PrintWriter( writer );\n t.printStackTrace( printWriter );\n printWriter.flush();\n return writer.toString();\n }",
"public void printStackTrace(java.io.PrintWriter printWriter) {\r\n\t\tsuper.printStackTrace(printWriter);\r\n\t\tif (nestedException_ != null) {\r\n\t\t\tprintWriter.println(\"Caused by:\");\r\n\t\t\tnestedException_.printStackTrace(printWriter);\r\n\t\t}\r\n\t}",
"private void addTraps() {\n final Jimple jimple = Jimple.v();\n for (TryBlock<? extends ExceptionHandler> tryItem : tries) {\n int startAddress = tryItem.getStartCodeAddress();\n int length = tryItem.getCodeUnitCount(); // .getTryLength();\n int endAddress = startAddress + length; // - 1;\n Unit beginStmt = instructionAtAddress(startAddress).getUnit();\n // (startAddress + length) typically points to the first byte of the\n // first instruction after the try block\n // except if there is no instruction after the try block in which\n // case it points to the last byte of the last\n // instruction of the try block. Removing 1 from (startAddress +\n // length) always points to \"somewhere\" in\n // the last instruction of the try block since the smallest\n // instruction is on two bytes (nop = 0x0000).\n Unit endStmt = instructionAtAddress(endAddress).getUnit();\n // if the try block ends on the last instruction of the body, add a\n // nop instruction so Soot can include\n // the last instruction in the try block.\n if (jBody.getUnits().getLast() == endStmt\n && instructionAtAddress(endAddress - 1).getUnit() == endStmt) {\n Unit nop = jimple.newNopStmt();\n jBody.getUnits().insertAfter(nop, endStmt);\n endStmt = nop;\n }\n\n List<? extends ExceptionHandler> hList = tryItem.getExceptionHandlers();\n for (ExceptionHandler handler : hList) {\n String exceptionType = handler.getExceptionType();\n if (exceptionType == null) {\n exceptionType = \"Ljava/lang/Throwable;\";\n }\n Type t = DexType.toSoot(exceptionType);\n // exceptions can only be of RefType\n if (t instanceof RefType) {\n SootClass exception = ((RefType) t).getSootClass();\n DexlibAbstractInstruction instruction =\n instructionAtAddress(handler.getHandlerCodeAddress());\n if (!(instruction instanceof MoveExceptionInstruction)) {\n logger.debug(\n \"\"\n + String.format(\n \"First instruction of trap handler unit not MoveException but %s\",\n instruction.getClass().getName()));\n } else {\n ((MoveExceptionInstruction) instruction).setRealType(this, exception.getType());\n }\n\n Trap trap = jimple.newTrap(exception, beginStmt, endStmt, instruction.getUnit());\n jBody.getTraps().add(trap);\n }\n }\n }\n }",
"private void processTraceForTraceExplorer()\r\n {\r\n // retrieve the error with a trace for which the trace explorer was run\r\n final TLCError originalErrorWithTrace = TraceExplorerHelper.getErrorOfOriginalTrace(getModel());\r\n if (originalErrorWithTrace == null)\r\n {\r\n // the trace explorer is meaningless if the original trace cannot be recovered\r\n // all errors should be cleared\r\n getErrors().clear();\r\n return;\r\n }\r\n\r\n /*\r\n * The following will point to the error containing the trace for the\r\n * run of the trace explorer, iff the run of the trace explorer was successful.\r\n * The run was successful if TLC was able to evaluate the trace explorer\r\n * expressions at every possible state of the original trace.\r\n * \r\n * The value of successfulTEError is set in the following while loop, if the\r\n * run was successful.\r\n */\r\n TLCError successfulTEError = null;\r\n\r\n final Map<String, Formula> traceExplorerExpressions = getModel().getNamedTraceExplorerExpressionsAsFormula();\r\n \r\n // retrieve the original trace\r\n // this is necessary for items (3) and (5) from the list in the\r\n // documentation for this method\r\n List<TLCState> originalTrace = originalErrorWithTrace.getStates(Length.ALL);\r\n Assert.isNotNull(originalTrace, \"Could not get original trace after running trace explorer. This is a bug.\");\r\n\r\n // iterate through the errors to find one with a trace\r\n Iterator<TLCError> it = getErrors().iterator();\r\n while (it.hasNext())\r\n {\r\n TLCError error = it.next();\r\n\r\n if (error.hasTrace())\r\n {\r\n // Set the message, cause, and code of the error to the message of the original\r\n // error for which the trace explorer was run if the new error\r\n // message is for an invariant or property violation or deadlock. An invariant\r\n // or property violation or deadlock indicates that the trace explorer ran\r\n // successfully. This is item (6).\r\n int errorCode = error.getErrorCode();\r\n if (errorCode == EC.TLC_DEADLOCK_REACHED || errorCode == EC.TLC_TEMPORAL_PROPERTY_VIOLATED\r\n || errorCode == EC.TLC_INVARIANT_VIOLATED_BEHAVIOR\r\n || errorCode == EC.TLC_INVARIANT_VIOLATED_INITIAL)\r\n {\r\n error.setErrorCode(originalErrorWithTrace.getErrorCode());\r\n error.setMessage(originalErrorWithTrace.getMessage());\r\n error.setCause(originalErrorWithTrace.getCause());\r\n\r\n successfulTEError = error;\r\n } else\r\n {\r\n error.setMessage(TE_ERROR_HEADER + error.getMessage());\r\n }\r\n \r\n // a comparator used for sorting the variables within each\r\n // state so that the variables representing the trace explorer\r\n // expressions appear first in each state\r\n final Comparator<TLCVariable> varComparator = new Comparator<TLCVariable>() {\r\n\r\n public int compare(TLCVariable var0, TLCVariable var1)\r\n {\r\n if ((var0.isTraceExplorerVar() && var1.isTraceExplorerVar())\r\n || (!var0.isTraceExplorerVar() && !var1.isTraceExplorerVar()))\r\n {\r\n // both represent TE expressions or neither does\r\n // use string comparison to make sure\r\n // that the variables appear in the same order\r\n // in every state\r\n return var0.getName().compareTo(var1.getName());\r\n } else if (var0.isTraceExplorerVar())\r\n {\r\n // var0 should appear before\r\n return -1;\r\n } else\r\n {\r\n // var1 represents TE expression, so it should appear before\r\n return 1;\r\n }\r\n }\r\n };\r\n\r\n // found an error with a trace\r\n\r\n // this is the trace produced by the run\r\n // of TLC for the trace explorer\r\n List<TLCState> newTrace = error.getStates();\r\n\r\n Iterator<TLCState> newTraceIt = newTrace.iterator();\r\n Iterator<TLCState> originalTraceIt = originalTrace.iterator();\r\n\r\n TLCState currentStateNewTrace = newTraceIt.next();\r\n TLCState nextStateNewTrace = null;\r\n\r\n TLCState currentStateOriginalTrace = originalTraceIt.next();\r\n\r\n /*\r\n * The following while loop performs items 1-4 for some of the states.\r\n * In particular, if the original trace has n states and the trace produced\r\n * by the trace explorer has m states, this loop performs\r\n * items 1-4 for states 1 through min(n-1, m-1). The trace produced by the\r\n * trace explorer can be shorter than the original trace if there is a TLC error\r\n * during evaluation of one of the states. The trace produced by the trace explorer\r\n * can be longer than the original trace as in the example of item 5.\r\n * \r\n * The final state of the trace produced by the trace explorer is processed\r\n * after this loop. Item 5 is also accomplished after this loop.\r\n */\r\n while (newTraceIt.hasNext() && originalTraceIt.hasNext())\r\n {\r\n\r\n // change the label of the state of newTrace to the label of the state\r\n // of the original trace\r\n currentStateNewTrace.setLabel(currentStateOriginalTrace.getLabel());\r\n\r\n // set the location of the current state of the new trace\r\n currentStateNewTrace.setLocation(currentStateOriginalTrace.getModuleLocation());\r\n\r\n // need to get the next state in order to perform any\r\n // shifting of expression values (item 2 in the documentation)\r\n nextStateNewTrace = (TLCState) newTraceIt.next();\r\n\r\n TLCVariable[] currentStateNewTraceVariables = currentStateNewTrace.getVariables();\r\n TLCVariable[] nextStateNewTraceVariables = nextStateNewTrace.getVariables();\r\n\r\n // iterate through the variables\r\n for (int i = 0; i < currentStateNewTraceVariables.length; i++)\r\n {\r\n // This code assumes that the variables are in the same order in each state\r\n String variableName = currentStateNewTraceVariables[i].getName();\r\n // if next state is back to state or stuttering, it has no variables, so the code\r\n // contained within the if block would cause an NPE\r\n if (!nextStateNewTrace.isBackToState() && !nextStateNewTrace.isStuttering())\r\n {\r\n Assert.isTrue(variableName.equals(nextStateNewTraceVariables[i].getName()),\r\n \"Variables are not in the same order in each state. This is unexpected.\");\r\n }\r\n\r\n // retrieve the object containing the data corresponding to the variable.\r\n // this object will be null if the variable currently being looked at does\r\n // not represent a trace explorer expression\r\n // If the variable does represent a trace explorer expression, then the following\r\n // object will contain the variable name, the expression, and the level of the expression\r\n TraceExpressionInformationHolder traceExpressionData = traceExpressionDataTable\r\n .get(variableName.trim());\r\n\r\n if (traceExpressionData != null)\r\n {\r\n // we have located a trace expression variable\r\n\r\n // If next state is back to state or stuttering, it has no variables, so the\r\n // code contained within this if block would not apply. It should be unnecessary\r\n // to check for this because the while loop should terminate before this happens.\r\n if (!nextStateNewTrace.isBackToState() && !nextStateNewTrace.isStuttering()\r\n && traceExpressionData.getLevel() == 2)\r\n {\r\n // found expression with primed variables\r\n // shift the value from the next state to the current state\r\n currentStateNewTraceVariables[i].setValue(nextStateNewTraceVariables[i].getValue());\r\n\r\n }\r\n\r\n // set the name to be the expression the variable represents\r\n currentStateNewTraceVariables[i].setName(traceExpressionData.getExpression());\r\n\r\n // flag this as a variable representing a trace explorer expression\r\n currentStateNewTraceVariables[i].setTraceExplorerVar(true);\r\n\r\n continue;\r\n }\r\n \r\n if (traceExplorerExpressions.containsKey(variableName.trim())) {\r\n \tcurrentStateNewTraceVariables[i].setTraceExplorerVar(true);\r\n }\r\n }\r\n\r\n // sort the variables so that the variables representing trace explorer\r\n // expressions appear first\r\n Arrays.sort(currentStateNewTraceVariables, varComparator);\r\n\r\n currentStateNewTrace = nextStateNewTrace;\r\n\r\n currentStateOriginalTrace = originalTraceIt.next();\r\n }\r\n\r\n /*\r\n * Remove any extra states (item 5).\r\n * \r\n * This is only necessary for looping or stuttering traces\r\n * (n elements in original trace, m elements in new trace)-\r\n * if (m >= n) remove states n..m\r\n * else do nothing\r\n * \r\n * if (m >= n), the new trace will be left with n-1 elements.\r\n * Later code adds the final stuttering or \"back to state\" state\r\n * to these traces.\r\n * \r\n * There should never be extra states for non-looping, non-stuttering\r\n * traces.\r\n */\r\n if ((currentStateOriginalTrace.isBackToState() || currentStateOriginalTrace.isStuttering())\r\n && newTrace.size() >= originalTrace.size())\r\n {\r\n newTrace.subList(originalTrace.size() - 1, newTrace.size()).clear();\r\n }\r\n\r\n error.restrictTraceTo(originalErrorWithTrace.getTraceRestriction());\r\n\r\n // new trace should now be no longer than the original trace\r\n Assert.isTrue(newTrace.size() <= originalTrace.size(),\r\n \"States from trace explorer trace not removed properly.\");\r\n\r\n // fix the final state\r\n TLCState finalStateOriginalTrace = (TLCState) originalTrace.get(originalTrace.size() - 1);\r\n\r\n if (newTrace.size() < originalTrace.size() - 1\r\n || (!finalStateOriginalTrace.isStuttering() && !finalStateOriginalTrace.isBackToState()))\r\n {\r\n /*\r\n * For a non-looping and non-stuttering state, just set the expressions\r\n * with primed variables equal to \"--\" for the last state.\r\n * \r\n * Do the same thing if the new trace is less than the original trace size minus 1.\r\n * This means there was a TLC error before evaluating all of the states, so\r\n * even if the original trace finished with a looping state or a stuttering state, the\r\n * trace that is displayed to the user should not. It should terminate before the TLC error\r\n * occurred.\r\n */\r\n\r\n TLCState finalStateNewTrace = (TLCState) newTrace.get(newTrace.size() - 1);\r\n\r\n // state in the original trace at the same position as finalStateNewTrace\r\n TLCState samePositionOriginalTrace = (TLCState) originalTrace.get(newTrace.size() - 1);\r\n\r\n // set the label of the final state of the new trace\r\n finalStateNewTrace.setLabel(samePositionOriginalTrace.getLabel());\r\n\r\n // set the location of the final state of the new trace\r\n finalStateNewTrace.setLocation(samePositionOriginalTrace.getModuleLocation());\r\n\r\n TLCVariable[] finalStateNewTraceVariables = finalStateNewTrace.getVariables();\r\n\r\n // iterate through the variables\r\n for (int i = 0; i < finalStateNewTraceVariables.length; i++)\r\n {\r\n\r\n TraceExpressionInformationHolder traceExpressionData = traceExpressionDataTable\r\n .get(finalStateNewTraceVariables[i].getName().trim());\r\n\r\n if (traceExpressionData != null)\r\n {\r\n // we have located a trace expression variable\r\n\r\n if (traceExpressionData.getLevel() == 2)\r\n {\r\n // expression with primed variables\r\n // shift the value from the next state to the current state\r\n finalStateNewTraceVariables[i].setValue(TLCVariableValue.parseValue(\"\\\"--\\\"\"));\r\n }\r\n\r\n // set the name to be the expression the variable represents\r\n finalStateNewTraceVariables[i].setName(traceExpressionData.getExpression());\r\n // flag this as a variable representing a trace explorer expression\r\n finalStateNewTraceVariables[i].setTraceExplorerVar(true);\r\n }\r\n }\r\n\r\n // sort the variables of the final state\r\n Arrays.sort(finalStateNewTraceVariables, varComparator);\r\n } else if (finalStateOriginalTrace.isBackToState())\r\n {\r\n\t\t\t\t\terror.addState(TLCState.BACK_TO_STATE(finalStateOriginalTrace.getStateNumber(),\r\n\t\t\t\t\t\t\tgetModel().getName()), stateSortDirection);\r\n } else\r\n {\r\n // stuttering trace\r\n\t\t\t\t\terror.addState(TLCState.STUTTERING_STATE(finalStateOriginalTrace.getStateNumber(),\r\n\t\t\t\t\t\t\tgetModel().getName()), stateSortDirection);\r\n }\r\n\r\n } else\r\n {\r\n // error does not have trace\r\n // indicate that it is an error from the trace explorer\r\n error.setMessage(TE_ERROR_HEADER + error.getMessage());\r\n }\r\n }\r\n\r\n /*\r\n * The following accomplishes item 7 from the above documentation.\r\n */\r\n if (successfulTEError != null)\r\n {\r\n List<TLCError> originalErrors = TLCOutputSourceRegistry.getModelCheckSourceRegistry().getProvider(getModel())\r\n .getErrors();\r\n List<TLCError> newErrors = new LinkedList<TLCError>();\r\n Iterator<TLCError> iterator = originalErrors.iterator();\r\n while (iterator.hasNext())\r\n {\r\n TLCError next = iterator.next();\r\n if (next == originalErrorWithTrace)\r\n {\r\n newErrors.add(successfulTEError);\r\n } else\r\n {\r\n newErrors.add(next);\r\n }\r\n }\r\n\r\n setErrors(newErrors);\r\n }\r\n\r\n }",
"public void processTrace() throws Exception {\n\n log.debug( \"\\t Processing trace for NEDBO id = \" + \n getNotesElementId() ) ;\n \n if( getNotesElementId() == -1 ) {\n log.info( \"\\t Notes element will be created.\" ) ;\n NotesElementDAO.create( this ) ;\n return ;\n }\n else if( isModified ) {\n log.info( \"\\t Notes element will be updated. id=\" + \n getNotesElementId() ) ;\n NotesElementDAO.update( this ) ;\n }\n else if( !sourceTrace ) {\n log.info( \"\\t Notes element will be deleted. id=\" + \n getNotesElementId() ) ;\n NotesElementDAO.delete( this ) ;\n return ;\n // The associated cards will be cascade deleted at the database.\n // No need to delete them explicitly.\n }\n \n for( CardDBO dbo : cards ) {\n dbo.processTrace() ;\n }\n }",
"private static void backtrace(int dest, int[] parents) {\n int node = dest;\n\n // Hmmm.... need some code.\n System.out.println(\"Path\" );\n\n }",
"@Override\n\tpublic void traceExit() {\n\n\t}",
"private static void printMoveTraceHelper(SolveFringeElement root) {\r\n\t\twhile (root != null) {\r\n\t\t\tif (root.oldBlockPosition != null && root.newBlockPosition != null) {\r\n\t\t\t\toutputStack.push(root.oldBlockPosition.toString() + \" \"\r\n\t\t\t\t\t\t+ root.newBlockPosition.toString());\r\n\t\t\t}\r\n\t\t\troot = root.parent;\r\n\t\t}\r\n\t}",
"private List<? extends Object> getTail(List<? extends Object> trace) {\r\n\t\tList<Object> tail = new ArrayList<Object>(trace.size() - 1);\r\n\t\tfor (int i = 1; i < trace.size(); i++) {\r\n\t\t\ttail.add(trace.get(i));\r\n\t\t}\r\n\t\treturn tail;\r\n\t}",
"private String getStackTrace(Exception ex) {\r\n\t\tStringWriter sw = new StringWriter();\r\n\t\tex.printStackTrace(new PrintWriter(sw));\r\n return sw.toString();\r\n\t}",
"public AccessibilityNodeInfo getTraversalBefore() {\n/* 376 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\r\n\tpublic void printStackTrace() {\n\t\tsuper.printStackTrace();\r\n\t}",
"private String getStacktraceFromException(Exception e) {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tPrintStream ps = new PrintStream(baos);\n\t\te.printStackTrace(ps);\n\t\tps.close();\n\t\treturn baos.toString();\n\t}",
"private Queue<T> backtrace(T node, Map<T, T> parentMap) {\n LinkedList<T> path = new LinkedList<>();\n path.add(node);\n\n int previousX, previousY, currentX, currentY;\n int dx, dy;\n int steps;\n T temp;\n while (parentMap.containsKey(node)) {\n previousX = parentMap.get(node).x;\n previousY = parentMap.get(node).y;\n currentX = node.x;\n currentY = node.y;\n steps = Integer.max(Math.abs(previousX - currentX), Math.abs(previousY - currentY));\n dx = Integer.compare(previousX, currentX);\n dy = Integer.compare(previousY, currentY);\n\n temp = node;\n for (int i = 0; i < steps; i++) {\n temp = graph.getNode(temp.x + dx, temp.y + dy);\n path.addFirst(temp);\n }\n\n node = parentMap.get(node);\n }\n return path;\n }",
"private void handleException(Throwable e) {\n if (e instanceof ExitException) {\n if (e.getCause() != null) {\n handleException(e.getCause());\n }\n sysexit.accept(((ExitException) e).status);\n } else if (Level.QUIET.compareTo(verbosity) < 0) {\n String prefix = beforeFirst(name(), ' ') + \": \";\n stderr.print(prefix);\n if (Level.DEBUG.compareTo(verbosity) <= 0) {\n e.printStackTrace(stderr);\n } else if (Level.VERBOSE.compareTo(verbosity) <= 0) {\n int depth = 0;\n Throwable failure = e;\n while (failure != null) {\n stderr.print(Strings.repeat(\" \", (depth > 0 ? prefix.length() - 4 : 0) + (4 * depth++)));\n stderr.println(removePrefix(failure.toString(), failure.getClass().getName() + \": \"));\n failure = failure.getCause();\n }\n } else if (Level.DEFAULT.compareTo(verbosity) <= 0) {\n stderr.println(formatException(e));\n }\n }\n }",
"private static Throwable handle(final Throwable e) {\r\n\t\te.printStackTrace();\r\n\r\n\t\tif (e.getCause() != null) {\r\n\t\t\te.getCause().printStackTrace();\r\n\t\t}\r\n\t\tif (e instanceof SAXException) {\r\n\t\t\t((SAXException) e).getException().printStackTrace();\r\n\t\t}\r\n\t\treturn e;\r\n\t}",
"public void dumpChildren ()\r\n {\r\n dumpChildren(0);\r\n }",
"private static void parse(Node node, Instances header, Reason parentTrace, Map<String, DNF> valueTraces) {\n Edge edgeToChild;\n int i = 0; // need to use funky counter because Node doesn't return count of children\n\n while ((edgeToChild = node.getChild(i)) != null) { // depth-first search\n /*\n * Each branch means there's an alternative path,\n * so create a new trace for it.\n * Make sure it is a duplicate copy.\n * Always clone so that sibling traces would not see changes done by previous siblings\n */\n Reason trace = parentTrace.clone();\n \n /*\n * Next, prepare extension to the trace\n */\n \n Parameter<?> childExpression = createParameter(node, edgeToChild, header);\n \n /*\n * Append child to trace\n */\n // first check if a previous Comparison was already about this attribute, then just update its bounds\n trace.addOrMerge(childExpression);\n// System.out.println(\"trace = \" + trace);\n// System.out.println(\"parentTrace = \" + parentTrace);\n \n // recurse\n Node childNode = edgeToChild.getTarget();\n parse(childNode, header, trace, valueTraces);\n\n i++;\n }\n \n if (i == 0) { // no child edges => is leaf node\n // expect format \"yes (2.0)\" or \"Not Exercising (2.0)\"\n String nodeLabel = node.getLabel();\n nodeLabel = nodeLabel.substring(1, nodeLabel.length()-1); // XIAOLAN: missing from original code\n String classValue = nodeLabel.split(\"[()]\")[0].trim(); // just take the part before '('\n \n valueTraces.get(classValue) // get Disjunction for the class value\n .add(parentTrace); // add to its traces\n }\n }",
"static public String getStackTrace(Exception e) {\n java.io.StringWriter s = new java.io.StringWriter(); \n e.printStackTrace(new java.io.PrintWriter(s));\n String trace = s.toString();\n \n if(trace==null || trace.length()==0 || trace.equals(\"null\"))\n return e.toString();\n else\n return trace;\n }",
"@Test\n public void test20() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1341,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test20\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode(\"\");\n iIOMetadataNode0.getParentNode();\n // Undeclared exception!\n try {\n IteratorUtils.nodeListIterator((Node) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Node must not be null\n //\n }\n }",
"public static String getPrintStackTrace(Exception e){\n\t\tStringWriter sw = new StringWriter();\n\t\t//PrintWriter integrates with StringWriter\n\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t//This line used to write in catch block then it will writes in the console prints upon the console\n\t\t//Basically prints the data upon the console\n\t\te.printStackTrace(pw);\n\t\t//it will converts to tostring method into some meaningful data\n\t\treturn sw.toString();\n\t}",
"@Test(timeout = 4000)\n public void test16() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(73);\n simpleNode0.jjtGetParent();\n simpleNode0.jjtAddChild((Node) null, 73);\n StringWriter stringWriter0 = new StringWriter();\n FileSystemHandling.shouldAllThrowIOExceptions();\n simpleNode0.dump(\"|]nahi@b_5\", stringWriter0);\n simpleNode0.jjtGetNumChildren();\n simpleNode0.jjtAddChild((Node) null, 74);\n simpleNode0.jjtGetNumChildren();\n simpleNode0.jjtGetParent();\n // Undeclared exception!\n try { \n simpleNode0.jjtGetChild(2655);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 2655\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.SimpleNode\", e);\n }\n }",
"private static String[] getStackElementParts(int depth) {\n String[] out = new String[2];\n if (-1 == depth) {\n return out;\n } else if (LOG_ALL == depth) {\n out = traceAll(Thread.currentThread().getStackTrace(), LOG_ALL);\n } else if (DEBUG_TRACE_ALL == (DEBUG & DEBUG_TRACE)) {\n out = traceAll(Thread.currentThread().getStackTrace(), DEPTH_ADD + depth);\n } else {\n out[1] = getTraceMethod(Thread.currentThread().getStackTrace(), DEPTH_ADD + depth);\n }\n return out;\n }",
"@Override\n\tpublic void printStackTrace() {\n\t\tsuper.printStackTrace();\n\t}",
"@Override\n\tpublic void printStackTrace() {\n\t\tsuper.printStackTrace();\n\t}",
"public void printStackTrace(Throwable t) {\n\t\tt.printStackTrace(out);\n\n\t\tMethod[] methods = t.getClass().getMethods();\n\n\t\tint size = methods.length;\n\t\tClass throwable = Throwable.class;\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tMethod method = methods[i];\n\n\t\t\tif (Modifier.isPublic(method.getModifiers())\n\t\t\t\t\t&& method.getName().startsWith(\"get\") && throwable.isAssignableFrom(method.getReturnType()) && (method.getParameterTypes().length == 0)) { //$NON-NLS-1$\n\t\t\t\ttry {\n\t\t\t\t\tThrowable nested = (Throwable) method.invoke(t, null);\n\n\t\t\t\t\tif ((nested != null) && (nested != t)) {\n\t\t\t\t\t\tout.println(ConsoleMsg.CONSOLE_NESTED_EXCEPTION);\n\t\t\t\t\t\tprintStackTrace(nested);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (IllegalAccessException e) {\n\t\t\t\t}\n\t\t\t\tcatch (InvocationTargetException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"synchronized public static String traceErrorForWeb(Throwable e) {\n\n StringBuffer sb = new StringBuffer();\n\n sb.append(\n \" <font color='blue'><a href='#' onclick='$(info\" + e.hashCode() + \").style.display=\\\"block\\\"'>details</a>\"\n + \"<div id='info\" + e.hashCode() + \"' style='display:none'>\" + e.toString() + \" \" + Tools.traceError(e) + \"</div></font>\"\n );\n return sb.toString();\n }",
"private void printStackTrace(Exception ex, GUILog gl) {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n ex.printStackTrace(pw);\n gl.log(sw.toString()); // stack trace as a string\n ex.printStackTrace();\n }",
"@Test(timeout = 4000)\n public void test083() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n Short short0 = new Short((short)1);\n jSONObject0.putOpt(\"0\", short0);\n jSONObject0.getLong(\"0\");\n LinkedList<Short> linkedList0 = new LinkedList<Short>();\n // Undeclared exception!\n try { \n linkedList0.pop();\n fail(\"Expecting exception: NoSuchElementException\");\n \n } catch(NoSuchElementException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.util.LinkedList\", e);\n }\n }",
"public void printStackTrace(PrintWriter output){\n\t\tsynchronized (output) {\n\t\t\tsuper.printStackTrace(output);\n\t\t\tprintChildren(status, output);\n\t\t}\n\t}",
"public void traverseExcludeSelf(INext<T> next){\n if(next==null){\n return;\n }\n traverse(this,next,false);\n }",
"@Override\n\tpublic EntryMessage traceEntry() {\n\t\treturn null;\n\t}",
"@Override\r\n public ExceptionHandler<Container> getParent() {\n return null;\r\n }",
"public static void printStackTrace() {\n if (outputEnabled) {\n synchronized (out) {\n new Exception(\"Diagnostic Stack Trace\").printStackTrace(out); // NORES\n }\n }\n }",
"private void tracePath(Node lastVisitedNode)\r\n {\r\n Node pathPtr = lastVisitedNode;\r\n while (pathPtr != Start)\r\n {\r\n pathPtr.isVisited = true;\r\n pathPtr = pathPtr.parent;\r\n }\r\n }",
"private void printExceptions(Exception[] es) {\n if (es.length > 0) {\n System.out.println();\n }\n for (int i = 0; i < es.length; i++) {\n es[i].printStackTrace();\n }\n }",
"static void b() throws MidLevelException {\n try{ c();\n }catch(MidLevelException e) {\n System.out.println(\"-----MidLevelException b()----\");\n StackTraceElement elements[] = e.getStackTrace();\n for (int i = 0, n = elements.length; i < n; i++) { \n \tSystem.err.println(elements[i].getFileName()\n \t+ \":\" + elements[i].getLineNumber() \n \t+ \">> \"\n \t+ elements[i].getMethodName() + \"()\");\n \t}\n \tSystem.out.println(\"------------------------\");\n \tthrow new MidLevelException(e);\n }\n }",
"public ArrayList<SlidingPuzzleState> getTrace(){\n\t\tArrayList<SlidingPuzzleState> trace = new ArrayList<SlidingPuzzleState>();\n\t\tSlidingPuzzleState tmp = this;\n\t\twhile (tmp!=null){\n\t\t\ttrace.add(0,tmp);\n\t\t\ttmp = tmp._parent;\n\t\t}\n\t\treturn trace;\n\t}",
"private void printSQLException(SQLException ex) {\n\t\tfor (Throwable e : ex) {\n\t\t\tif (e instanceof SQLException) {\n\t\t\t\te.printStackTrace(System.err);\n\t\t\t\tSystem.err.println(\"SQLState: \" + ((SQLException) e).getSQLState());\n\t\t\t\tSystem.err.println(\"Error Code: \" + ((SQLException) e).getErrorCode());\n\t\t\t\tSystem.err.println(\"Message: \" + e.getMessage());\n\t\t\t\tThrowable t = ex.getCause();\n\t\t\t\twhile (t != null) {\n\t\t\t\t\tSystem.out.println(\"Cause: \" + t);\n\t\t\t\t\tt = t.getCause();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void testPrintStackTracePrintWriter_False() {\n ByteArrayOutputStream ba = new ByteArrayOutputStream(); \n PrintWriter ps = new PrintWriter(ba, false);\n try {\n throw new Exception(\"level1\", new Exception(\"level2\", new Exception(\"level3\", new NullPointerException())));\n } catch (Exception e) {\n e.printStackTrace(ps);\n }\n assertEquals(\"the output should be empty until flush\",\n \"\", ba.toString());\n }",
"private void recur(Element element, List<Data> sources) throws Exception {\n\n Element[] relates = XMLUtil.getDirectRelateChildNodes(element);\n if (relates.length < 1) {\n return;\n }\n\n for (Element relatesData : relates) {\n log.info(\"###################### begin Import table [\"\n + XMLUtil.getSourceType(relatesData) + \"] ####################\");\n log.info(String.format(table_log, XMLUtil.getSourceType(relatesData)));\n\n HashMap<Integer, Integer> keys = DataAccessDelegate.getNumbersOfDataType(relatesData,\n dataSource);\n log.info(String.format(result_count, keys.size(), XMLUtil.getSourceType(relatesData)));\n if (keys == null || keys.isEmpty()) {\n continue;\n }\n Data sorData = getDataOfDataType(relatesData);\n sorData.setIdentifiers(keys);\n sources.add(sorData);\n\n log.info(String.format(relation_log, XMLUtil.getSourceType(element), XMLUtil\n .getSourceType(relatesData), XMLUtil.getSourceRelationType(relatesData)));\n\n HashMap<Integer, Integer> keys1 = DataAccessDelegate.getNumbersOfRelation(relatesData,\n dataSource);\n log.info(String.format(result_rel_count, keys1.size(), XMLUtil\n .getSourceRelationType(relatesData)));\n if (keys1 != null && !keys1.isEmpty()) {\n Data relData = getDataOfRelation(relatesData);\n relData.setIdentifiers(keys1);\n sources.add(relData);\n }\n log.info(\"###################### end Import table [\" + XMLUtil.getSourceType(relatesData)\n + \"] ####################\");\n recur(relatesData, sources);\n }\n }",
"public static Throwable getDeepestCause(Throwable e) {\n\t\tThrowable cause = e;\n\t\tThrowable parent = e.getCause();\n\t\twhile (parent!=null && parent!=e) {\n\t\t\tcause = parent;\n\t\t\tparent = cause.getCause();\n\t\t}\n\t\treturn cause;\n\t}",
"private void printStackTrace( Exception e )\n {\n logger.printStackTrace( e, 1 );\n }",
"public void printError(RubyException excp) {\n if (excp == null || excp.isNil()) {\n return;\n }\n \n if (RubyException.TRACE_TYPE == RubyException.RUBINIUS) {\n printRubiniusTrace(excp);\n return;\n }\n \n ThreadContext context = getCurrentContext();\n IRubyObject backtrace = excp.callMethod(context, \"backtrace\");\n \n PrintStream errorStream = getErrorStream();\n if (backtrace.isNil() || !(backtrace instanceof RubyArray)) {\n if (context.getFile() != null) {\n errorStream.print(context.getFile() + \":\" + context.getLine());\n } else {\n errorStream.print(context.getLine());\n }\n } else if (((RubyArray) backtrace).getLength() == 0) {\n printErrorPos(context, errorStream);\n } else {\n IRubyObject mesg = ((RubyArray) backtrace).first();\n \n if (mesg.isNil()) {\n printErrorPos(context, errorStream);\n } else {\n errorStream.print(mesg);\n }\n }\n \n RubyClass type = excp.getMetaClass();\n String info = excp.toString();\n \n if (type == getRuntimeError() && (info == null || info.length() == 0)) {\n errorStream.print(\": unhandled exception\\n\");\n } else {\n String path = type.getName();\n \n if (info.length() == 0) {\n errorStream.print(\": \" + path + '\\n');\n } else {\n if (path.startsWith(\"#\")) {\n path = null;\n }\n \n String tail = null;\n if (info.indexOf(\"\\n\") != -1) {\n tail = info.substring(info.indexOf(\"\\n\") + 1);\n info = info.substring(0, info.indexOf(\"\\n\"));\n }\n \n errorStream.print(\": \" + info);\n \n if (path != null) {\n errorStream.print(\" (\" + path + \")\\n\");\n }\n \n if (tail != null) {\n errorStream.print(tail + '\\n');\n }\n }\n }\n \n excp.printBacktrace(errorStream);\n }",
"Object getTrace();",
"public void printExitDiscrepancies() {\n// violations.stream()\n// .filter((ValidationError t) -> t.getType() == ValidationError.ViolationType.SYSTEM)\n// .forEach(e -> {\n// System.out.println(e.getEmployee());\n// });\n printEmployeesForViolationType(ValidationError.ViolationType.SYSTEM);\n }",
"public void printStackTrace(){\n\t\tprintStackTrace(System.err);\n\t}",
"static void c() throws MidLevelException {\n try {\n \t//Metodo c() llama a metodo d()\n d();\n } catch(LowLevelException e) {\n \tSystem.out.println(\"-----LowLevelException c()----\");\n StackTraceElement elements[] = e.getStackTrace();\n for (int i = 0, n = elements.length; i < n; i++) { \n \tSystem.err.println(elements[i].getFileName()\n \t+ \":\" + elements[i].getLineNumber() \n \t+ \">> \"\n \t+ elements[i].getMethodName() + \"()\");\n }\n System.out.println(\"------------------------\");\n throw new MidLevelException(e);\n }\n }",
"public static void printExceptionTraceCauses(Throwable throwable) {\n throwable.printStackTrace();\n if (null != throwable.getCause()) {\n e(\"Caused by:\");\n printExceptionTraceCauses(throwable.getCause());\n }\n }",
"public abstract List<? extends Pair<Type.Clazz,String>> exceptions();",
"public Stacktrace next() throws IOException {\n\t\tString line;\n\t\tStacktrace stacktrace = null;\n\t\twhile (stacktrace == null && (line = input.readLine()) != null) {\n\t\t\tif (!StringUtils.isEmpty(line)) {\n\t\t\t\tlineBuffer.add(line);\n\t\t\t\tstacktrace = processLine(line);\n\t\t\t}\n\t\t}\n\t\treturn stacktrace;\n\t}",
"public void printStackTrace(PrintStream output){\n\t\tsynchronized (output) {\n\t\t\tsuper.printStackTrace(output);\n\t\t\tprintChildren(status, output);\n\t\t}\n\t}",
"@Override\n\tpublic synchronized Throwable fillInStackTrace() {\n\t\treturn super.fillInStackTrace();\n\t}",
"@Test(timeout = 4000)\n public void test098() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"unterminated block comment\");\n // Undeclared exception!\n try { \n xmlEntityRef0.noframes();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"private void epilog() {\r\n\r\n code.highlight(14);\r\n /**\r\n * sorts the points in \"ResultList\" by the x coordinates\r\n */\r\n Collections.sort(ResultList, new PointCompare());\r\n\r\n /**\r\n * show the resulting line from ResultList\r\n */\r\n int n_points = ResultList.size();\r\n int n_points_counter = 0;\r\n Node[] bucketPolyline = new Node[2];\r\n while (n_points != 1) {\r\n Point point_curr = ResultList.get(n_points_counter); // get the n'th point\r\n Point point_next = ResultList.get(n_points_counter + 1); // get the n+1'th\r\n // point\r\n\r\n bucketPolyline[0] = new Coordinates(point_curr.x, point_curr.y\r\n + (max_Y - min_Y) + 20);\r\n bucketPolyline[1] = new Coordinates(point_next.x, point_next.y\r\n + (max_Y - min_Y) + 20);\r\n lang.newPolyline(bucketPolyline, \"r_pl\" + (n_points_counter + 1), null,\r\n rPolyline);\r\n n_points_counter++;\r\n n_points--;\r\n }\r\n\r\n lang.nextStep();\r\n\r\n int i = ResultList.size();\r\n int j = points.size();\r\n TextProperties textProps = new TextProperties();\r\n Result = lang.newText(new Coordinates(min_X, 410), \"Result\", \"epsilon\",\r\n null, textProps);\r\n Result.setText(\"Result: the initial line has been reduced from \" + j\r\n + \" to \" + (j - (j - i)) + \" points.\", null, null);\r\n Text rec_calls_t = lang.newText(new Coordinates(min_X, 425), \"rec_calls\",\r\n \"rec_calls\", null, textProps);\r\n rec_calls_t\r\n .setText(\r\n \"There were \"\r\n + (rec_calls - 1)\r\n + \" recursive calls of rdp_func performed to process the initial line!\",\r\n null, null);\r\n\r\n System.out.println(points);\r\n code.unhighlight(14);\r\n\r\n lang.nextStep();\r\n\r\n }",
"public final void a(com.ss.android.socialbase.downloader.exception.BaseException r5) {\n /*\n r4 = this;\n com.ss.android.socialbase.downloader.model.DownloadInfo r0 = r4.f30922b\n r1 = 0\n r0.setFirstDownload(r1)\n if (r5 == 0) goto L_0x0022\n java.lang.Throwable r0 = r5.getCause()\n if (r0 == 0) goto L_0x0022\n java.lang.Throwable r0 = r5.getCause()\n boolean r0 = r0 instanceof android.database.sqlite.SQLiteFullException\n if (r0 == 0) goto L_0x0022\n com.ss.android.socialbase.downloader.downloader.i r0 = r4.f30923c // Catch:{ SQLiteException -> 0x003f }\n com.ss.android.socialbase.downloader.model.DownloadInfo r1 = r4.f30922b // Catch:{ SQLiteException -> 0x003f }\n int r1 = r1.getId() // Catch:{ SQLiteException -> 0x003f }\n r0.f(r1) // Catch:{ SQLiteException -> 0x003f }\n goto L_0x003f\n L_0x0022:\n com.ss.android.socialbase.downloader.downloader.i r0 = r4.f30923c // Catch:{ SQLiteException -> 0x0034 }\n com.ss.android.socialbase.downloader.model.DownloadInfo r1 = r4.f30922b // Catch:{ SQLiteException -> 0x0034 }\n int r1 = r1.getId() // Catch:{ SQLiteException -> 0x0034 }\n com.ss.android.socialbase.downloader.model.DownloadInfo r2 = r4.f30922b // Catch:{ SQLiteException -> 0x0034 }\n long r2 = r2.getCurBytes() // Catch:{ SQLiteException -> 0x0034 }\n r0.b((int) r1, (long) r2) // Catch:{ SQLiteException -> 0x0034 }\n goto L_0x003f\n L_0x0034:\n com.ss.android.socialbase.downloader.downloader.i r0 = r4.f30923c // Catch:{ SQLiteException -> 0x003f }\n com.ss.android.socialbase.downloader.model.DownloadInfo r1 = r4.f30922b // Catch:{ SQLiteException -> 0x003f }\n int r1 = r1.getId() // Catch:{ SQLiteException -> 0x003f }\n r0.f(r1) // Catch:{ SQLiteException -> 0x003f }\n L_0x003f:\n r0 = -1\n r4.a((int) r0, (com.ss.android.socialbase.downloader.exception.BaseException) r5)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.socialbase.downloader.downloader.e.a(com.ss.android.socialbase.downloader.exception.BaseException):void\");\n }",
"public static void traversals(Node node){\r\n System.out.println(\"Node Pre \" + node.data);\r\n for(Node child : node.children){\r\n System.out.println(\"Edge Pre \" + node.data + \"--\" + child.data);\r\n traversals(child);\r\n System.out.println(\"Edge Post \" + node.data + \"--\" + child.data);\r\n }\r\n System.out.println(\"Node Post \" + node.data);\r\n }",
"@Test\n public void swallowExceptionsPropagatingAspect() throws Exception {\n CallofDocument doc = deepSwallowing(parseDoc());\n\n // probably will throw IllegalStateException\n doc.getDemands().get(1).fancyBusinessLogic();\n\n List<Throwable> exceptions = exceptions(doc);\n Assertions.assertThat(exceptions).isNotEmpty();\n }",
"DiagnosticInfo getInnerDiagnosticInfo();",
"public final void printStackTrace( PrintWriter writer )\r\n {\r\n super.printStackTrace( writer );\r\n // Only print causal stack traces if pre-JDK 1.4.\r\n if ( !JDK1_4 ) {\r\n Throwable t = getCause();\r\n while ( t != null ) {\r\n writer.println( \"Caused by: \" + t );\r\n t.printStackTrace( writer );\r\n if ( t instanceof CanyonException ) {\r\n t = ( ( CanyonException ) t ).getCause();\r\n } else {\r\n break;\r\n }\r\n }\r\n }\r\n }",
"public void retrace(){\n\t\t//look at the sPath stack\n\t\tPoint temp = sPath.peek();\n\t\t// find neighbor with lowest score\n\t\tPoint lNeighbor = backtrack(temp);\n\t\t// coordinates of lNeighbor\n\t\tint x = (int) lNeighbor.getX();\n\t\tint y = (int) lNeighbor.getY();\n\t\t// score of neighbor\n\t\tint score = topology[x][y];\n\t\t// if there is no more neighbor then lNeighbor = temp\n\t\t// then we reach the Start then\n\t\twhile(score!=0){\n\t\t\t// push that neighbor on the stack\n\t\t\tsPath.push(lNeighbor);\n\t\t\t// update temp and lNeighbor\n\t\t\ttemp = sPath.peek();\n\t\t\tlNeighbor = backtrack(temp);\n\t\t\t// coordinates of lNeighbor\n\t\t\tx = (int) lNeighbor.getX();\n\t\t\ty = (int) lNeighbor.getY();\n\t\t\t// score of neighbor\n\t\t\tscore = topology[x][y];\n\t\t}\n\t\t// we have to do that until we see the start with score 0\n\t\t// the last lNeighbor is the S with score = 0, push it to the stack\n\t\tsPath.push(lNeighbor);\n\t\twhile(!sPath.isEmpty()){\n\t\t\tPoint track = sPath.pop();\n\t\t\tSystem.out.println(\"(\"+(int)track.getX()+\",\"+(int)track.getY()+\")\");\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test04() throws Throwable {\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n SimpleNode simpleNode0 = new SimpleNode(88);\n simpleNode0.identifiers = null;\n EvoSuiteFile evoSuiteFile0 = null;\n String string0 = \"q_$:q\";\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"q_$:q\");\n EvoSuiteFile evoSuiteFile1 = null;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n String string1 = \"<\";\n Node node0 = null;\n // Undeclared exception!\n try { \n simpleNode0.toString(\"q_$:q\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.SimpleNode\", e);\n }\n }",
"void printStackTrace(PrintWriter writer);",
"public void outIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).edge + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"private void renderDownPaths(Node n)\n {\n\tif (n.siblings.size()==0) {\n\t renderPath(n);\n\t return;\n\t}\n\n\tVectorIterator vi = new VectorIterator(n.siblings);\n\twhile (vi.hasNext()) {\n\t Node s = (Node)(vi.next());\n\t renderDownPaths(s);\n\t}\n }",
"private void recurseThroughObject(Object obj, List<String> path, String currentField) {\n\n MethodAccess methodAccess = MethodAccess.get(obj.getClass());\n\n for (LogCache logCache : CacheableAccessors.getMethodIndexes(obj.getClass(), methodAccess)) {\n\n if (canLogMethod(logCache, methodAccess)) {\n\n List<String> recursivePath = Lists.newArrayList(path);\n\n Object logResult;\n\n try {\n logResult = methodAccess.invoke(obj, logCache.getIndex());\n }\n catch(IllegalAccessError er) {\n logResult = \"<Illegal Method Access Error>\";\n }\n catch (Throwable t) {\n logResult = configs.getExceptionTranslator().translate(t);\n }\n\n try {\n buildMessage(getLogMessage(logCache, logResult), recursivePath,\n formatMethod(recursivePath, methodAccess.getMethodNames()[logCache.getIndex()]));\n }\n catch (Throwable t) {\n // result is ignored, but can be captured for debugging since we've already tried to catch\n // and build\n configs.getExceptionTranslator().translate(t);\n }\n }\n }\n\n FieldAccess fieldAccess = FieldAccess.get(obj.getClass());\n\n for (LogCache logCache : CacheableAccessors.getFieldIndexes(obj.getClass(), fieldAccess)) {\n String fieldName = \"???\";\n\n try {\n if (Scope.SKIP == logCache.getLogScope()) {\n continue;\n }\n\n fieldName = fieldAccess.getFieldNames()[logCache.getIndex()];\n\n List<String> recursivePath = Lists.newArrayList(path);\n recursivePath.add(fieldName);\n\n if (!configs.getExcludesPrefixes().stream().anyMatch(fieldName::startsWith)) {\n buildMessage(getLogMessage(logCache, fieldAccess.get(obj, logCache.getIndex())), recursivePath,\n formatField(currentField, fieldName));\n }\n }\n catch (Throwable t) {\n String fieldError = configs.getExceptionTranslator().translate(t);\n\n buildMessage(getLogMessage(logCache, fieldError), path,\n formatField(currentField, fieldName));\n }\n }\n\n }",
"protected abstract List breakOutOfStateStack();",
"void dealException(List<E> elements, Exception e);",
"@Override\n\t\tpublic String toString() {\n\t\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\t\tif (prev != null) {\n\t\t\t\tstringBuilder.append(prev.elementE);\n\t\t\t}else {\n\t\t\t\tstringBuilder.append(\"null\");\n\t\t\t}\n\t\t\tstringBuilder.append(\"_\").append(elementE).append(\"_\");\n\t\t\tif (next != null) {\n\t\t\t\tstringBuilder.append(next.elementE);\n\t\t\t}else {\n\t\t\t\tstringBuilder.append(\"null\");\n\t\t\t}\n\t\t\treturn stringBuilder.toString();\n\t\t}",
"protected LinkedList getBasicTraces() {\n\t\treturn traces;\n\t}",
"private void outputAndThrow(RuntimeException ex) {\n\t\toutput += \"\\n\" + ex.getMessage();\n\t\tSystem.out.println(output);\n\t\tthrow ex;\n\t}",
"private V e() throws com.amap.api.col.n3.gh {\n /*\n r6 = this;\n r0 = 0\n r1 = 0\n L_0x0002:\n int r2 = r6.b\n if (r1 >= r2) goto L_0x00cd\n com.amap.api.col.n3.ki r2 = com.amap.api.col.n3.ki.c() // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n android.content.Context r3 = r6.d // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.net.Proxy r3 = com.amap.api.col.n3.ik.a(r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n r6.a((java.net.Proxy) r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n byte[] r2 = r2.a((com.amap.api.col.n3.kj) r6) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.lang.Object r2 = r6.a((byte[]) r2) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n int r0 = r6.b // Catch:{ ic -> 0x0025, gh -> 0x0020, Throwable -> 0x002a }\n r1 = r0\n r0 = r2\n goto L_0x0002\n L_0x0020:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0033\n L_0x0025:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0044\n L_0x002a:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"未知错误\"\n r0.<init>(r1)\n throw r0\n L_0x0032:\n r2 = move-exception\n L_0x0033:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 < r3) goto L_0x0002\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0043:\n r2 = move-exception\n L_0x0044:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 >= r3) goto L_0x008a\n int r3 = r6.e // Catch:{ InterruptedException -> 0x0053 }\n int r3 = r3 * 1000\n long r3 = (long) r3 // Catch:{ InterruptedException -> 0x0053 }\n java.lang.Thread.sleep(r3) // Catch:{ InterruptedException -> 0x0053 }\n goto L_0x0002\n L_0x0053:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x0078\n goto L_0x0082\n L_0x0078:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0082:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x008a:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"未知的错误\"\n java.lang.String r1 = r2.a()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x00bb\n goto L_0x00c5\n L_0x00bb:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x00c5:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x00cd:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.api.col.n3.gi.e():java.lang.Object\");\n }",
"public void printStackTrace(java.io.PrintStream printStream) {\r\n\t\tsuper.printStackTrace(printStream);\r\n\t\tif (nestedException_ != null) {\r\n\t\t\tprintStream.println(\"Caused by:\");\r\n\t\t\tnestedException_.printStackTrace(printStream);\r\n\t\t}\r\n\t}",
"public abstract String describe(int depth);",
"public void refineTR(){\n ArrayList<Node> prevLevelNodes = new ArrayList<>();\n ArrayList<Node> currentLevelNodes;\n services.clear();\n prevLevelNodes.add(endNode);\n while (true){\n currentLevelNodes = new ArrayList<>();\n for (Node n: prevLevelNodes){\n //System.out.println(n.isDummy());\n if (!n.isDummy()){\n //System.out.println(n.getService().getSubServices().size());\n for (AbstractService as: n.getService().getSubServices())\n services.add(as.getAbstractServices().get(0));\n }\n for (Node n1: n.getTraceTR()){\n currentLevelNodes.add(n1);\n }\n }\n if (currentLevelNodes.isEmpty())break;\n prevLevelNodes = currentLevelNodes;\n }\n this.generateDependencyGraph();\n //this.findOptimalResponseTime();\n this.findOptimalThroughput();\n }",
"private void buildLinks() {\n ArrayDeque<Node> nodeQueue = new ArrayDeque<>();\n //Failure Rule 1: root has no failure link\n //Failure Rule 2: nodes one layer deeper than root have failure links pointing to root\n //Note: all root and depth 1 nodes have null dictionary links, so no work to be done there\n for (Edge e : root.edges.values()) {\n Node current = e.getTo();\n current.setFailureLink(root);\n for (Edge edge : current.edges.values())\n nodeQueue.add(edge.getTo());\n }\n //BFS while applying other rules\n while (!nodeQueue.isEmpty()) {\n Node current = nodeQueue.pollFirst();\n //First: find current's failure link node\n Node linked = current.getEdgeIn().getFrom().getFailureLink();\n while (true) {\n if (linked.hasEdge(current.getEdgeIn().getChar())) {\n //Failure Rule 3: if linked has a edge and node corresponding to current's edgeIn character,\n //link current to that node\n current.setFailureLink(linked.getEdge(current.getEdgeIn().getChar()).getTo());\n break;\n } else if (root == linked) {\n //Failure Rule 4: if linked is root and doesn't satisfy rule 3, current is linked to root\n current.setFailureLink(root);\n break;\n } else\n //Failure Rule 5: update linked and repeat until rule 3 or 4 applies\n linked = linked.getFailureLink();\n }\n //Second: use the failure link to find current's dictionaryLink\n Node currentLink = current.getFailureLink();\n if (currentLink.isWordEnd()) {\n //Dictionary Rule 1: if the failure link corresponds to a word, set current's dictionary link to it\n current.setDictionaryLink(currentLink);\n } else {\n //Dictionary Rule 2: if rule 1 doesn't apply, set current's DL to it's failure link's DL.\n current.setDictionaryLink(currentLink.getDictionaryLink());\n }\n //Third: add next layer of nodes into queue to continue BFS\n for (Edge e : current.edges.values())\n nodeQueue.add(e.getTo());\n }\n }",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tthrow new NullPointerException();\n\t\t} catch (Exception e) {\n\t\t\tStringWriter sw = new StringWriter();\n\t\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t\te.printStackTrace(pw);\n\n\t\t\tSystem.out.println(sw.toString());\n\t\t}\n\n\t\t// Convert a StackTrace to String using Apache Commons\n\t\ttry {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getStackTrace());\n\t\t}\n\t}",
"protected Solution<T> backTrace(State<T> s){\r\n\t\tSolution<T> sol = new Solution<T>(); // Initiate Solution\r\n\t\tState<T> itr = s; // Initiate Iterator as the given state (needs to be the goal state)\r\n\t\tsol.addState(itr);\r\n\t\twhile(itr != null) {\r\n\t\t\titr = itr.getCameFrom();\r\n\t\t\tsol.addState(itr); // add to the solution where it came from\r\n\t\t}\r\n\t\treturn sol;\r\n\t}",
"public void machineTrace() throws Exception{\n System.out.println(\".-----------------------------------------------------.\");\n System.out.println(\"|------------------ NEXT ITERATION -------------------|\");\n System.out.println(\".-----------------------------------------------------.\");\n\n System.out.println(programMemory);\n System.out.println(dataMemory);\n\n if(instrPointer != -1 && instrPointer != programMemory.getSize())\n System.out.println(\"CURRENT INSTRUCTION: \" + programMemory.getInstruction(instrPointer) + \"\\n\");\n else\n System.out.println(\"FINAL RESULT: \\n\");\n\n System.out.println(\"EXECUTED INSTRUCTIONS : \" + executedIntructions);\n System.out.print(\"INPUT TAPE \");\n System.out.println(inputTapeContent);\n\n System.out.print(\"OUTPUT TAPE \");\n System.out.println(outputTapeContent);\n System.out.println(\" \");\n\n // System.out.print(\"OUTPUT TAPE [ \");\n // tape = new File(outputTape);\n // reader = new BufferedReader(new FileReader(tape));\n // str = \" \";\n // while ((str = reader.readLine()) != null){\n // System.out.print(str + \" \");\n // }\n // System.out.print(\"]\\n\");\n }"
]
| [
"0.5963089",
"0.59160006",
"0.5614477",
"0.55207074",
"0.5413346",
"0.53559506",
"0.5319633",
"0.53026384",
"0.52654916",
"0.52553076",
"0.52389544",
"0.52266824",
"0.520751",
"0.513734",
"0.50984687",
"0.505717",
"0.5036362",
"0.5026464",
"0.501431",
"0.5002066",
"0.49898112",
"0.49853814",
"0.49760628",
"0.4965464",
"0.49444816",
"0.49424258",
"0.4941933",
"0.4940753",
"0.4932935",
"0.49129406",
"0.49065483",
"0.49035317",
"0.49014428",
"0.48917544",
"0.48890442",
"0.48852515",
"0.4879756",
"0.48636052",
"0.48627576",
"0.48409554",
"0.48409027",
"0.48363242",
"0.483274",
"0.48305708",
"0.48234284",
"0.48234284",
"0.48170963",
"0.48115352",
"0.48097715",
"0.48093688",
"0.48008564",
"0.47936907",
"0.47927824",
"0.4776027",
"0.4768261",
"0.4760938",
"0.47599626",
"0.47592118",
"0.47548625",
"0.47548264",
"0.4752513",
"0.47434044",
"0.47344464",
"0.4732892",
"0.4722314",
"0.47127885",
"0.47106862",
"0.4708791",
"0.47080043",
"0.47044298",
"0.4701178",
"0.46911964",
"0.46827158",
"0.46823582",
"0.46806064",
"0.46698204",
"0.46427923",
"0.46417427",
"0.4631617",
"0.46238247",
"0.4621819",
"0.46161118",
"0.46113512",
"0.4603241",
"0.45996076",
"0.45988864",
"0.4597524",
"0.4588571",
"0.45839626",
"0.45812765",
"0.45775902",
"0.4575252",
"0.4574883",
"0.45699513",
"0.45671862",
"0.45573223",
"0.45508197",
"0.45458683",
"0.45453122",
"0.45424727"
]
| 0.47476655 | 61 |
Gets the ExceptionCode as long | public long getExceptionCodeAsLong() {
return this.exceptionCode_;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getErrorCode() {\n return Util.bytesToInt(new byte[]{data[2], data[3], data[4], data[5]});\n }",
"int getErrorCode();",
"public long getExceptionCount();",
"public Long getExceptcode() {\n return exceptcode;\n }",
"public int getErrorCode() {\n return parameter.getErrCode();\n }",
"int getErrcode();",
"public int getExceptionNumber(\n ) {return (0);}",
"public native int getErrorCode() /*-{\n\t\treturn this.target.error.code;\n\t}-*/;",
"public int getErrorCode() {\n\t\treturn this.errorCode;\n\t}",
"long getInnerStatusCode();",
"public int getErrorCode()\n\t{\n\t\treturn errorCode;\n\t}",
"public String getErrorCode() {\r\n String toReturn = recentErrorCode;\r\n\r\n return toReturn;\r\n }",
"public int getErrorCode() {\n return errorCode_;\n }",
"public int getErrorCode() {\n return errorCode_;\n }",
"public int getErrcode() {\n return errcode_;\n }",
"public int getErrorCode() {\n\n return mErrorCode;\n }",
"public int getErrcode() {\n return errcode_;\n }",
"public int getExceptionIndex() {\n/* 412 */ return (this.value & 0xFFFF00) >> 8;\n/* */ }",
"public int getErrorCode() {\r\n\t\treturn ERROR_CODE;\r\n\t}",
"public int getErrorCode() {\r\n\t\treturn errorCode;\r\n\t}",
"public int getErrorCode() {\n return errorCode;\n }",
"public int getErrorCode() {\n\t\treturn errorCode;\n\t}",
"public ErrorCode errorCode()\n {\n return ErrorCode.get(uint8Get(offset() + ERROR_CODE_FIELD_OFFSET));\n }",
"@Override\n public int getExitCode() {\n if (e.getCode() == 0) {\n LOG.warn(\n \"Received an ExecutionEngineException with code 0. \"\n + \"Returning exit code -1 for this Execution.\");\n return -1;\n }\n return e.getCode();\n }",
"public int getErrorCode() {\n return this.errorCode;\n }",
"public com.mycompany.midtermproject2.proto.ServerMessageOuterClass.ServerMessage.ErrType getCode() {\n com.mycompany.midtermproject2.proto.ServerMessageOuterClass.ServerMessage.ErrType result = com.mycompany.midtermproject2.proto.ServerMessageOuterClass.ServerMessage.ErrType.valueOf(code_);\n return result == null ? com.mycompany.midtermproject2.proto.ServerMessageOuterClass.ServerMessage.ErrType.NICK_IN_USE : result;\n }",
"public com.mycompany.midtermproject2.proto.ServerMessageOuterClass.ServerMessage.ErrType getCode() {\n com.mycompany.midtermproject2.proto.ServerMessageOuterClass.ServerMessage.ErrType result = com.mycompany.midtermproject2.proto.ServerMessageOuterClass.ServerMessage.ErrType.valueOf(code_);\n return result == null ? com.mycompany.midtermproject2.proto.ServerMessageOuterClass.ServerMessage.ErrType.NICK_IN_USE : result;\n }",
"com.mycompany.midtermproject2.proto.ServerMessageOuterClass.ServerMessage.ErrType getCode();",
"public int getErrorCode() {\n\t\treturn httpErrorCode;\n\t}",
"public String getErrorCode();",
"public java.lang.Integer getReasonCode() throws java.io.IOException {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: sun.security.x509.X509CRLEntryImpl.getReasonCode():java.lang.Integer, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: sun.security.x509.X509CRLEntryImpl.getReasonCode():java.lang.Integer\");\n }",
"public int errorCode()\n {\n return edma_errorCode;\n }",
"public org.openarchives.www.oai._2_0.OAIPMHerrorcodeType.Enum getCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CODE$0);\n if (target == null)\n {\n return null;\n }\n return (org.openarchives.www.oai._2_0.OAIPMHerrorcodeType.Enum)target.getEnumValue();\n }\n }",
"public Integer getCodError() {\r\n\t\treturn codError;\r\n\t}",
"public long getCode() {\n return code;\n }",
"public int getReturnCode() {\n return returnCode_;\n }",
"public int getReturnCode() {\n return returnCode_;\n }",
"public int getStatusCode() {\n\t\treturn getStatusCode(iReason);\n\t}",
"public int getReturnCode() {\n return returnCode_;\n }",
"public int getReturnCode() {\n return returnCode_;\n }",
"public String getReturnCode()\r\n\t{\r\n\t\treturn returnCode;\r\n\t}",
"public long getCode () {\r\n\t\treturn code;\r\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getConsecutiveExceptions() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(CONSECUTIVEEXCEPTIONS_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getConsecutiveExceptions() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(CONSECUTIVEEXCEPTIONS_PROP.get());\n }",
"public org.openarchives.www.oai._2_0.OAIPMHerrorcodeType xgetCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openarchives.www.oai._2_0.OAIPMHerrorcodeType target = null;\n target = (org.openarchives.www.oai._2_0.OAIPMHerrorcodeType)get_store().find_attribute_user(CODE$0);\n return target;\n }\n }",
"public String getFailureCode() {\n return this.failureCode;\n }",
"int getExceptionsCount();",
"public static int getSqlErrorCode(Exception e) {\n if (e instanceof SQLException) {\n return ((SQLException) e).getErrorCode();\n } else {\n return -1;\n }\n }",
"public String getErrorCode()\n\t{\n\t\treturn errorCode;\n\t}",
"public Long getCode() {\n return code;\n }",
"public Long getCode() {\n return code;\n }",
"public int getStatusCode() {\n return code;\n }",
"public String getServerErrorCode() {\r\n String toReturn = recentServerErrorCode;\r\n\r\n return toReturn;\r\n }",
"int getNumberOfSpecifiedExceptions();",
"public interface ViewDetailsExceptionCodes extends BaseExceptionCodes {\r\n /**\r\n * <p>\r\n * Exception code for TransactionAssessmentViewDetailsManagerException.\r\n * </p>\r\n */\r\n public final long FMS_WEB_07_ERR_0020 = 700020;\r\n\r\n /**\r\n * <p>\r\n * Exception code for TransactionAssessmentViewDetailsConfigurationException.\r\n * </p>\r\n */\r\n public final long FMS_WEB_07_ERR_0021 = 700021;\r\n\r\n /**\r\n * <p>\r\n * Exception code for TransactionAssessmentViewDetailsDaoException.\r\n * </p>\r\n */\r\n public final long FMS_WEB_07_ERR_0022 = 700022;\r\n}",
"com.google.protobuf.Int32Value getCode();",
"public ImagingMigratorException(int exceptionCode) {\n this.errorCode = exceptionCode;\n }",
"public Long get_cachenummarker() throws Exception {\n\t\treturn this.cachenummarker;\n\t}",
"int getReturnCode();",
"int getReturnCode();",
"public int getTryCatchBlockIndex() {\n/* 424 */ return (this.value & 0xFFFF00) >> 8;\n/* */ }",
"public int code() {\n return code;\n }",
"public int getCode() {\r\n\t\tcode=code+1;\r\n\t\treturn code;\r\n\t}",
"@Property\n public native MintMessageException getExceptionError ();",
"public java.lang.String getErrorCode() {\r\n return errorCode;\r\n }",
"public String getErrorCode() {\r\n return errorCode;\r\n }",
"Integer getCode();",
"public int getMessageCodeValue();",
"public java.lang.String getErrCode () {\r\n\t\treturn errCode;\r\n\t}",
"public String getErrorCode() {\n return errorCode;\n }",
"public String getErrorCode() {\n return errorCode;\n }",
"public String getErrorCode() {\n return errorCode;\n }",
"@Override\r\n\tpublic String getErrorCode() {\n\t\treturn DUP_DATA_CODE;\r\n\t}",
"public int getCode() {\n return code_;\n }",
"public int getCode() {\n return code_;\n }",
"public int getCode() {\n return code_;\n }",
"public int getCode() {\n return code_;\n }",
"int getResultCode();",
"int getResultCode();",
"int getResultCode();",
"int getResultCode();",
"int getResultCode();",
"public int value() {\n return code;\n }",
"public java.math.BigInteger getReasonCode() {\r\n return reasonCode;\r\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getExceptions() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(EXCEPTIONS_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getExceptions() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(EXCEPTIONS_PROP.get());\n }",
"public int statusCode(){\n return code;\n }",
"public java.lang.String getErrCode() {\n return errCode;\n }",
"public int getEventCode() {\n return eventCode;\n }",
"public OAIPMHErrorcodeType getCode() {\r\n return code;\r\n }",
"public int getError() {\n return error;\n }",
"public static int getInt() throws Exception {\n return getInt(null);\n }",
"public FileTransferErrorCode getCode() {\n return FileTransferErrorCode.fromValue(JsoHelper.getAttributeAsInt(jsObj, Attributes.CODE.getValue()));\n }",
"public int getErrorNo() {\n return this.errorNo;\n }",
"public String getFaultCode() {\n return faultCode;\n }",
"public void setExceptcode(Long exceptcode) {\n this.exceptcode = exceptcode;\n }",
"String getCauseException();",
"public int getFaultCode() {\n\t\treturn faultCode;\n\t}",
"public int getCode() {\r\n return code;\r\n }",
"public int getCode() {\r\n return code;\r\n }"
]
| [
"0.69903576",
"0.674708",
"0.671487",
"0.6603976",
"0.658696",
"0.64667964",
"0.63967896",
"0.63832885",
"0.6355214",
"0.63526237",
"0.6348106",
"0.6347006",
"0.6343122",
"0.6338288",
"0.63318884",
"0.63292193",
"0.63231283",
"0.6284362",
"0.62785",
"0.6243046",
"0.6216327",
"0.62129146",
"0.62128305",
"0.61241704",
"0.612368",
"0.6106135",
"0.6089783",
"0.5995416",
"0.59672785",
"0.59588206",
"0.59553957",
"0.5943978",
"0.59342545",
"0.5927707",
"0.5926648",
"0.59219575",
"0.59219575",
"0.59200275",
"0.5884272",
"0.5884272",
"0.5873475",
"0.5853812",
"0.5852442",
"0.58445156",
"0.5776433",
"0.5776298",
"0.57512695",
"0.574756",
"0.5737652",
"0.57371944",
"0.57371944",
"0.57312316",
"0.5729049",
"0.57160425",
"0.5714894",
"0.57108706",
"0.5699149",
"0.5693138",
"0.5675446",
"0.5675446",
"0.5663473",
"0.56566083",
"0.5654479",
"0.5643474",
"0.5641554",
"0.5624674",
"0.5603116",
"0.5592143",
"0.55820805",
"0.557936",
"0.557936",
"0.557936",
"0.5579248",
"0.55627537",
"0.55627537",
"0.5560218",
"0.5560218",
"0.5559919",
"0.5559919",
"0.5559919",
"0.5559919",
"0.5559919",
"0.5556084",
"0.5553391",
"0.5553073",
"0.5541183",
"0.5538887",
"0.55328614",
"0.5525654",
"0.55243987",
"0.55151683",
"0.5511481",
"0.5498209",
"0.5494718",
"0.54911387",
"0.54875624",
"0.54874295",
"0.54766923",
"0.5446137",
"0.5446137"
]
| 0.889982 | 0 |
Prints the StackTrace from the PrintStream | public void printStackTrace(java.io.PrintStream printStream) {
super.printStackTrace(printStream);
if (nestedException_ != null) {
printStream.println("Caused by:");
nestedException_.printStackTrace(printStream);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testPrintStackTracePrintStream() {\n Throwable th;\n ByteArrayOutputStream ba = new ByteArrayOutputStream(); \n PrintStream ps = new PrintStream(ba);\n th = prepareThrowables();\n th.printStackTrace(ps);\n assertEquals(\"incorrect info printed in stack trace\",\n printOutput, ba.toString());\n }",
"public static void printStackTrace() {\n if (outputEnabled) {\n synchronized (out) {\n new Exception(\"Diagnostic Stack Trace\").printStackTrace(out); // NORES\n }\n }\n }",
"public void printStackTrace() {\n printStackTrace(System.err);\n }",
"public final void printStackTrace()\r\n {\r\n printStackTrace( System.err );\r\n }",
"@Override\n\tpublic void printStackTrace(PrintStream arg0) {\n\t\tsuper.printStackTrace(arg0);\n\t}",
"public void printStackTrace(){\n\t\tprintStackTrace(System.err);\n\t}",
"void printStackTrace(PrintWriter writer);",
"private void printStackTraceHerder() {\n PrintStream printStream = System.err;\n synchronized (printStream) {\n System.err.println(super.getMessage() + \"; nested exception is:\");\n this.detail.printStackTrace();\n }\n }",
"public static void printStackTrace(Throwable ex) {\n if (outputEnabled) {\n synchronized (out) {\n ex.printStackTrace(out);\n }\n }\n }",
"public void printStackTrace(final PrintStream stream) {\n if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {\n super.printStackTrace(stream);\n }\n NestedThrowable.Util.print(nested, stream);\n }",
"public final void printStackTrace( PrintStream stream )\r\n {\r\n super.printStackTrace( stream );\r\n // Only print causal stack traces if pre-JDK 1.4.\r\n if ( !JDK1_4 ) {\r\n Throwable t = getCause();\r\n while ( t != null ) {\r\n stream.println( \"Caused by: \" + t );\r\n t.printStackTrace( stream );\r\n if ( t instanceof CanyonException ) {\r\n t = ( ( CanyonException ) t ).getCause();\r\n } else {\r\n break;\r\n }\r\n }\r\n }\r\n }",
"public static String printStackTrace() {\n StringBuilder sb = new StringBuilder();\n StackTraceElement[] trace = Thread.currentThread().getStackTrace();\n for (StackTraceElement traceElement : trace) {\n sb.append(\"\\t \").append(traceElement);\n sb.append(System.lineSeparator());\n }\n return sb.toString();\n }",
"@Override\n\tpublic void printStackTrace(PrintWriter s) {\n\t\tsuper.printStackTrace(s);\n\t}",
"public static String getPrintStackTrace(Exception e){\n\t\tStringWriter sw = new StringWriter();\n\t\t//PrintWriter integrates with StringWriter\n\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t//This line used to write in catch block then it will writes in the console prints upon the console\n\t\t//Basically prints the data upon the console\n\t\te.printStackTrace(pw);\n\t\t//it will converts to tostring method into some meaningful data\n\t\treturn sw.toString();\n\t}",
"public void printStackTrace(PrintStream output){\n\t\tsynchronized (output) {\n\t\t\tsuper.printStackTrace(output);\n\t\t\tprintChildren(status, output);\n\t\t}\n\t}",
"public void printStackTrace(java.io.PrintWriter printWriter) {\r\n\t\tsuper.printStackTrace(printWriter);\r\n\t\tif (nestedException_ != null) {\r\n\t\t\tprintWriter.println(\"Caused by:\");\r\n\t\t\tnestedException_.printStackTrace(printWriter);\r\n\t\t}\r\n\t}",
"@Override\n public void printStackTrace() {\n super.printStackTrace(); \n \n if(previous != null){\n previous.printStackTrace();\n }\n }",
"public void testPrintStackTracePrintWriter_True() {\n Throwable th;\n ByteArrayOutputStream ba = new ByteArrayOutputStream(); \n PrintWriter ps = new PrintWriter(ba, true);\n th = prepareThrowables();\n th.printStackTrace(ps);\n assertEquals(\"incorrect info in printed stack trace\",\n printOutput, ba.toString());\n }",
"private String stackTraceToString( Throwable t ){\n StringWriter writer = new StringWriter();\n PrintWriter printWriter = new PrintWriter( writer );\n t.printStackTrace( printWriter );\n printWriter.flush();\n return writer.toString();\n }",
"public static void printStacks(Thread currentThread) {\n\t\tStackTraceElement[] stackTrace = currentThread.getStackTrace();\n\t\t\n\t\tif (stackTrace.length == 0) {\n\t\t\tSystem.out.println(\"!!! No stacks available at the moment !!!\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"=========================================================\");\n\t\tfor (int i= stackTrace.length-1; i >= 0; i--) {\n\t\t\tStackTraceElement stEle = stackTrace[i];\n\t\t\tSystem.out.println((stackTrace.length - i) + \". \" + stEle.toString());\n\t\t}\n\t\tSystem.out.println(\"=========================================================\\n\");\n\t}",
"public static String getPrintStackTraceAsString(Throwable e) {\n\t\tStringWriter sw = new StringWriter();\n\t\te.printStackTrace(new PrintWriter(sw));\n\t\treturn sw.toString();\n\t}",
"public static void writePrintStackTrace(TestContext context, Throwable e) {\n\t\tcontext.getLogger().error(getPrintStackTraceAsString(e));\n\t}",
"private void printStackTrace( Exception e )\n {\n logger.printStackTrace( e, 1 );\n }",
"public static void writePrintStackTrace(TestContext context, Exception e) {\n\t\tcontext.getLogger().error(getPrintStackTraceAsString(e));\n\t}",
"public final void printStackTrace( PrintWriter writer )\r\n {\r\n super.printStackTrace( writer );\r\n // Only print causal stack traces if pre-JDK 1.4.\r\n if ( !JDK1_4 ) {\r\n Throwable t = getCause();\r\n while ( t != null ) {\r\n writer.println( \"Caused by: \" + t );\r\n t.printStackTrace( writer );\r\n if ( t instanceof CanyonException ) {\r\n t = ( ( CanyonException ) t ).getCause();\r\n } else {\r\n break;\r\n }\r\n }\r\n }\r\n }",
"@Override\r\n\tpublic void printStackTrace() {\n\t\tsuper.printStackTrace();\r\n\t}",
"private void printStackTrace(Exception ex, GUILog gl) {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n ex.printStackTrace(pw);\n gl.log(sw.toString()); // stack trace as a string\n ex.printStackTrace();\n }",
"@Override\n\tpublic void printStackTrace() {\n\t\tsuper.printStackTrace();\n\t}",
"@Override\n\tpublic void printStackTrace() {\n\t\tsuper.printStackTrace();\n\t}",
"public static void printStackTrace(SQLException e) {\r\n printStackTrace(e, new PrintWriter(System.err));\r\n }",
"public void printStackTrace(PrintWriter output){\n\t\tsynchronized (output) {\n\t\t\tsuper.printStackTrace(output);\n\t\t\tprintChildren(status, output);\n\t\t}\n\t}",
"public void printStackTrace(final PrintWriter writer) {\n if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {\n super.printStackTrace(writer);\n }\n NestedThrowable.Util.print(nested, writer);\n }",
"void dumpTraceLine(String s)\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"[trace] \"); //$NON-NLS-1$\n\t\tsb.append(s);\n\t\tout(sb.toString());\n\t}",
"String stacktraceToString(Throwable t) {\r\n\t\tStringWriter sw = new StringWriter();\r\n\t\tPrintWriter out = new PrintWriter(sw);\r\n\t\tt.printStackTrace(out);\r\n\t\tout.flush();\r\n\t\treturn sw.toString();\r\n\t}",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tthrow new NullPointerException();\n\t\t} catch (Exception e) {\n\t\t\tStringWriter sw = new StringWriter();\n\t\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t\te.printStackTrace(pw);\n\n\t\t\tSystem.out.println(sw.toString());\n\t\t}\n\n\t\t// Convert a StackTrace to String using Apache Commons\n\t\ttry {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getStackTrace());\n\t\t}\n\t}",
"private String printStackTrace() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"private void printMessage(String s) {\n if (PRINTTRACE) {\r\n System.out.println(s);\r\n }\r\n }",
"public static String stackTrace(Exception exception) {\n\t\tStringWriter writer = new StringWriter();\n\t\tPrintWriter printWriter = new PrintWriter(writer);\n\t\texception.printStackTrace(printWriter);\n\t\tprintWriter.flush();\n\n\t\tString stackTrace = writer.toString();\n\t\treturn stackTrace;\n\t}",
"public static void printExceptionTraceCauses(Throwable throwable) {\n throwable.printStackTrace();\n if (null != throwable.getCause()) {\n e(\"Caused by:\");\n printExceptionTraceCauses(throwable.getCause());\n }\n }",
"public void printThreadStack(String threadName) {\n\t\tthis.toSlave.println(MasterProcessInterface.THREAD_STACK_COMMAND + ((threadName == null) ? \"\" : (\":\" + threadName)));\n\t}",
"public void printStackTrace(Throwable t) {\n\t\tt.printStackTrace(out);\n\n\t\tMethod[] methods = t.getClass().getMethods();\n\n\t\tint size = methods.length;\n\t\tClass throwable = Throwable.class;\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tMethod method = methods[i];\n\n\t\t\tif (Modifier.isPublic(method.getModifiers())\n\t\t\t\t\t&& method.getName().startsWith(\"get\") && throwable.isAssignableFrom(method.getReturnType()) && (method.getParameterTypes().length == 0)) { //$NON-NLS-1$\n\t\t\t\ttry {\n\t\t\t\t\tThrowable nested = (Throwable) method.invoke(t, null);\n\n\t\t\t\t\tif ((nested != null) && (nested != t)) {\n\t\t\t\t\t\tout.println(ConsoleMsg.CONSOLE_NESTED_EXCEPTION);\n\t\t\t\t\t\tprintStackTrace(nested);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (IllegalAccessException e) {\n\t\t\t\t}\n\t\t\t\tcatch (InvocationTargetException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"String exceptionToStackTrace( Exception e ) {\n StringWriter stringWriter = new StringWriter();\n PrintWriter printWriter = new PrintWriter(stringWriter);\n e.printStackTrace( printWriter );\n return stringWriter.toString();\n }",
"private void printExceptions(Exception[] es) {\n if (es.length > 0) {\n System.out.println();\n }\n for (int i = 0; i < es.length; i++) {\n es[i].printStackTrace();\n }\n }",
"private String getStacktraceFromException(Exception e) {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tPrintStream ps = new PrintStream(baos);\n\t\te.printStackTrace(ps);\n\t\tps.close();\n\t\treturn baos.toString();\n\t}",
"public static String getStackTraceAsString(Throwable t) {\n Writer result = new StringWriter();\n PrintWriter printWriter = new PrintWriter(result);\n t.printStackTrace(printWriter);\n return result.toString();\n }",
"private String getStackTrace(Exception ex) {\r\n\t\tStringWriter sw = new StringWriter();\r\n\t\tex.printStackTrace(new PrintWriter(sw));\r\n return sw.toString();\r\n\t}",
"public static void println(Exception e) {\n\t\tSystem.out.println(e);\n\t}",
"private String getStackTrace(Throwable throwable) {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n throwable.printStackTrace(pw);\n return sw.toString();\n }",
"public void printStack(int stackNo){\n\t\tint begin = stackStarts[stackNo-1];\n\t\tfor (int i = begin; i < begin + stackTops[stackNo-1]; i++)\n\t\t\t\tSystem.out.print(stacks[i] + \" \");\n\t\tSystem.out.println();\n\t}",
"public static String getStackTraceAsString(Exception ex)\n {\n StringWriter errors = new StringWriter();\n ex.printStackTrace(new PrintWriter(errors));\n return errors.toString();\n }",
"private String toString(final Throwable throwable) {\n final StringWriter writer = new StringWriter();\n final PrintWriter printer = new PrintWriter(writer);\n throwable.printStackTrace(printer);\n return writer.toString();\n }",
"static public String getStackTrace(Exception e) {\n java.io.StringWriter s = new java.io.StringWriter(); \n e.printStackTrace(new java.io.PrintWriter(s));\n String trace = s.toString();\n \n if(trace==null || trace.length()==0 || trace.equals(\"null\"))\n return e.toString();\n else\n return trace;\n }",
"public String throwableToString(Throwable throwable) {\n if (throwable == null) return \"\";\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n throwable.printStackTrace(pw);\n String stackTrace = sw.toString();\n\n return stackTrace;\n }",
"public static void printStackTrace(SQLException e, PrintWriter pw) {\r\n SQLException next = e;\r\n while (next != null) {\r\n next.printStackTrace(pw);\r\n next = next.getNextException();\r\n if (next != null) {\r\n System.out.println(\"Next SQLException:\");\r\n }\r\n }\r\n }",
"public static String getStackTrace(Throwable t) {\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n PrintStream ps = new PrintStream(os);\n t.printStackTrace(ps);\n return os.toString();\n }",
"static void printStack(Stack<Integer> s)\n\t{\n/*\t\tListIterator<Integer> lt = s.listIterator();\n\n\t\t// forwarding\n\t\twhile (lt.hasNext())\n\t\t\tlt.next();\n\n\t\t// printing from top to bottom\n\t\twhile (lt.hasPrevious())\n\t\t\tSystem.out.print(lt.previous() + \" \");*/\n\t\t\tSystem.out.println(s);\n\t}",
"private void printSQLException(SQLException ex) {\n\t\tfor (Throwable e : ex) {\n\t\t\tif (e instanceof SQLException) {\n\t\t\t\te.printStackTrace(System.err);\n\t\t\t\tSystem.err.println(\"SQLState: \" + ((SQLException) e).getSQLState());\n\t\t\t\tSystem.err.println(\"Error Code: \" + ((SQLException) e).getErrorCode());\n\t\t\t\tSystem.err.println(\"Message: \" + e.getMessage());\n\t\t\t\tThrowable t = ex.getCause();\n\t\t\t\twhile (t != null) {\n\t\t\t\t\tSystem.out.println(\"Cause: \" + t);\n\t\t\t\t\tt = t.getCause();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected String getStackTrace( final Throwable throwable, final String format )\n {\n if( null == throwable )\n {\n return \"\";\n }\n return ExceptionUtil.printStackTrace( throwable, m_stackDepth, m_printCascading );\n }",
"public String getStackTraceString(Throwable tr) {\n if (tr == null) {\n return \"\";\n }\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n tr.printStackTrace(pw);\n return sw.toString();\n }",
"static public String generateStackTraceString(Throwable t) {\r\n\t\tStringWriter s = new StringWriter();\r\n\t\tt.printStackTrace(new PrintWriter(s));\r\n\t\treturn s.toString();\r\n\t}",
"public void testPrintStackTracePrintWriter_False() {\n ByteArrayOutputStream ba = new ByteArrayOutputStream(); \n PrintWriter ps = new PrintWriter(ba, false);\n try {\n throw new Exception(\"level1\", new Exception(\"level2\", new Exception(\"level3\", new NullPointerException())));\n } catch (Exception e) {\n e.printStackTrace(ps);\n }\n assertEquals(\"the output should be empty until flush\",\n \"\", ba.toString());\n }",
"String getLogStackTrace();",
"public static String getStackTrace(Throwable throwable)\n {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter( sw, true );\n throwable.printStackTrace( pw );\n return sw.getBuffer().toString();\n }",
"public static void printStackTrace____V (MJIEnv env, int objRef) {\n \n env.getThreadInfo().printStackTrace(objRef);\n }",
"public int printMoveTrace() {\r\n\t\toutputStack = new Stack<String>();\r\n\t\tprintMoveTraceHelper(this);\r\n\t\tint rtn = outputStack.size();\r\n\t\twhile (!outputStack.isEmpty()) {\r\n\t\t\tSystem.out.println(outputStack.pop());\r\n\t\t}\r\n\t\treturn rtn;\r\n\t}",
"public static String getStackTrace(final Throwable throwable) {\n final StringWriter sw = new StringWriter();\n final PrintWriter pw = new PrintWriter(sw, true);\n throwable.printStackTrace(pw);\n return sw.getBuffer().toString();\n }",
"public static String getStackTrace(final Throwable throwable) {\n final StringWriter sw = new StringWriter();\n final PrintWriter pw = new PrintWriter(sw, true);\n throwable.printStackTrace(pw);\n return sw.getBuffer().toString();\n }",
"public static String getStackTrace(final Exception ex)\n\t{\n\t\tfinal StringWriter sw = new StringWriter();\n\t\tfinal PrintWriter pw = new PrintWriter(sw, true);\n\t\tex.printStackTrace(pw);\n\t\tpw.flush();\n\t\tsw.flush();\n\t\treturn sw.toString();\n\t}",
"public static void fnPrintException(Exception e)\n\t{\n\t\te.printStackTrace();\n\t}",
"public static String getStackTrace(Exception aInException) {\n\n StringWriter lStringWriter = new StringWriter();\n aInException.printStackTrace(new PrintWriter(lStringWriter));\n return lStringWriter.toString();\n\n }",
"public static String getStackMessage(Throwable exception) {\n\t\tStringWriter sw = new StringWriter();\n\t\tPrintWriter pw = new PrintWriter(sw);\n\t\tpw.print(\" [ \");\n\t\tpw.print(exception.getClass().getName());\n\t\tpw.print(\" ] \");\n\t\texception.printStackTrace(pw);\n\t\treturn sw.toString();\n\t}",
"public void print(Object... s) {\n if (!enabled) return;\n if (s.length > 0 && s[0] instanceof Exception) {\n printException((Exception) s[0]);\n } else {\n printSync(s);\n }\n }",
"public static String getStackTrace(Throwable t) {\n StringWriter sw = new StringWriter();\n t.printStackTrace(new PrintWriter(sw));\n String stackTrace = sw.toString();\n stackTrace = stackTrace.replaceAll(\"<\", \"<\");\n stackTrace = stackTrace.replaceAll(\">\", \">\");\n\n return stackTrace;\n }",
"void printException(Exception e,int level)\n { printLog(\"Exception: \"+ExceptionPrinter.getStackTraceOf(e),level);\n }",
"public abstract void printToStream(PrintStream stream);",
"private void printExceptionConsole(Exception e) {\n\t\t\n\t\tif (null != e.getMessage()) {\n\t\t\tDmtLogger.d(TAG, e.getMessage());\n\t\t\t\n\t\t\tString textNonI18n = e.getMessage();\n\t\t\tDmtLogger.d(TAG + \"CONSOLE: \", textNonI18n);\t\t\t\t\t\n\t\t\tprintConsole(textNonI18n);\n\t\t}\t\t\t\t\n\t}",
"public void printError(RubyException excp) {\n if (excp == null || excp.isNil()) {\n return;\n }\n \n if (RubyException.TRACE_TYPE == RubyException.RUBINIUS) {\n printRubiniusTrace(excp);\n return;\n }\n \n ThreadContext context = getCurrentContext();\n IRubyObject backtrace = excp.callMethod(context, \"backtrace\");\n \n PrintStream errorStream = getErrorStream();\n if (backtrace.isNil() || !(backtrace instanceof RubyArray)) {\n if (context.getFile() != null) {\n errorStream.print(context.getFile() + \":\" + context.getLine());\n } else {\n errorStream.print(context.getLine());\n }\n } else if (((RubyArray) backtrace).getLength() == 0) {\n printErrorPos(context, errorStream);\n } else {\n IRubyObject mesg = ((RubyArray) backtrace).first();\n \n if (mesg.isNil()) {\n printErrorPos(context, errorStream);\n } else {\n errorStream.print(mesg);\n }\n }\n \n RubyClass type = excp.getMetaClass();\n String info = excp.toString();\n \n if (type == getRuntimeError() && (info == null || info.length() == 0)) {\n errorStream.print(\": unhandled exception\\n\");\n } else {\n String path = type.getName();\n \n if (info.length() == 0) {\n errorStream.print(\": \" + path + '\\n');\n } else {\n if (path.startsWith(\"#\")) {\n path = null;\n }\n \n String tail = null;\n if (info.indexOf(\"\\n\") != -1) {\n tail = info.substring(info.indexOf(\"\\n\") + 1);\n info = info.substring(0, info.indexOf(\"\\n\"));\n }\n \n errorStream.print(\": \" + info);\n \n if (path != null) {\n errorStream.print(\" (\" + path + \")\\n\");\n }\n \n if (tail != null) {\n errorStream.print(tail + '\\n');\n }\n }\n }\n \n excp.printBacktrace(errorStream);\n }",
"void dump(PrintStream x) {\n String str = buffer.toString();\n x.println(\"<beginning of \" + name + \" buffer>\");\n x.println(str);\n x.println(\"<end of buffer>\");\n }",
"public String dump() {\n String result = \"\";\n Iterator stackIt = framePointers.iterator();\n int frameEnd;\n int old;\n int pos = 0;\n frameEnd = (int)stackIt.next();\n if(stackIt.hasNext()) {\n frameEnd = (int)stackIt.next();\n }\n else {\n frameEnd = -1;\n }\n while(pos < runStack.size()) {\n result += \"[\";\n if(frameEnd == -1) {\n while(pos < runStack.size()-1) {\n result += runStack.get(pos) + \",\";\n pos++;\n }\n result += runStack.get(pos)+\"] \";\n pos++;\n }\n else {\n while(pos < frameEnd-1) {\n result += runStack.get(pos) + \",\";\n pos++;\n }\n if(pos < frameEnd){\n result += runStack.get(pos);\n pos++;\n }\n result += \"]\";\n }\n if(stackIt.hasNext()) {\n frameEnd = (int)stackIt.next();\n }\n else {\n frameEnd = -1;\n }\n }\n return result;\n }",
"public static String toString(final Throwable throwable) {\n StringWriter w = new StringWriter();\n try (PrintWriter p = new PrintWriter(w)) {\n throwable.printStackTrace(p);\n }\n return w.toString();\n }",
"public interface CommonUtils {\n\tpublic static String getPrintStackTrace(Exception e){\n\t\t//StringWriter writes upon the string\n\t\tStringWriter sw = new StringWriter();\n\t\t//PrintWriter integrates with StringWriter\n\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t//This line used to write in catch block then it will writes in the console prints upon the console\n\t\t//Basically prints the data upon the console\n\t\te.printStackTrace(pw);\n\t\t//it will converts to tostring method into some meaningful data\n\t\treturn sw.toString();\n\t}\n}",
"private void printException(Exception e,int level)\n { printLog(\"Exception: \"+ExceptionPrinter.getStackTraceOf(e),level);\n if (level<=Log.LEVEL_HIGH) e.printStackTrace();\n }",
"public static void printError(final Throwable pThrowable)\n\t{\n\t\tif(LogConstant.DEBUG)\n\t\t{\n\t\t\tLog.e(pThrowable.getStackTrace()[0].getClassName(), // Used to get the class name from which the exception is originated.\n\t\t\t\t\tLog.getStackTraceString(pThrowable)); // Gets actual stack trace.\n\t\t}\n\t}",
"public void println(int priority, String tag, String msg, Throwable tr);",
"public abstract void debug(PrintStream console);",
"public static String getStackTraceString(Throwable tr) {\n if (tr == null) {\n return \"\";\n }\n\n // This is to reduce the amount of log spew that apps do in the non-error\n // condition of the network being unavailable.\n Throwable t = tr;\n while (t != null) {\n if (t instanceof UnknownHostException) {\n return \"\";\n }\n t = t.getCause();\n }\n\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n tr.printStackTrace(pw);\n pw.flush();\n return sw.toString();\n }",
"public static String getStackTrace( Throwable exception ) {\r\n\t\tStringWriter sw = new StringWriter();\r\n\t\tPrintWriter pw = new PrintWriter( sw );\r\n\t\texception.printStackTrace( pw );\r\n\t\treturn sw.toString();\r\n\t}",
"public void debug(PrintStream out) throws IOException {\n\t\tdebug(new PrintWriter(out));\n\t}",
"private void outputAndThrow(RuntimeException ex) {\n\t\toutput += \"\\n\" + ex.getMessage();\n\t\tSystem.out.println(output);\n\t\tthrow ex;\n\t}",
"public static String getStackTrace(Throwable t) {\n String stackTrace = null;\n try {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n t.printStackTrace(pw);\n pw.close();\n sw.close();\n stackTrace = sw.getBuffer().toString();\n } catch (Exception ex) {\n }\n return stackTrace;\n }",
"public static String getStackTrace() {\n Exception e = new Exception();\n return getStackTrace(e);\n }",
"void dumpFaultLine(FaultEvent e)\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\t// use a slightly different format for ConsoleErrorFaults\n\t\tif (e instanceof ConsoleErrorFault)\n\t\t{\n\t\t\tsb.append(getLocalizationManager().getLocalizedTextString(\"linePrefixWhenDisplayingConsoleError\")); //$NON-NLS-1$\n\t\t\tsb.append(' ');\n\t\t\tsb.append(e.information);\n\n final String stackTrace = e.stackTrace();\n if (stackTrace != null && stackTrace.length() > 0) {\n sb.append(\"\\n\").append(stackTrace);\n }\n\t\t}\n\t\telse\n\t\t{\n\t\t\tString name = e.name();\n\t\t\tsb.append(getLocalizationManager().getLocalizedTextString(\"linePrefixWhenDisplayingFault\")); //$NON-NLS-1$\n\t\t\tsb.append(' ');\n\t\t\tsb.append(name);\n\t\t\tif (e.information != null && e.information.length() > 0)\n\t\t\t{\n\t\t\t\tsb.append(getLocalizationManager().getLocalizedTextString(\"informationAboutFault\")); //$NON-NLS-1$\n\t\t\t\tsb.append(e.information);\n\t\t\t}\n\n final String stackTrace = e.stackTrace();\n if (stackTrace != null && stackTrace.length() > 0) {\n sb.append(\"\\n\").append(stackTrace);\n }\n\t\t}\n\t\tout( sb.toString() );\n\t}",
"public void printStack() {\n\t\tif (this.l.getHead() != null) {\n\t\t\tl.printList();\n\t\t} else {\n\t\t\tSystem.out.println(\"No element in stack\");\n\t\t}\n\t}",
"public void printStack(){\n\t\tswitch (type) {\n\t\tcase 's' : {\n\t\t\tSystem.out.print(\"[XX]\");\n\t\t}\n\t\tbreak;\n\t\tcase 'w' : {\n\t\t\tSystem.out.print(this.peek().toString());\n\t\t}\n\t\tbreak;\n\t\tcase 't' : {\n\t\t\tStack<Card> temp = new Stack<Card>();\n\t\t\tCard currentCard = null;\n\t\t\tString fullStack = \"\";\n\t\t\twhile(!this.isEmpty()){\n\t\t\t\ttemp.push(this.pop());\n\t\t\t}\n\t\t\twhile(!temp.isEmpty()){\n\t\t\t\tcurrentCard = temp.pop();\n\t\t\t\tfullStack += currentCard.isFaceUp() ? currentCard.toString() : \"[XX]\";\n\t\t\t\tthis.push(currentCard);\n\t\t\t}\n\t\t\tSystem.out.println(fullStack);\n\t\t}\n\t\tbreak;\n\t\tcase 'f' : {\n\t\t\tSystem.out.print(this.peek().toString());\n\t\t}\n\t\tbreak;\n\t\t}\n\t}",
"public static String getStackTrace(final Throwable lThrowable) {\n final StringWriter sw = new StringWriter();\n final PrintWriter pw = new PrintWriter(sw, true);\n lThrowable.printStackTrace(pw);\n return sw.getBuffer().toString();\n }",
"private final void prtlnErr(String s) {\n\n\t\tSystem.err.println(getDateStamp() + \" \" + s);\n\n\t}",
"public static void hexdump(PrintStream ps, byte[] src, int srcIndex, int length) {\n if (length == 0) {\n return;\n }\n char[] c = getDumpData(src, srcIndex, length);\n \n ps.println(c);\n }",
"public static void log(String s, Object... args) {\n System.err.println(Arrays.stream(new Throwable().getStackTrace())\n .skip(1)\n .map(StackTraceElement::toString)\n .filter(sts -> sts.contains(\".nicedev.\"))\n .map(SimpleLog::extractLine)\n .collect(joining(\"\\n\")));\n Object[] tabbedArgs = Stream.of(args)\n .map(arg -> arg instanceof String ? ((String) arg).replaceAll(\"\\n\", \"\\n\\t\") : arg)\n .collect(Collectors.toList()).toArray();\n System.err.printf(\"\\t\".concat(s) + \"%n\", tabbedArgs);\n }",
"public String getStackTraceString() {\r\n\t\t// if there's no nested exception, there's no stackTrace\r\n\t\tif (nestedException_ == null)\r\n\t\t\treturn null;\r\n\r\n\t\tStringBuffer traceBuffer = new StringBuffer();\r\n\r\n\t\tif (nestedException_ instanceof WebAppException) {\r\n\r\n\t\t\ttraceBuffer.append(((WebAppException) nestedException_)\r\n\t\t\t\t\t.getStackTraceString());\r\n\t\t\ttraceBuffer.append(\"-------- nested by:\\n\");\r\n\t\t}\r\n\r\n\t\ttraceBuffer.append(stackTraceString_);\r\n\t\treturn traceBuffer.toString();\r\n\t}",
"public void showStack() {\n\n\t\t/*\n\t\t * Traverse the stack by starting at the top node and then get to the\n\t\t * next node by setting to current node \"pointer\" to the next node until\n\t\t * Null is reached.\n\t\t */\n\t\tNode<T> current = getTopNode();\n\n\t\tSystem.out.println(\"\\n---------------------\");\n\t\tSystem.out.println(\"STACK INFO\");\n\n\t\twhile (current != null) {\n\t\t\tSystem.out.println(\"Node Data: \" + current.data);\n\t\t\tcurrent = current.nextNode;\n\t\t}\n\n\t\tSystem.out.println(\"<< Stack Size: \" + getStackSize() + \" >>\");\n\t\tSystem.out.println(\"----------------------\");\n\n\t}"
]
| [
"0.7307571",
"0.71497554",
"0.71292275",
"0.7113514",
"0.7110565",
"0.7090481",
"0.7075456",
"0.69708204",
"0.680724",
"0.67880356",
"0.67614883",
"0.6749721",
"0.6696023",
"0.6653871",
"0.6544054",
"0.6536626",
"0.6460685",
"0.6388906",
"0.6364366",
"0.632353",
"0.6316318",
"0.6309229",
"0.62621033",
"0.62420994",
"0.6220411",
"0.6157586",
"0.6155365",
"0.6153293",
"0.6153293",
"0.59644204",
"0.5959729",
"0.5929918",
"0.59297866",
"0.5854992",
"0.58520603",
"0.5794235",
"0.5783695",
"0.57783806",
"0.57638276",
"0.5754171",
"0.5750626",
"0.5743742",
"0.57036906",
"0.5702774",
"0.5698685",
"0.5698679",
"0.5676039",
"0.5669011",
"0.565412",
"0.5638377",
"0.5638011",
"0.56321436",
"0.5618269",
"0.56182545",
"0.56121886",
"0.5600399",
"0.5586103",
"0.5579497",
"0.55742687",
"0.55606514",
"0.5555449",
"0.555302",
"0.554511",
"0.55277586",
"0.5523039",
"0.5493742",
"0.5493742",
"0.5454414",
"0.5437846",
"0.54150844",
"0.5403847",
"0.53940386",
"0.5393652",
"0.538507",
"0.53684974",
"0.5358137",
"0.52908045",
"0.52891105",
"0.525893",
"0.5251924",
"0.5241324",
"0.5228001",
"0.5227272",
"0.52215797",
"0.5215702",
"0.52068084",
"0.5202737",
"0.5194435",
"0.51773345",
"0.51548916",
"0.5139156",
"0.5127325",
"0.5123396",
"0.51204926",
"0.51000804",
"0.5097173",
"0.509608",
"0.5095932",
"0.5093666",
"0.5080864"
]
| 0.69694376 | 8 |
Prints the StackTrace from the PrintWriter | public void printStackTrace(java.io.PrintWriter printWriter) {
super.printStackTrace(printWriter);
if (nestedException_ != null) {
printWriter.println("Caused by:");
nestedException_.printStackTrace(printWriter);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void printStackTrace(PrintWriter writer);",
"@Override\n\tpublic void printStackTrace(PrintWriter s) {\n\t\tsuper.printStackTrace(s);\n\t}",
"public void testPrintStackTracePrintWriter_True() {\n Throwable th;\n ByteArrayOutputStream ba = new ByteArrayOutputStream(); \n PrintWriter ps = new PrintWriter(ba, true);\n th = prepareThrowables();\n th.printStackTrace(ps);\n assertEquals(\"incorrect info in printed stack trace\",\n printOutput, ba.toString());\n }",
"public static void printStackTrace() {\n if (outputEnabled) {\n synchronized (out) {\n new Exception(\"Diagnostic Stack Trace\").printStackTrace(out); // NORES\n }\n }\n }",
"public final void printStackTrace( PrintWriter writer )\r\n {\r\n super.printStackTrace( writer );\r\n // Only print causal stack traces if pre-JDK 1.4.\r\n if ( !JDK1_4 ) {\r\n Throwable t = getCause();\r\n while ( t != null ) {\r\n writer.println( \"Caused by: \" + t );\r\n t.printStackTrace( writer );\r\n if ( t instanceof CanyonException ) {\r\n t = ( ( CanyonException ) t ).getCause();\r\n } else {\r\n break;\r\n }\r\n }\r\n }\r\n }",
"public void printStackTrace(final PrintWriter writer) {\n if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {\n super.printStackTrace(writer);\n }\n NestedThrowable.Util.print(nested, writer);\n }",
"public void printStackTrace(PrintWriter output){\n\t\tsynchronized (output) {\n\t\t\tsuper.printStackTrace(output);\n\t\t\tprintChildren(status, output);\n\t\t}\n\t}",
"public static String getPrintStackTrace(Exception e){\n\t\tStringWriter sw = new StringWriter();\n\t\t//PrintWriter integrates with StringWriter\n\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t//This line used to write in catch block then it will writes in the console prints upon the console\n\t\t//Basically prints the data upon the console\n\t\te.printStackTrace(pw);\n\t\t//it will converts to tostring method into some meaningful data\n\t\treturn sw.toString();\n\t}",
"public void printStackTrace(){\n\t\tprintStackTrace(System.err);\n\t}",
"private String stackTraceToString( Throwable t ){\n StringWriter writer = new StringWriter();\n PrintWriter printWriter = new PrintWriter( writer );\n t.printStackTrace( printWriter );\n printWriter.flush();\n return writer.toString();\n }",
"public void testPrintStackTracePrintWriter_False() {\n ByteArrayOutputStream ba = new ByteArrayOutputStream(); \n PrintWriter ps = new PrintWriter(ba, false);\n try {\n throw new Exception(\"level1\", new Exception(\"level2\", new Exception(\"level3\", new NullPointerException())));\n } catch (Exception e) {\n e.printStackTrace(ps);\n }\n assertEquals(\"the output should be empty until flush\",\n \"\", ba.toString());\n }",
"public void printStackTrace() {\n printStackTrace(System.err);\n }",
"public final void printStackTrace()\r\n {\r\n printStackTrace( System.err );\r\n }",
"public static void printStackTrace(Throwable ex) {\n if (outputEnabled) {\n synchronized (out) {\n ex.printStackTrace(out);\n }\n }\n }",
"@Override\n public void printStackTrace() {\n super.printStackTrace(); \n \n if(previous != null){\n previous.printStackTrace();\n }\n }",
"public static String printStackTrace() {\n StringBuilder sb = new StringBuilder();\n StackTraceElement[] trace = Thread.currentThread().getStackTrace();\n for (StackTraceElement traceElement : trace) {\n sb.append(\"\\t \").append(traceElement);\n sb.append(System.lineSeparator());\n }\n return sb.toString();\n }",
"private void printStackTraceHerder() {\n PrintStream printStream = System.err;\n synchronized (printStream) {\n System.err.println(super.getMessage() + \"; nested exception is:\");\n this.detail.printStackTrace();\n }\n }",
"private void printStackTrace(Exception ex, GUILog gl) {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n ex.printStackTrace(pw);\n gl.log(sw.toString()); // stack trace as a string\n ex.printStackTrace();\n }",
"public static String stackTrace(Exception exception) {\n\t\tStringWriter writer = new StringWriter();\n\t\tPrintWriter printWriter = new PrintWriter(writer);\n\t\texception.printStackTrace(printWriter);\n\t\tprintWriter.flush();\n\n\t\tString stackTrace = writer.toString();\n\t\treturn stackTrace;\n\t}",
"@Override\n\tpublic void printStackTrace(PrintStream arg0) {\n\t\tsuper.printStackTrace(arg0);\n\t}",
"public static void printStackTrace(SQLException e, PrintWriter pw) {\r\n SQLException next = e;\r\n while (next != null) {\r\n next.printStackTrace(pw);\r\n next = next.getNextException();\r\n if (next != null) {\r\n System.out.println(\"Next SQLException:\");\r\n }\r\n }\r\n }",
"public void printStackTrace(PrintStream output){\n\t\tsynchronized (output) {\n\t\t\tsuper.printStackTrace(output);\n\t\t\tprintChildren(status, output);\n\t\t}\n\t}",
"public void testPrintStackTracePrintStream() {\n Throwable th;\n ByteArrayOutputStream ba = new ByteArrayOutputStream(); \n PrintStream ps = new PrintStream(ba);\n th = prepareThrowables();\n th.printStackTrace(ps);\n assertEquals(\"incorrect info printed in stack trace\",\n printOutput, ba.toString());\n }",
"private String getStackTrace(Exception ex) {\r\n\t\tStringWriter sw = new StringWriter();\r\n\t\tex.printStackTrace(new PrintWriter(sw));\r\n return sw.toString();\r\n\t}",
"public static void writePrintStackTrace(TestContext context, Throwable e) {\n\t\tcontext.getLogger().error(getPrintStackTraceAsString(e));\n\t}",
"String exceptionToStackTrace( Exception e ) {\n StringWriter stringWriter = new StringWriter();\n PrintWriter printWriter = new PrintWriter(stringWriter);\n e.printStackTrace( printWriter );\n return stringWriter.toString();\n }",
"void dumpTraceLine(String s)\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"[trace] \"); //$NON-NLS-1$\n\t\tsb.append(s);\n\t\tout(sb.toString());\n\t}",
"public static void printStacks(Thread currentThread) {\n\t\tStackTraceElement[] stackTrace = currentThread.getStackTrace();\n\t\t\n\t\tif (stackTrace.length == 0) {\n\t\t\tSystem.out.println(\"!!! No stacks available at the moment !!!\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"=========================================================\");\n\t\tfor (int i= stackTrace.length-1; i >= 0; i--) {\n\t\t\tStackTraceElement stEle = stackTrace[i];\n\t\t\tSystem.out.println((stackTrace.length - i) + \". \" + stEle.toString());\n\t\t}\n\t\tSystem.out.println(\"=========================================================\\n\");\n\t}",
"public static String getPrintStackTraceAsString(Throwable e) {\n\t\tStringWriter sw = new StringWriter();\n\t\te.printStackTrace(new PrintWriter(sw));\n\t\treturn sw.toString();\n\t}",
"@Override\r\n\tpublic void printStackTrace() {\n\t\tsuper.printStackTrace();\r\n\t}",
"public static void writePrintStackTrace(TestContext context, Exception e) {\n\t\tcontext.getLogger().error(getPrintStackTraceAsString(e));\n\t}",
"@Override\n\tpublic void printStackTrace() {\n\t\tsuper.printStackTrace();\n\t}",
"@Override\n\tpublic void printStackTrace() {\n\t\tsuper.printStackTrace();\n\t}",
"public void printThreadStack(String threadName) {\n\t\tthis.toSlave.println(MasterProcessInterface.THREAD_STACK_COMMAND + ((threadName == null) ? \"\" : (\":\" + threadName)));\n\t}",
"private void printStackTrace( Exception e )\n {\n logger.printStackTrace( e, 1 );\n }",
"String stacktraceToString(Throwable t) {\r\n\t\tStringWriter sw = new StringWriter();\r\n\t\tPrintWriter out = new PrintWriter(sw);\r\n\t\tt.printStackTrace(out);\r\n\t\tout.flush();\r\n\t\treturn sw.toString();\r\n\t}",
"private void printDebugHtmlBody\n\t\t(PrintWriter out)\n\t\t{\n\t\tout.println (\"<P>\");\n\t\tout.println (\"<HR/>\");\n\t\tout.println (\"<H3>Thread Dump</H3>\");\n\t\tout.println (\"</P>\");\n\t\tMap<Thread,StackTraceElement[]> traces = Thread.getAllStackTraces();\n\t\tfor (Map.Entry<Thread,StackTraceElement[]> entry : traces.entrySet())\n\t\t\t{\n\t\t\tThread thread = entry.getKey();\n\t\t\tout.println (\"<P>\");\n\t\t\tout.print (\"Name: \");\n\t\t\tout.print (thread.getName());\n\t\t\tout.println (\" \");\n\t\t\tout.print (\" ID: \");\n\t\t\tout.print (thread.getId());\n\t\t\tout.println (\" \");\n\t\t\tout.print (\" Daemon: \");\n\t\t\tout.print (thread.isDaemon() ? \"yes\" : \"no\");\n\t\t\tout.println (\" \");\n\t\t\tout.print (\" State: \");\n\t\t\tout.print (thread.getState());\n\t\t\tout.println (\" \");\n\t\t\tout.print (\" Priority: \");\n\t\t\tout.print (thread.getPriority());\n\t\t\tout.println (\" \");\n\t\t\tout.print (\" Thread Group: \");\n\t\t\tout.print (thread.getThreadGroup().getName());\n\t\t\tout.println ();\n\t\t\tfor (StackTraceElement element : entry.getValue())\n\t\t\t\t{\n\t\t\t\tout.print (\"<BR/> \");\n\t\t\t\tout.println (element);\n\t\t\t\t}\n\t\t\tout.println (\"</P>\");\n\t\t\t}\n\t\tout.println (\"<P>\");\n\t\tout.println (\"<HR/>\");\n\t\tout.println (\"</P>\");\n\t\t}",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tthrow new NullPointerException();\n\t\t} catch (Exception e) {\n\t\t\tStringWriter sw = new StringWriter();\n\t\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t\te.printStackTrace(pw);\n\n\t\t\tSystem.out.println(sw.toString());\n\t\t}\n\n\t\t// Convert a StackTrace to String using Apache Commons\n\t\ttry {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getStackTrace());\n\t\t}\n\t}",
"public void printStackTrace(java.io.PrintStream printStream) {\r\n\t\tsuper.printStackTrace(printStream);\r\n\t\tif (nestedException_ != null) {\r\n\t\t\tprintStream.println(\"Caused by:\");\r\n\t\t\tnestedException_.printStackTrace(printStream);\r\n\t\t}\r\n\t}",
"public void dump(PrintWriter pw) {\n dump(pw, true);\n }",
"static public String generateStackTraceString(Throwable t) {\r\n\t\tStringWriter s = new StringWriter();\r\n\t\tt.printStackTrace(new PrintWriter(s));\r\n\t\treturn s.toString();\r\n\t}",
"public static void printStackTrace(SQLException e) {\r\n printStackTrace(e, new PrintWriter(System.err));\r\n }",
"private String printStackTrace() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"static public String getStackTrace(Exception e) {\n java.io.StringWriter s = new java.io.StringWriter(); \n e.printStackTrace(new java.io.PrintWriter(s));\n String trace = s.toString();\n \n if(trace==null || trace.length()==0 || trace.equals(\"null\"))\n return e.toString();\n else\n return trace;\n }",
"public int printMoveTrace() {\r\n\t\toutputStack = new Stack<String>();\r\n\t\tprintMoveTraceHelper(this);\r\n\t\tint rtn = outputStack.size();\r\n\t\twhile (!outputStack.isEmpty()) {\r\n\t\t\tSystem.out.println(outputStack.pop());\r\n\t\t}\r\n\t\treturn rtn;\r\n\t}",
"private String getStackTrace(Throwable throwable) {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n throwable.printStackTrace(pw);\n return sw.toString();\n }",
"public static String getStackTrace(Throwable t) {\n StringWriter sw = new StringWriter();\n t.printStackTrace(new PrintWriter(sw));\n String stackTrace = sw.toString();\n stackTrace = stackTrace.replaceAll(\"<\", \"<\");\n stackTrace = stackTrace.replaceAll(\">\", \">\");\n\n return stackTrace;\n }",
"public abstract void mo13750a(Throwable th, PrintWriter printWriter);",
"public static String getStackTraceAsString(Throwable t) {\n Writer result = new StringWriter();\n PrintWriter printWriter = new PrintWriter(result);\n t.printStackTrace(printWriter);\n return result.toString();\n }",
"public interface CommonUtils {\n\tpublic static String getPrintStackTrace(Exception e){\n\t\t//StringWriter writes upon the string\n\t\tStringWriter sw = new StringWriter();\n\t\t//PrintWriter integrates with StringWriter\n\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t//This line used to write in catch block then it will writes in the console prints upon the console\n\t\t//Basically prints the data upon the console\n\t\te.printStackTrace(pw);\n\t\t//it will converts to tostring method into some meaningful data\n\t\treturn sw.toString();\n\t}\n}",
"public static String getStackTraceAsString(Exception ex)\n {\n StringWriter errors = new StringWriter();\n ex.printStackTrace(new PrintWriter(errors));\n return errors.toString();\n }",
"public static String getStackTrace(Exception aInException) {\n\n StringWriter lStringWriter = new StringWriter();\n aInException.printStackTrace(new PrintWriter(lStringWriter));\n return lStringWriter.toString();\n\n }",
"public String getStackTraceString(Throwable tr) {\n if (tr == null) {\n return \"\";\n }\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n tr.printStackTrace(pw);\n return sw.toString();\n }",
"public static String getStackMessage(Throwable exception) {\n\t\tStringWriter sw = new StringWriter();\n\t\tPrintWriter pw = new PrintWriter(sw);\n\t\tpw.print(\" [ \");\n\t\tpw.print(exception.getClass().getName());\n\t\tpw.print(\" ] \");\n\t\texception.printStackTrace(pw);\n\t\treturn sw.toString();\n\t}",
"public void printStackTrace(final PrintStream stream) {\n if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {\n super.printStackTrace(stream);\n }\n NestedThrowable.Util.print(nested, stream);\n }",
"public static String getStackTrace(final Exception ex)\n\t{\n\t\tfinal StringWriter sw = new StringWriter();\n\t\tfinal PrintWriter pw = new PrintWriter(sw, true);\n\t\tex.printStackTrace(pw);\n\t\tpw.flush();\n\t\tsw.flush();\n\t\treturn sw.toString();\n\t}",
"public final void printStackTrace( PrintStream stream )\r\n {\r\n super.printStackTrace( stream );\r\n // Only print causal stack traces if pre-JDK 1.4.\r\n if ( !JDK1_4 ) {\r\n Throwable t = getCause();\r\n while ( t != null ) {\r\n stream.println( \"Caused by: \" + t );\r\n t.printStackTrace( stream );\r\n if ( t instanceof CanyonException ) {\r\n t = ( ( CanyonException ) t ).getCause();\r\n } else {\r\n break;\r\n }\r\n }\r\n }\r\n }",
"String getLogStackTrace();",
"public static void printStackTrace____V (MJIEnv env, int objRef) {\n \n env.getThreadInfo().printStackTrace(objRef);\n }",
"private static void printTrace(Integer runId, String traceString ) throws java.io.FileNotFoundException,UnsupportedEncodingException{\n\n\t\t// writing the trace report\n\t\t// <inputFilename>_<method>_<cutoff>_<runID>*.sol\n\t\tString fileName = String.format(\"%s_%s_%.0f\",Project.name,Project.method,Project.cutoffTimeSeconds);\n\n\t\tif ( runId != -1 ){\n\t\t\tfileName = fileName +\"_\"+runId+\".trace\";\n\t\t} else {\n\t\t\tfileName = fileName +\".trace\";\n\t\t}\n\n\t\tPrintWriter repWriter = new PrintWriter(fileName, \"UTF-8\");\n\n\t\trepWriter.printf(\"%s\\n\",traceString);\n\n\t repWriter.close();\n\n\t}",
"public static String getStackTrace( Throwable exception ) {\r\n\t\tStringWriter sw = new StringWriter();\r\n\t\tPrintWriter pw = new PrintWriter( sw );\r\n\t\texception.printStackTrace( pw );\r\n\t\treturn sw.toString();\r\n\t}",
"public static void printWarings(Connection conn, PrintWriter pw) {\r\n if (conn != null) {\r\n try {\r\n printStackTrace(conn.getWarnings(), pw);\r\n } catch (SQLException e) {\r\n printStackTrace(e, pw);\r\n }\r\n }\r\n }",
"private String getStacktraceFromException(Exception e) {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tPrintStream ps = new PrintStream(baos);\n\t\te.printStackTrace(ps);\n\t\tps.close();\n\t\treturn baos.toString();\n\t}",
"private void writeTrace()\r\n {\r\n TGCreator creator = new TGCreator();\r\n TGTrace trace = creator.createTrace(JVM.getVM(), this.stateGraph);\r\n TraceGraphWriter tgWriter = new TraceGraphWriter(trace);\r\n\r\n if (this.traceCompressed)\r\n {\r\n this.filename += ITraceConstants.ZIP_FILE_SUFFIX;\r\n tgWriter.saveCompressed(new File(this.filename));\r\n }\r\n else\r\n {\r\n this.filename += ITraceConstants.XML_FILE_SUFFIX;\r\n tgWriter.save(new File(this.filename));\r\n }\r\n\r\n SymbolicExecutionTracerPlugin.log(Status.INFO,\r\n \"Symbolic Execution Tracer wrote \" + this.numEndStates\r\n + \" traces to \" + this.filename);\r\n }",
"public static void threadDump() {\n\t\tLOG.error(\"All threads are in use. Logging the thread stack trace to threaddump.txt and exiting.\");\n\t\tfinal ThreadMXBean threads = ManagementFactory.getThreadMXBean();\n\t\tlong[] threadIds = threads.getAllThreadIds();\n\t\tPrintWriter printWriter = null;\n\t\ttry {\n\t\t\tprintWriter = new PrintWriter(new FileWriter(THREAD_DUMP_FILE_PATH,\n\t\t\t\t\tfalse));\n\t\t\tprintWriter.println(\"Raptor ThreadService initiated dump \"\n\t\t\t\t\t+ new Date());\n\t\t\tfor (long threadId : threadIds) {\n\t\t\t\tThreadInfo threadInfo = threads.getThreadInfo(threadId, 10);\n\t\t\t\tprintWriter.println(\"Thread \" + threadInfo.getThreadName()\n\t\t\t\t\t\t+ \" Block time:\" + threadInfo.getBlockedTime()\n\t\t\t\t\t\t+ \" Block count:\" + threadInfo.getBlockedCount()\n\t\t\t\t\t\t+ \" Lock name:\" + threadInfo.getLockName()\n\t\t\t\t\t\t+ \" Waited Count:\" + threadInfo.getWaitedCount()\n\t\t\t\t\t\t+ \" Waited Time:\" + threadInfo.getWaitedTime()\n\t\t\t\t\t\t+ \" Is Suspended:\" + threadInfo.isSuspended());\n\t\t\t\tStackTraceElement[] stackTrace = threadInfo.getStackTrace();\n\t\t\t\tfor (StackTraceElement element : stackTrace) {\n\t\t\t\t\tprintWriter.println(element);\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t} finally {\n\t\t\tif (printWriter != null) {\n\t\t\t\ttry {\n\t\t\t\t\tprintWriter.flush();\n\t\t\t\t\tprintWriter.close();\n\t\t\t\t} catch (Exception e2) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static String getStackTrace(Throwable throwable)\n {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter( sw, true );\n throwable.printStackTrace( pw );\n return sw.getBuffer().toString();\n }",
"protected void trace(String msg)\r\n\t{\r\n\t\tm_stream.println(msg);\r\n\t}",
"private void log(Throwable t) {\r\n StringWriter sw = new StringWriter();\r\n PrintWriter w = new PrintWriter(sw);\r\n t.printStackTrace(w);\r\n w.close();\r\n log(sw.toString(), Project.MSG_ERR);\r\n }",
"public void printStackTrace(Throwable t) {\n\t\tt.printStackTrace(out);\n\n\t\tMethod[] methods = t.getClass().getMethods();\n\n\t\tint size = methods.length;\n\t\tClass throwable = Throwable.class;\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tMethod method = methods[i];\n\n\t\t\tif (Modifier.isPublic(method.getModifiers())\n\t\t\t\t\t&& method.getName().startsWith(\"get\") && throwable.isAssignableFrom(method.getReturnType()) && (method.getParameterTypes().length == 0)) { //$NON-NLS-1$\n\t\t\t\ttry {\n\t\t\t\t\tThrowable nested = (Throwable) method.invoke(t, null);\n\n\t\t\t\t\tif ((nested != null) && (nested != t)) {\n\t\t\t\t\t\tout.println(ConsoleMsg.CONSOLE_NESTED_EXCEPTION);\n\t\t\t\t\t\tprintStackTrace(nested);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (IllegalAccessException e) {\n\t\t\t\t}\n\t\t\t\tcatch (InvocationTargetException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void writeOut(PrintWriter pw){}",
"public static String getStackTrace(Throwable t) {\n String stackTrace = null;\n try {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n t.printStackTrace(pw);\n pw.close();\n sw.close();\n stackTrace = sw.getBuffer().toString();\n } catch (Exception ex) {\n }\n return stackTrace;\n }",
"public static void fnPrintException(Exception e)\n\t{\n\t\te.printStackTrace();\n\t}",
"public java.io.PrintWriter getLogWriter() {\n \tif ( tracer == null) {\n \t return null;\n \t} else {\n \t return tracer.getWriter();\n \t}\n }",
"public interface StackTrace {\r\n\r\n\t /**\r\n\t * Gets the class from which the stack is tracking.\r\n\t * \r\n\t * @return\t\t\tThe name of the class\r\n\t */\r\n public String getClazz();\r\n\r\n /**\r\n * Sets the class from which the stack should tracking.\r\n * \r\n * @param clazz\tThe name of the class\r\n */\r\n public void setClazz(String clazz);\r\n\r\n /**\r\n * Gets the current message from the StackTrace.\r\n * \r\n * @return\t\t\tThe message\r\n */\r\n public String getMessage();\r\n\r\n /**\r\n * Sets a message to the StackTrace.\r\n * \r\n * @param message\tThe message\r\n */\r\n public void setMessage(String message);\r\n\r\n /**\r\n * Gets the current stack.\r\n * \r\n * @return\t\t\tThe current stack\r\n */\r\n public String getStack();\r\n\r\n /**\r\n * Sets the current stack.\r\n * \r\n * @param stack\tThe new stack\r\n */\r\n public void setStack(String stack);\r\n}",
"static void mainTest(PrintWriter out) throws Exception {\n\t}",
"private void printMessage(String s) {\n if (PRINTTRACE) {\r\n System.out.println(s);\r\n }\r\n }",
"protected void trace(String headline, String qName) {\r\n\t\ttee.writelnMessage(headline + Strings.padRight(qName, 25) + \" - context : \" + Strings.padRight(context.name(), 11) + \" - stack : \" + dump(contexts));\r\n\t}",
"public void println(int priority, String tag, String msg, Throwable tr);",
"public String getStackTraceString() {\r\n\t\t// if there's no nested exception, there's no stackTrace\r\n\t\tif (nestedException_ == null)\r\n\t\t\treturn null;\r\n\r\n\t\tStringBuffer traceBuffer = new StringBuffer();\r\n\r\n\t\tif (nestedException_ instanceof WebAppException) {\r\n\r\n\t\t\ttraceBuffer.append(((WebAppException) nestedException_)\r\n\t\t\t\t\t.getStackTraceString());\r\n\t\t\ttraceBuffer.append(\"-------- nested by:\\n\");\r\n\t\t}\r\n\r\n\t\ttraceBuffer.append(stackTraceString_);\r\n\t\treturn traceBuffer.toString();\r\n\t}",
"void printException(Exception e,int level)\n { printLog(\"Exception: \"+ExceptionPrinter.getStackTraceOf(e),level);\n }",
"public static void exceptionDescriptive(String errorCause, StackTraceElement l) throws IOException {\n\t\t\t String secondLine = \"Browser Shut-Down\", location = \"\";\n\t\t\t String packageNameOnly, classNameOnly, xml, detected, runtime, subtotal;\n\n\t\t\t packageNameOnly = l.getClassName().substring(0, l.getClassName().lastIndexOf(\".\"));\n\t\t\t classNameOnly = l.getClassName().substring(1 + l.getClassName().lastIndexOf(\".\"), l.getClassName().length());\n\t\t\t location = packageNameOnly + File.separator + classNameOnly + File.separator + l.getMethodName() + \", line # \" + l.getLineNumber();\n\t\t xml = \"<class name=\\\"\" + packageNameOnly + \".\" + classNameOnly + \"\\\"><methods><include name=\\\"\" + l.getMethodName() + \"\\\"/></methods></class>\";\n\t\t detected = getCurrentDateTimeFull();\n\t\t runtime = testRunTime(\"start.time\", System.currentTimeMillis());\n\t\t subtotal = testRunTime(\"ini.time\", System.currentTimeMillis());\n\t\t \t \n\t\t // APPEND A NEW LOG RECORDS:\n\t\t fileWriterPrinter(\"\\nError Cause: ---> \" + errorCause + \"\\nDescription: ---> \" + secondLine + \"\\n Location: ---> \" + location);\t\n\t\t if (fileExist(\"run.log\", false)) {\n\t\t\t fileWriter(\"run.log\", \"Error Cause: ---> \" + errorCause);\n\t\t\t fileWriter(\"run.log\", \"Description: ---> \" + secondLine);\n\t\t\t fileWriter(\"run.log\", \" Location: ---> \" + location);\t \t \n\t\t }\n\t\t \n\t\t // APPEND AN ERROR RECORD:\n\t\t\t fileWriter(\"failed.log\", \" Failure: #\" + fileScanner(\"failed.num\"));\n\t\t\t fileWriter(\"failed.log\", \" Test: #\" + fileScanner(\"test.num\"));\n\t\t\t fileWriter(\"failed.log\", \" Start: \" + convertCalendarMillisecondsAsStringToDateTimeHourMinSec(fileScanner(\"start.time\")));\n fileWriter(\"failed.log\", \" XML Path: \" + xml);\n\t\t\t fileWriter(\"failed.log\", \"Error Cause: ---> \" + errorCause);\n\t\t\t fileWriter(\"failed.log\", \"Description: ---> \" + secondLine);\n\t\t\t fileWriter(\"failed.log\", \" Location: ---> \" + location);\n\t\t\t fileWriter(\"failed.log\", \" Detected: \" + detected);\n\t\t \t fileWriter(\"failed.log\", \" Runtime: \" + runtime);\n\t\t \t fileWriter(\"failed.log\", \" Subtotal: \" + subtotal);\n\t\t \t fileWriter(\"failed.log\", \"\");\n\t\t \t \n\t\t // APPEND DESCRIPTIVE RECORD:\n\t\t\t Assert.assertFalse(true, \"\\n Error Cause: ---> \" + errorCause\n\t\t\t\t\t + \"\\n Description: ---> \" + secondLine\n\t\t\t\t\t + \"\\n Location: ---> \" + location\n\t\t\t\t\t\t\t\t\t + \"\\n Detected: ---> \" + detected\n\t\t\t\t\t\t\t\t\t + \"\\n Runtime: ---> \" + runtime\n\t\t\t\t\t\t\t\t\t + \"\\n Subtotal: ---> \" + subtotal\n\t\t\t\t\t + \"\\n\"\n\t\t\t\t\t\t\t + xml\n\t\t\t\t\t\t\t + \"\\n\"\n\t\t\t\t \t + \"\\nStack Traces:\");\t\t\t \n\t\t }",
"public String getTrace() throws RemoteException;",
"private String toString(final Throwable throwable) {\n final StringWriter writer = new StringWriter();\n final PrintWriter printer = new PrintWriter(writer);\n throwable.printStackTrace(printer);\n return writer.toString();\n }",
"public static String getStackTrace(final Throwable lThrowable) {\n final StringWriter sw = new StringWriter();\n final PrintWriter pw = new PrintWriter(sw, true);\n lThrowable.printStackTrace(pw);\n return sw.getBuffer().toString();\n }",
"public static String getStackTraceString(Throwable tr) {\n if (tr == null) {\n return \"\";\n }\n\n // This is to reduce the amount of log spew that apps do in the non-error\n // condition of the network being unavailable.\n Throwable t = tr;\n while (t != null) {\n if (t instanceof UnknownHostException) {\n return \"\";\n }\n t = t.getCause();\n }\n\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n tr.printStackTrace(pw);\n pw.flush();\n return sw.toString();\n }",
"public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {\n synchronized (mLock) {\n pw.println(\"RTT Metrics:\");\n pw.println(\"mNumStartRangingCalls:\" + mNumStartRangingCalls);\n pw.println(\"mOverallStatusHistogram:\" + mOverallStatusHistogram);\n pw.println(\"AP:\" + mPerPeerTypeInfo[PEER_AP]);\n pw.println(\"AWARE:\" + mPerPeerTypeInfo[PEER_AWARE]);\n }\n }",
"public String throwableToString(Throwable throwable) {\n if (throwable == null) return \"\";\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n throwable.printStackTrace(pw);\n String stackTrace = sw.toString();\n\n return stackTrace;\n }",
"public static void stackTrace() {\n Observable<String> myObservable = Observable.fromCallable(() -> {\n Object value = null;\n return value.toString();\n });\n myObservable.subscribe(item -> System.out.println(\"output = \" + item));\n }",
"public void trace(String msg) {\n\t\tif (this.logLevel <= BackupLogger.TRACE) {\n\t\t\twrite(\"TRCE \" + msg);\n\t\t\tSystem.out.println(\"TRCE \" + msg);\n\t\t}\n\t}",
"public static String convertStackTrace(Exception e) {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n e.printStackTrace(pw);\n return sw.toString();\n }",
"public static void report(Exception e) {\n\t\tStringWriter stackTrace = new StringWriter();\n\t\te.printStackTrace(new PrintWriter(stackTrace));\n\t\tlogger.severe(e.getLocalizedMessage());\n\t\tlogger.severe(stackTrace.toString());\n\t}",
"public static String getStackTrace(final Throwable throwable) {\n final StringWriter sw = new StringWriter();\n final PrintWriter pw = new PrintWriter(sw, true);\n throwable.printStackTrace(pw);\n return sw.getBuffer().toString();\n }",
"public static String getStackTrace(final Throwable throwable) {\n final StringWriter sw = new StringWriter();\n final PrintWriter pw = new PrintWriter(sw, true);\n throwable.printStackTrace(pw);\n return sw.getBuffer().toString();\n }",
"public void printStack(int stackNo){\n\t\tint begin = stackStarts[stackNo-1];\n\t\tfor (int i = begin; i < begin + stackTops[stackNo-1]; i++)\n\t\t\t\tSystem.out.print(stacks[i] + \" \");\n\t\tSystem.out.println();\n\t}",
"private static void outputThrowable(Throwable cause, AppendingStringBuffer sb,\n\t\t\tboolean stopAtWicketServlet)\n\t{\n\t\tsb.append(cause);\n\t\tsb.append(\"\\n\");\n\t\tStackTraceElement[] trace = cause.getStackTrace();\n\t\tfor (int i = 0; i < trace.length; i++)\n\t\t{\n\t\t\tString traceString = trace[i].toString();\n\t\t\tif (!(traceString.startsWith(\"sun.reflect.\") && i > 1))\n\t\t\t{\n\t\t\t\tsb.append(\" at \");\n\t\t\t\tsb.append(traceString);\n\t\t\t\tsb.append(\"\\n\");\n\t\t\t\tif (stopAtWicketServlet\n\t\t\t\t\t\t&& traceString.startsWith(\"wicket.protocol.http.WicketServlet\"))\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void printExceptionTraceCauses(Throwable throwable) {\n throwable.printStackTrace();\n if (null != throwable.getCause()) {\n e(\"Caused by:\");\n printExceptionTraceCauses(throwable.getCause());\n }\n }",
"public void guardar(PrintWriter writer) {\n writer.println(posX);\n writer.println(posY);\n }",
"public static String getStackTrace(Throwable t) {\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n PrintStream ps = new PrintStream(os);\n t.printStackTrace(ps);\n return os.toString();\n }",
"static String handleStackTrace(Throwable ex){\n // add the stack trace message\n StringBuilder builder = new StringBuilder(SPACE);\n builder.append(ex.getMessage());\n builder.append(NEWLINE);\n\n // add each line of the stack trace.\n for (StackTraceElement element : ex.getStackTrace()){\n builder.append(SPACE);\n builder.append(element.toString());\n builder.append(NEWLINE);\n }\n return builder.toString();\n }",
"public void trace(Object message, Throwable t)\n/* */ {\n/* 107 */ debug(message, t);\n/* */ }"
]
| [
"0.8195453",
"0.70615005",
"0.69621015",
"0.6890751",
"0.6714062",
"0.66994554",
"0.6520356",
"0.64417654",
"0.64210945",
"0.64036095",
"0.63858145",
"0.6277253",
"0.6222997",
"0.62187195",
"0.6193797",
"0.61122817",
"0.60922253",
"0.6039",
"0.5945465",
"0.5943976",
"0.5851114",
"0.58443433",
"0.58339936",
"0.58252144",
"0.58103067",
"0.57988054",
"0.5779707",
"0.57758546",
"0.5772763",
"0.5751689",
"0.57372624",
"0.57345605",
"0.57345605",
"0.5730878",
"0.57151043",
"0.57089853",
"0.5617114",
"0.5556795",
"0.55398166",
"0.55295813",
"0.5517587",
"0.5499789",
"0.54412234",
"0.5432919",
"0.5395146",
"0.5391925",
"0.5372126",
"0.53702706",
"0.53551227",
"0.5349694",
"0.53445065",
"0.5330035",
"0.53226787",
"0.5282843",
"0.52668834",
"0.5248153",
"0.5241193",
"0.5237639",
"0.52066004",
"0.5196231",
"0.5175286",
"0.51439905",
"0.51425993",
"0.5109642",
"0.5101803",
"0.5070557",
"0.506243",
"0.50490314",
"0.5034432",
"0.5018323",
"0.50021833",
"0.49921542",
"0.49808994",
"0.49570712",
"0.49514163",
"0.4930461",
"0.49119818",
"0.49090585",
"0.49064657",
"0.4904036",
"0.48974672",
"0.4893042",
"0.48912537",
"0.4887178",
"0.48812068",
"0.48763067",
"0.48744157",
"0.48676464",
"0.48587734",
"0.48548895",
"0.4841855",
"0.48362747",
"0.48362747",
"0.4828495",
"0.4825158",
"0.48203877",
"0.48163706",
"0.48133457",
"0.48071423",
"0.47786742"
]
| 0.68138903 | 4 |
Extracts the properties of an exception | private void extractProperties(Throwable throwable) {
// if instance of ProservException, extract the exception code
if (throwable instanceof WebAppException) {
this.setExceptionCode(((WebAppException) throwable)
.getExceptionCode());
} // end of if ()
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"EProperties getProperties();",
"public String getExceptioninfo() {\n return exceptioninfo;\n }",
"String getException();",
"String getException();",
"@JsonProperty(\"exception\")\n public ExceptionInfo getException() {\n return exception;\n }",
"public Map<String, Object> getProperties() throws ClientException;",
"java.lang.String getPropertiesOrThrow(\n java.lang.String key);",
"String getCauseException();",
"public interface ExceptionMessager {\n\n /**\n * Gets the error code (message properties).\n *\n * @return the error code\n */\n public String getErrorCode();\n\n /**\n * Gets the values for value substitute\n *\n * @return the values\n */\n public Object[] getValues();\n}",
"public String getParseExceptionInfo(SAXParseException exception)\n {\n\n if (exception == null)\n return null;\n\n String retVal = new String(\"\");\n String tmp;\n\n tmp = exception.getPublicId();\n\n if (tmp != null)\n retVal += \" publicID:\" + tmp;\n\n tmp = exception.getSystemId();\n\n if (tmp != null)\n retVal += \" systemId:\" + tmp;\n\n try\n {\n tmp = Integer.toString(exception.getLineNumber());\n }\n catch (NumberFormatException nfe)\n {\n tmp = null;\n }\n\n if (tmp != null)\n retVal += \" lineNumber:\" + tmp;\n\n try\n {\n tmp = Integer.toString(exception.getColumnNumber());\n }\n catch (NumberFormatException nfe)\n {\n tmp = null;\n }\n\n if (tmp != null)\n retVal += \" columnNumber:\" + tmp;\n\n tmp = exception.getMessage(); // Will grab inner message if needed\n\n if (tmp != null)\n retVal += \" message:\" + tmp;\n\n return retVal;\n }",
"public ExceptionInfo getExceptionInfo() {\n return exceptionInfo;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getExceptions() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(EXCEPTIONS_PROP.get());\n }",
"@java.lang.Override\n public java.lang.String getPropertiesOrThrow(\n java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n java.util.Map<java.lang.String, java.lang.String> map =\n internalGetProperties().getMap();\n if (!map.containsKey(key)) {\n throw new java.lang.IllegalArgumentException();\n }\n return map.get(key);\n }",
"@java.lang.Override\n public java.lang.String getPropertiesOrThrow(\n java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n java.util.Map<java.lang.String, java.lang.String> map =\n internalGetProperties().getMap();\n if (!map.containsKey(key)) {\n throw new java.lang.IllegalArgumentException();\n }\n return map.get(key);\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getExceptions() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(EXCEPTIONS_PROP.get());\n }",
"NamespacedProperty getFaultReasonExpression();",
"public static String getExceptionInfo(Exception exception)\n {\n return String.format(\"%s ; %s\", exception.toString(), exception.getStackTrace()[0].toString());\n }",
"NamespacedProperty getFaultDetailExpression();",
"List<String> getErrorMessages(Exception exception);",
"public void getProperties() throws IllegalArgumentException, IllegalAccessException {\r\n\t\t Class<?> aClass = this.getClass();\r\n\t\t Field[] declaredFields = aClass.getDeclaredFields();\r\n\t\t Map<String, String> logEntries = new HashMap<>();\r\n\r\n\t\t for (Field field : declaredFields) {\r\n\t\t field.setAccessible(true);\r\n\r\n\t\t Object[] arguments = new Object[]{\r\n\t\t field.getName(),\r\n\t\t field.getType().getSimpleName(),\r\n\t\t String.valueOf(field.get(this))\r\n\t\t };\r\n\r\n\t\t String template = \"- Property: {0} (Type: {1}, Value: {2})\";\r\n\t\t String logMessage = System.getProperty(\"line.separator\")\r\n\t\t + MessageFormat.format(template, arguments);\r\n\r\n\t\t logEntries.put(field.getName(), logMessage);\r\n\t\t }\r\n\r\n\t\t SortedSet<String> sortedLog = new TreeSet<>(logEntries.keySet());\r\n\r\n\t\t StringBuilder sb = new StringBuilder(\"Class properties:\");\r\n\r\n\t\t Iterator<String> it = sortedLog.iterator();\r\n\t\t while (it.hasNext()) {\r\n\t\t String key = it.next();\r\n\t\t sb.append(logEntries.get(key));\r\n\t\t }\r\n\r\n\t\t System.out.println(sb.toString());\r\n\t\t}",
"public Map getMessageProperties()\r\n\t{\r\n\t\treturn this.properties;\r\n\t}",
"java.lang.String getProperties();",
"public static String exceptionTypeAndMsg(Exception e) {\n return e.getClass() + \" : \" + e.getMessage();\n }",
"public PropertyDescription [] getPropertiesDescriptions () {\n\t PropertyDescription [] pds = new PropertyDescription [1];\n\t pds[0] = new PropertyDescription (\"errorFunctionName\", \"Error Function\", \"The name of the error function, can be Absolute, Classification, Likelihood or Variance.\");\n\t return pds;\n }",
"public synchronized Properties obtenerPropiedades() throws Exception{\n\t\tif (propiedades == null){\n\t\t\treadProperties();\n\t\t}\n\t\treturn propiedades;\n\t}",
"java.lang.String getExceptions(int index);",
"public Throwable getOriginalException()\n/* 28: */ {\n/* 29:56 */ return this.originalE;\n/* 30: */ }",
"ResolvedType getSpecifiedException(int index);",
"List<CSSParseException> getExceptions();",
"@Override\r\n\tpublic String toString() {\n\t\treturn \"Exception is..\" + msg;\r\n\t}",
"public Exception getException ()\n {\n return exception;\n }",
"private ErrorDetails generateErrorDetails(Exception ex, WebRequest request) {\n\t\treturn new ErrorDetails(new Date(), ex.getMessage(),\n\t\t\t\trequest.getDescription(false));\n\t}",
"public abstract AbstractProperties getProperties();",
"public InvalidPropertiesException(String mensagem) {\n\t\tsuper(mensagem);\n\t}",
"@Property\n public native MintMessageException getExceptionError ();",
"com.palantir.paxos.persistence.generated.PaxosPersistence.ExceptionProto getException();",
"Properties getProperties();",
"public String getThrowInfo() {\n if (null == throwable) {\n return throwText;\n }\n // return from throwable;\n StringBuffer sb = new StringBuffer();\n StackTraceElement[] stackArray = throwable.getStackTrace();\n for (int i = 0; i < stackArray.length; ++i) {\n StackTraceElement element = stackArray[i];\n sb.append(element.toString() + \"\\n\");\n }\n return sb.toString();\n }",
"public Map<String, List<String>> throwsDesc() {\n return throwsDesc;\n }",
"private List<String> getExceptionSynopsis(Throwable e) {\n Stack<Throwable> exceptions = new Stack<>();\n while (e != null && !exceptions.contains(e)) {\n // noinspection ThrowableResultOfMethodCallIgnored\n exceptions.push(e);\n e = e.getCause();\n }\n\n List<String> synopsis = new ArrayList<>();\n StringBuilder buffer = new StringBuilder();\n\n boolean foundTrace = false;\n while (!foundTrace && !exceptions.isEmpty()) {\n e = exceptions.pop();\n StackTraceElement[] elements = e.getStackTrace();\n for (StackTraceElement element : elements) {\n if (element.getClassName().startsWith(\"datawave.ingest\")) {\n foundTrace = true;\n }\n if (foundTrace) {\n buffer.append(e.getClass().getName());\n buffer.append('@');\n buffer.append(element.getClassName());\n buffer.append('.').append(element.getMethodName());\n buffer.append('(').append(element.getLineNumber()).append(')');\n synopsis.add(buffer.toString());\n buffer.setLength(0);\n break;\n }\n }\n }\n\n // NOTE: By definition, this method is only called by datawave.ingest.EventMapper, and only\n // available to be called by this class the condition on line 542 will always be satisfied\n // and so 'foundTrace' will always be set to true. So, this code can eventually be removed.\n if (!foundTrace) {\n assert e != null;\n buffer.append(e.getClass().getName());\n synopsis.add(buffer.toString());\n }\n\n return synopsis;\n }",
"public Exception getException()\n {\n return exception;\n }",
"public java.lang.String getException() {\n return exception;\n }",
"private Property extractPropertyFromMetadata(MetadataConverter metadataConverter, Property[] properties,\n String propertyName) throws IdentityProviderManagementException {\n\n Property propertyWithName = null;\n StringBuilder certificate = new StringBuilder();\n try {\n FederatedAuthenticatorConfig metaFederated =\n metadataConverter.getFederatedAuthenticatorConfig(properties, certificate);\n Property[] metadataProperties = metaFederated.getProperties();\n for (Property metadataProperty : metadataProperties) {\n // Searching for the property.\n if (propertyName.equals(metadataProperty.getName())) {\n propertyWithName = metadataProperty;\n break;\n }\n }\n } catch (IdentityProviderManagementException ex) {\n throw new IdentityProviderManagementException(\"Error converting metadata\", ex);\n } catch (XMLStreamException e) {\n throw new IdentityProviderManagementException(\"Error while configuring metadata\", e);\n }\n return propertyWithName;\n }",
"public Exception getException ()\r\n {\r\n return exception_;\r\n }",
"public abstract Properties getProperties();",
"public interface ExceptionAttributes {\n\n /**\n * Returns a {@link Map} of exception attributes. The Map may be used to display an error page or serialized into a\n * {@link ResponseBody}.\n *\n * @param exception The Exception reported.\n * @param httpRequest The HttpServletRequest in which the Exception occurred.\n * @param httpStatus The HttpStatus value that will be used in the {@link HttpServletResponse}.\n * @return A Map of exception attributes.\n */\n Map<String, Object> getExceptionAttributes(Exception exception, HttpServletRequest httpRequest,\n HttpStatus httpStatus);\n}",
"@Override\n\t\t\tpublic ElasticEntityProperties getElasticEntityProperties(String esPath) {\n\t\t\t\treturn null;\n\t\t\t}",
"java.util.List<java.lang.String>\n getExceptionsList();",
"public java.lang.String getExceptions(int index) {\n return exceptions_.get(index);\n }",
"@Override\n protected String handleGetExceptionKey()\n {\n\n final String type = this.getExceptionType();\n final int dotIndex = type.lastIndexOf(\".\");\n\n // the dot may not be the last character\n return StringUtilsHelper.toResourceMessageKey((dotIndex < (type.length() - 1)) ? type.substring(dotIndex + 1) : type);\n\n }",
"public String getProperty(String propertyName) throws CoreException;",
"public PropertyNotDefinedException() {\n super();\n }",
"Map<String, Object> properties();",
"String getOnExceptionEnd();",
"public java.lang.String getExceptions(int index) {\n return exceptions_.get(index);\n }",
"public Exception getException() {\r\n return exception;\r\n }",
"private Map<String, String> getPersistenceProperties() throws Exception {\n final Map<String, String> result = new HashMap<String, String>();\n\n // mihai : I have this code from the hibernate classes, I\n // know it is not so nice but if it works for hibernate\n // it must also work for me.\n // I don't have any other 'decent' way to obtains the\n // information persistence layer informations.\n final Ejb3Configuration cfg = new Ejb3Configuration();\n final Enumeration<URL> persistenceXML =\n Thread.currentThread().getContextClassLoader()\n .getResources(\"META-INF/persistence.xml\");\n\n for (; persistenceXML.hasMoreElements();) {\n final URL nextURL = persistenceXML.nextElement();\n final HashMap overwrite = new HashMap();\n final List<PersistenceMetadata> metadataFiles =\n PersistenceXmlLoader.deploy(nextURL, overwrite, cfg\n .getHibernateConfiguration().getEntityResolver(),\n PersistenceUnitTransactionType.RESOURCE_LOCAL);\n for (final PersistenceMetadata metadata : metadataFiles) {\n for (final Object key : metadata.getProps().keySet()) {\n final String keyStr = key.toString();\n final String valueStr =\n metadata.getProps().get(key).toString();\n result.put(keyStr, valueStr);\n }\n }\n }\n\n return result;\n }",
"public String getExceptionType() {\n return this.excType;\n }",
"public Exception getException() {\n return exception;\n }",
"static void getProps() throws Exception {\r\n\t\tFileReader fileReader = new FileReader(\"C:\\\\repos\\\\test\\\\src\\\\main\\\\java\\\\test\\\\config.properties\");\r\n\t\tProperties properties = new Properties();\r\n\r\n\t\tproperties.load(fileReader);\r\n\r\n\t\tSystem.out.println(\"By using File Reader: \" + properties.getProperty(\"username\"));\r\n\r\n\t}",
"Map<String, String> properties();",
"Map<String, String> properties();",
"public Dictionary<String, Object> getProperties();",
"public org.apache.calcite.avatica.proto.Responses.DatabasePropertyElement getProps(int index) {\n if (propsBuilder_ == null) {\n return props_.get(index);\n } else {\n return propsBuilder_.getMessage(index);\n }\n }",
"CommonProperties getProperties();",
"public ObjectType getExceptionType() {\n return catchType;\n }",
"@Basic(\n invars = {\n @Expression(\"elementExceptions != null\"),\n @Expression(\"! elementExceptions.containsKey(EMPTY)\"),\n @Expression(\"! elementExceptions.containsValue(null)\"),\n @Expression(\"for (Set s : elementExceptions.values) {! s.isEmpty()}\"),\n @Expression(\"for (Set s : elementExceptions.values) {! s.contains(null)}\"),\n @Expression(\"for (Map.Entry e : elementExceptions.entrySet) {for (PropertyException pe : e.value) {pe.propertyName == e.key}}\"),\n @Expression(\"for (Set e : elementExceptions.values) {for (PropertyException pe : s) {pe.origin == origin}}\"),\n @Expression(\"for (Set e : elementExceptions.values) {for (PropertyException pe : s) {pe.originType == originType}}\"),\n @Expression(\"for (Set e : elementExceptions.values) {for (PropertyException pe : s) {! pe instanceof CompoundPropertyException}}\"),\n @Expression(\"propertyName != null ? elementExceptions.size <= 1\"),\n @Expression(\"propertyName != null ? for (String s) {s != propertyName ? ! elementExceptions.containsKey(s)}\")\n },\n init = @Expression(\"elementExceptions.empty\")\n )\n public final Map<String, Set<PropertyException>> getElementExceptions() {\n if ($closed) {\n return $elementExceptions; // is made unmodifiable by now\n }\n else {\n return deepImmutableElementExceptionsCopy();\n }\n }",
"public Exception getException()\n\t{\n\t\treturn exception;\n\t}",
"public Exception getException()\n {\n return m_exception;\n }",
"@Test(timeout = 4000)\n public void test028() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.getMetaData(\"\", false, false, false, false, \"2-G>C7P1{Nt,`sD'\", false, false);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No environment definition '.env.properties' found\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getConsecutiveExceptions() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(CONSECUTIVEEXCEPTIONS_PROP.get());\n }",
"@Test(expected = LackOfPropertyException.class)\n\tpublic void testLackOfPropertyException() throws Exception {\n\t\tnew MovieGraphFactory().parse(\"Vertex=<FrankDarabont,Director,<M>>\");\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getConsecutiveExceptions() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(CONSECUTIVEEXCEPTIONS_PROP.get());\n }",
"public String getExceptionMessage(Exception e)\n {\n String s = e.getMessage();\n\n return (s == null) ? \"\" : \": \" + s;\n }",
"@Test\n public void test129() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"convert\");\n Map<String, String> map0 = xmlEntityRef0.getAttributes();\n // Undeclared exception!\n try {\n Component component0 = xmlEntityRef0.dl();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"com.google.protobuf.ByteString\n getExceptionsBytes(int index);",
"public Exception getException() {\n return exception;\n }",
"public Properties getStatus(List entitylist)\n/* */ {\n/* 898 */ Properties temp = com.adventnet.appmanager.fault.FaultUtil.getStatus(entitylist, false);\n/* 899 */ for (Enumeration keys = temp.propertyNames(); keys.hasMoreElements();)\n/* */ {\n/* 901 */ String entityStr = (String)keys.nextElement();\n/* 902 */ String mmessage = temp.getProperty(entityStr);\n/* 903 */ mmessage = mmessage.replaceAll(\"\\\"\", \""\");\n/* 904 */ temp.setProperty(entityStr, mmessage);\n/* */ }\n/* 906 */ return temp;\n/* */ }",
"@SuppressWarnings(\"unchecked\")\n\tpublic Map<String, Object> getViolationDetails() {\n\t\treturn JsonUtil.toAnnotatedClassfromJson(violationDetails.getAsJsonObject().toString(), Map.class);\n\t}",
"public String getErrorDetails() {\n return super.getString(Constants.Properties.ERROR_DETAILS);\n }",
"public Note[] getProperties(Object key);",
"Property[] getProperties();",
"public String errorDetails() {\n return this.errorDetails;\n }",
"public A extract() throws E;",
"public Properties getProperties();",
"String getOnException(OnException onException);",
"public String toString ()\n {\n if (exception != null) {\n return exception.toString();\n } else {\n return super.toString();\n }\n }",
"public String[] getExceptionNames() {\n\t\treturn exceptionNames;\n\t}",
"private ScriptException getScriptException(LuaException e) {\n\t\tMatcher matcher = LUA_ERROR_MESSAGE.matcher(e.getMessage());\n\t\tif (matcher.find()) {\n\t\t\tString fileName = matcher.group(1);\n\t\t\tint lineNumber = Integer.parseInt(matcher.group(2));\n\t\t\treturn new ScriptException(e.getMessage(), fileName, lineNumber);\n\t\t} else {\n\t\t\treturn new ScriptException(e);\n\t\t}\n\t}",
"public Properties getStatus(List entitylist)\n/* */ {\n/* 907 */ Properties temp = com.adventnet.appmanager.fault.FaultUtil.getStatus(entitylist, false);\n/* 908 */ for (Enumeration keys = temp.propertyNames(); keys.hasMoreElements();)\n/* */ {\n/* 910 */ String entityStr = (String)keys.nextElement();\n/* 911 */ String mmessage = temp.getProperty(entityStr);\n/* 912 */ mmessage = mmessage.replaceAll(\"\\\"\", \""\");\n/* 913 */ temp.setProperty(entityStr, mmessage);\n/* */ }\n/* 915 */ return temp;\n/* */ }",
"UsedExceptions getExceptions();",
"public ModelExceptionReason getExceptionReason() {\n return this.modelExceptionReason;\n }",
"public long getExceptionCount();",
"private boolean validPropertyExceptions(Method paramMethod) {\n/* 492 */ Class[] arrayOfClass = paramMethod.getExceptionTypes();\n/* */ \n/* 494 */ for (byte b = 0; b < arrayOfClass.length; b++) {\n/* 495 */ Class clazz = arrayOfClass[b];\n/* */ \n/* 497 */ if (isCheckedException(clazz) && !isRemoteException(clazz)) {\n/* 498 */ return false;\n/* */ }\n/* */ } \n/* 501 */ return true;\n/* */ }",
"NamespacedProperty getFaultStringExpression();",
"Map<String, String> getProperties();",
"Map<String, String> getProperties();",
"ArrayList<PropertyMetadata> getProperties();",
"public MissingPropertyException(String propertyName){\n\t\tthis.propertyName = propertyName;\n this.alreadyReported = false;\n\t}",
"NamespacedProperty getFaultCodeExpression();"
]
| [
"0.6064666",
"0.60480136",
"0.59538114",
"0.59538114",
"0.5881022",
"0.5858882",
"0.5794714",
"0.568877",
"0.5660292",
"0.56063735",
"0.56012255",
"0.5561639",
"0.5518697",
"0.55060285",
"0.54966336",
"0.5494117",
"0.5463737",
"0.5456956",
"0.54514086",
"0.5446831",
"0.5403734",
"0.5364223",
"0.53519547",
"0.5338132",
"0.5310764",
"0.5309333",
"0.52870965",
"0.5277537",
"0.5255873",
"0.52488405",
"0.52254057",
"0.52169144",
"0.52057296",
"0.51890725",
"0.51874435",
"0.5185873",
"0.51782644",
"0.51701266",
"0.5167596",
"0.5163517",
"0.51606655",
"0.5159867",
"0.5142392",
"0.5132606",
"0.51269627",
"0.5124062",
"0.51004",
"0.5099236",
"0.50991726",
"0.5094108",
"0.5091523",
"0.50913674",
"0.50893426",
"0.5088032",
"0.507694",
"0.5068053",
"0.506034",
"0.5056105",
"0.5039482",
"0.5029313",
"0.50235814",
"0.50235814",
"0.502123",
"0.50209016",
"0.5004819",
"0.5003988",
"0.49875438",
"0.49873444",
"0.4986867",
"0.49845377",
"0.49808544",
"0.49783927",
"0.4976471",
"0.49737513",
"0.49721304",
"0.49632156",
"0.49611723",
"0.4960928",
"0.49546742",
"0.49525273",
"0.49507424",
"0.49476948",
"0.4946193",
"0.4945739",
"0.4944603",
"0.4944147",
"0.4943733",
"0.4937477",
"0.49262205",
"0.49241722",
"0.4917481",
"0.4915469",
"0.49150175",
"0.49069914",
"0.48998466",
"0.4899508",
"0.4899508",
"0.48979726",
"0.48881802",
"0.4886813"
]
| 0.6866524 | 0 |
/ Factory method pattern to decide which object creation to be done of ENG or RUSSian. | public AbstractLetterFactory decideLanguage(String lang){
if(lang=="ENG"){
Parameters.TARGET_CHROMOSOME = new char[]{'m', 'a', 'y', 'n', 'o', 'o', 't', 'h'};
return new EnglishLetterFactory();
}
else if(lang=="RUS"){
Parameters.TARGET_CHROMOSOME = new char[]{'м','а', 'ы', 'н', 'о', 'о', 'т', 'х'};
return new RussianLetterFactory();
}
return new EnglishLetterFactory();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Generalization createGeneralization();",
"public interface Factory {\n LeiFeng createLeiFeng();\n}",
"Schueler createSchueler();",
"Oracion createOracion();",
"public interface UnitFactory {\n Gui_Unit createUnit(String name, int team);\n Gui_Unit copy(Gui_Unit guiUnit);\n\n static UnitFactory getUnitFactory(UnitClassNames name){\n UnitFactory factory = null;\n\n switch (name){\n case ARTILLERY:{\n factory = new ArtilleryFactory();\n break;\n }\n case VEHICLE:{\n factory = new VehicleFactory();\n break;\n }\n case LIGHT_INFANTRY:{\n factory = new LightInfantryFactory();\n break;\n }\n case MELEE_INFANTRY:{\n factory = new MeleeInfantryFactory();\n break;\n }\n case HEAVY_INFANTRY:{\n factory = new HeavyInfantryFactory();\n break;\n }\n }\n return factory ;\n }\n}",
"Schulleiter createSchulleiter();",
"Gradian createGradian();",
"public abstract Anuncio creaAnuncioGeneral();",
"@Override\n\tpublic AbstractOriental createOrientale() {\n\t\treturn new OrientalSN();\n\t}",
"Traditional createTraditional();",
"public interface CourseRegFactory\n{\n\n /**\n * Test the existence of an instance\n * @param name The name of the instance to test the existence of\n * @return \n */\n public boolean exists(String name) throws IOException;\n\n /**\n * Create a new instance\n * @param edma_name The name of the instance to create\n * @param schoolInfo The initial values for the singleton SchoolInfo\n * @return \n */\n public CourseRegInstance newInstance(String edma_name, SchoolInfo schoolInfo) throws IOException;\n\n /**\n * Get an instance from its name\n * @param name The name of the instance to get\n * @return \n */\n public CourseRegInstance getInstance(String name) throws IOException;\n\n /**\n * Delete an instance\n * @param name The name of the instance to delete\n * @return <tt>true</tt> if the instance was deleted\n */\n public boolean deleteInstance(String name) throws IOException;\n\n}",
"ObjectRealization createObjectRealization();",
"private IWorld worldCreator(){\n if (gameWorld == GameWorld.NORMAL) return\n new Normal();\n else return\n new Nether();\n }",
"public interface AbstractFactory {\n Bmw produceBmw();\n Benz produceBenz();\n}",
"public interface TransFactory {\n public Object translate(Object obj, String type);\n}",
"public abstract String getCreator();",
"Vaisseau createVaisseau();",
"protected abstract S createDefault();",
"public AoDai chooseFactory(){\n\t\treturn new ModernAoDai();\n\t}",
"public interface HumanFactory {\n\n Human createYellow();\n\n Human createBlack();\n}",
"public static void main(String[] args) {\n\n TurkishTourist client=new TurkishTourist();\n\n BritishGuide adaptee1=new BritishGuide();\n\n BritishTranslator adapter1=new BritishTranslator(adaptee1);\n\n client.listenTranslator(adapter1);\n\n\n System.out.println();\n\n /**\n * Factory design pattern part\n */\n Organizer britishOrg=new BritishOrganizer();\n Organizer greekOrg=new GreekOrganizer();\n\n System.out.println(((BritishOrganizer) britishOrg).getRace()+\" organizator called translator for business\");\n Translator translator1=britishOrg.callTranslator(TranslatorLevel.EXPERT);\n\n\n System.out.println(((GreekOrganizer) greekOrg).getRace()+\" organizator called translator for business\");\n translator1=greekOrg.callTranslator(TranslatorLevel.JUNIOR);\n\n\n\n\n\n\n\n }",
"Elevage createElevage();",
"ORDecomposition createORDecomposition();",
"public interface AbstractFactory {\n /**\n * Create cpu cpu.\n *\n * @return the cpu\n */\n Cpu createCpu();\n\n /**\n * Create main board main board.\n *\n * @return the main board\n */\n MainBoard createMainBoard();\n}",
"QualityRisk createQualityRisk();",
"public interface AsrtFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tAsrtFactory eINSTANCE = asrt.impl.AsrtFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Assert Method</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Assert Method</em>'.\n\t * @generated\n\t */\n\tAssertMethod createAssertMethod();\n\n\t/**\n\t * Returns a new object of class '<em>Parameter</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Parameter</em>'.\n\t * @generated\n\t */\n\tParameter createParameter();\n\n\t/**\n\t * Returns a new object of class '<em>UOp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>UOp</em>'.\n\t * @generated\n\t */\n\tUOp createUOp();\n\n\t/**\n\t * Returns a new object of class '<em>NULL</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>NULL</em>'.\n\t * @generated\n\t */\n\tNULL createNULL();\n\n\t/**\n\t * Returns a new object of class '<em>Id</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Id</em>'.\n\t * @generated\n\t */\n\tId createId();\n\n\t/**\n\t * Returns a new object of class '<em>BOp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>BOp</em>'.\n\t * @generated\n\t */\n\tBOp createBOp();\n\n\t/**\n\t * Returns a new object of class '<em>BOp Method</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>BOp Method</em>'.\n\t * @generated\n\t */\n\tBOpMethod createBOpMethod();\n\n\t/**\n\t * Returns a new object of class '<em>Fun Call</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Fun Call</em>'.\n\t * @generated\n\t */\n\tFunCall createFunCall();\n\n\t/**\n\t * Returns a new object of class '<em>Model</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Model</em>'.\n\t * @generated\n\t */\n\tModel createModel();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tAsrtPackage getAsrtPackage();\n\n}",
"public interface IFactory {\n ICustomer getCustomer(CustomerType type);\n IAccount getAccount(Enum type);\n// IEntry getEntry(EntryType type);\n DAO getDAO(Enum type);\n\n}",
"OBJECT createOBJECT();",
"public interface IrSpecificFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc --> <!--\n\t * end-user-doc -->\n\t * @generated\n\t */\n\tIrSpecificFactory eINSTANCE = net.sf.orcc.backends.ir.impl.IrSpecificFactoryImpl\n\t\t\t.init();\n\n\t/**\n\t * Returns a new object of class '<em>Inst Assign Index</em>'. <!--\n\t * begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @return a new object of class '<em>Inst Assign Index</em>'.\n\t * @generated\n\t */\n\tInstAssignIndex createInstAssignIndex();\n\n\tInstAssignIndex createInstAssignIndex(Var indexVar,\n\t\t\tList<Expression> listIndex, Type listType);\n\n\t/**\n\t * Returns a new object of class '<em>Inst Cast</em>'.\n\t * <!-- begin-user-doc\n\t * --> <!-- end-user-doc -->\n\t * @return a new object of class '<em>Inst Cast</em>'.\n\t * @generated\n\t */\n\tInstCast createInstCast();\n\n\tInstCast createInstCast(Var source, Var target);\n\n\t/**\n\t * Returns a new object of class '<em>Inst Ternary</em>'. <!--\n\t * begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @return a new object of class '<em>Inst Ternary</em>'.\n\t * @generated\n\t */\n\tInstTernary createInstTernary();\n\n\t/**\n\t * Returns a new object of class '<em>Block For</em>'.\n\t * <!-- begin-user-doc\n\t * --> <!-- end-user-doc -->\n\t * @return a new object of class '<em>Block For</em>'.\n\t * @generated\n\t */\n\tBlockFor createBlockFor();\n\n\t/**\n\t * Returns a new object of class '<em>Expr Null</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Expr Null</em>'.\n\t * @generated\n\t */\n\tExprNull createExprNull();\n\n\tInstTernary createInstTernary(Var target, Expression condition,\n\t\t\tExpression trueValue, Expression falseValue);\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tIrSpecificPackage getIrSpecificPackage();\n\n}",
"protected abstract IStoreLane make_classic();",
"UsageevolutionFactory getUsageevolutionFactory();",
"SpaceInvaderTest_test_AuDebut_JeuSpaceInvaderEstVide createSpaceInvaderTest_test_AuDebut_JeuSpaceInvaderEstVide();",
"public interface EnemyShipPartsFactory {\n ESWeapon addESGun();\n ESEngine addESEngine();\n}",
"public interface ThesaurusProvider \n{\n\n\t/**\n\t * Initialize a new \n\t * @param initializationProperties The properties needed to initialize the Thesaurus\n\t * @return The Thesaurus instance\n\t * @throws ThesaurusInitializationException \n\t */\n\tThesaurus newInstance(Properties initializationProperties) throws ThesaurusInitializationException;\n}",
"@Override\r\n\tprotected Sushi makeSushi(SushiType sushiOrder) {\n\t\tswitch(sushiOrder){\r\n\t\tcase SALMON:\r\n\t\t\treturn new SalmonSushiWithNoWasabi();\r\n\t\t\t\r\n\t\tcase ROLL:\r\n\t\t\treturn new EelRollWithAvocado();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"Case createCase();",
"public static BuiltinFactory init() {\n\t\ttry {\n\t\t\tBuiltinFactory theBuiltinFactory = (BuiltinFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://www.soluvas.com/schema/story.builtin/1.0\"); \n\t\t\tif (theBuiltinFactory != null) {\n\t\t\t\treturn theBuiltinFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new BuiltinFactoryImpl();\n\t}",
"Vaisseau_Vaisseau createVaisseau_Vaisseau();",
"Vaisseau_Vaisseau createVaisseau_Vaisseau();",
"Vaisseau_Vaisseau createVaisseau_Vaisseau();",
"Vaisseau_Vaisseau createVaisseau_Vaisseau();",
"Culture createCulture();",
"Secuencia createSecuencia();",
"@Override\n\tpublic boolean create(Langues obj) {\n\t\treturn false;\n\t}",
"Klassenstufe createKlassenstufe();",
"public void lancerJeu () {\n switch (choixModeJeu) {\n case \"C\":\n Jeu jeuJoueC = new JeuChallenger(modeDev, choixJeu, nbdeCouleur, nbessaiPossible, longueurduSecret);\n jeuJoueC.unJeu();\n break;\n case \"U\":\n Jeu jeuJoueU = new JeuDuel(modeDev, choixJeu, nbdeCouleur, nbessaiPossible, longueurduSecret);\n jeuJoueU.unJeu();\n break;\n case \"D\":\n Jeu jeuJoueD = new JeuDefenseur(modeDev, choixJeu, nbdeCouleur, nbessaiPossible, longueurduSecret);\n jeuJoueD.unJeu();\n break;\n default:\n LOG.error(\"Cas du choix du mode de jeu non géré\");\n break;\n }\n }",
"@Override\n\tpublic void createGerant(Gerant g) {\n\t\t\n\t}",
"public abstract void create();",
"public abstract Anuncio creaAnuncioIndividualizado();",
"public interface ITVFactory {\n ITV createTV();\n}",
"EisModel createEisModel();",
"If createIf();",
"public interface Factory {\n Cup productCup();\n Cover productCover();\n}",
"public interface ICarFactory {\n\t\n\tpublic ICar produce(String carType);\n\t\n\t \n\t\n}",
"public interface SealFactory extends EFactory\n{\n /**\n * The singleton instance of the factory.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n SealFactory eINSTANCE = unifi.marcotinacci.thesis.seal.seal.impl.SealFactoryImpl.init();\n\n /**\n * Returns a new object of class '<em>Program</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Program</em>'.\n * @generated\n */\n Program createProgram();\n\n /**\n * Returns a new object of class '<em>Range</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Range</em>'.\n * @generated\n */\n Range createRange();\n\n /**\n * Returns a new object of class '<em>Action</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Action</em>'.\n * @generated\n */\n Action createAction();\n\n /**\n * Returns a new object of class '<em>Module Define</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Module Define</em>'.\n * @generated\n */\n ModuleDefine createModuleDefine();\n\n /**\n * Returns a new object of class '<em>Variable Declaration</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Variable Declaration</em>'.\n * @generated\n */\n VariableDeclaration createVariableDeclaration();\n\n /**\n * Returns a new object of class '<em>Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Type</em>'.\n * @generated\n */\n Type createType();\n\n /**\n * Returns a new object of class '<em>Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Rule</em>'.\n * @generated\n */\n Rule createRule();\n\n /**\n * Returns a new object of class '<em>ND Case</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>ND Case</em>'.\n * @generated\n */\n NDCase createNDCase();\n\n /**\n * Returns a new object of class '<em>Case</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Case</em>'.\n * @generated\n */\n Case createCase();\n\n /**\n * Returns a new object of class '<em>Update</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Update</em>'.\n * @generated\n */\n Update createUpdate();\n\n /**\n * Returns a new object of class '<em>Environment</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Environment</em>'.\n * @generated\n */\n Environment createEnvironment();\n\n /**\n * Returns a new object of class '<em>Expression</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Expression</em>'.\n * @generated\n */\n Expression createExpression();\n\n /**\n * Returns a new object of class '<em>No Action</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>No Action</em>'.\n * @generated\n */\n NoAction createNoAction();\n\n /**\n * Returns a new object of class '<em>Assign</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Assign</em>'.\n * @generated\n */\n Assign createAssign();\n\n /**\n * Returns a new object of class '<em>And</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>And</em>'.\n * @generated\n */\n And createAnd();\n\n /**\n * Returns a new object of class '<em>Or</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Or</em>'.\n * @generated\n */\n Or createOr();\n\n /**\n * Returns a new object of class '<em>Leq</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Leq</em>'.\n * @generated\n */\n Leq createLeq();\n\n /**\n * Returns a new object of class '<em>Less</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Less</em>'.\n * @generated\n */\n Less createLess();\n\n /**\n * Returns a new object of class '<em>Eq</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Eq</em>'.\n * @generated\n */\n Eq createEq();\n\n /**\n * Returns a new object of class '<em>Neq</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Neq</em>'.\n * @generated\n */\n Neq createNeq();\n\n /**\n * Returns a new object of class '<em>Geq</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Geq</em>'.\n * @generated\n */\n Geq createGeq();\n\n /**\n * Returns a new object of class '<em>Gtr</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Gtr</em>'.\n * @generated\n */\n Gtr createGtr();\n\n /**\n * Returns a new object of class '<em>Plus</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Plus</em>'.\n * @generated\n */\n Plus createPlus();\n\n /**\n * Returns a new object of class '<em>Minus</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Minus</em>'.\n * @generated\n */\n Minus createMinus();\n\n /**\n * Returns a new object of class '<em>Multi</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Multi</em>'.\n * @generated\n */\n Multi createMulti();\n\n /**\n * Returns a new object of class '<em>Div</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Div</em>'.\n * @generated\n */\n Div createDiv();\n\n /**\n * Returns a new object of class '<em>Not</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Not</em>'.\n * @generated\n */\n Not createNot();\n\n /**\n * Returns a new object of class '<em>Literal</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Literal</em>'.\n * @generated\n */\n Literal createLiteral();\n\n /**\n * Returns a new object of class '<em>Quantifier</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Quantifier</em>'.\n * @generated\n */\n Quantifier createQuantifier();\n\n /**\n * Returns a new object of class '<em>External Reference</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>External Reference</em>'.\n * @generated\n */\n ExternalReference createExternalReference();\n\n /**\n * Returns a new object of class '<em>Local Reference</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Local Reference</em>'.\n * @generated\n */\n LocalReference createLocalReference();\n\n /**\n * Returns the package supported by this factory.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the package supported by this factory.\n * @generated\n */\n SealPackage getSealPackage();\n\n}",
"public interface IOrderFactory{\n\t\n\t/**\n\t * Creates a collection of taxes for US and EU customers\n\t * \n\t * @return the sales tax\n\t */\n\tpublic ISalesTax getTaxObject();\n\t\n\t/**\n\t * Creates the shipping cost for US and EU customers\n\t * \n\t * @return shipping cost\n\t */\n\tpublic IShippingRate getRateObject();\n}",
"For createFor();",
"public abstract String construct();",
"public abstract void creationGrille();",
"Vaisseau_longueur createVaisseau_longueur();",
"SpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche createSpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche();",
"public interface ImageTranscoderFactory {\n /* renamed from: a */\n ImageTranscoder mo28916a(ImageFormat cVar, boolean z);\n}",
"@Test\n public void testCreateFactory() {\n setFactory(\"ThaiMoneyFactory\");\n assertEquals(ThaiMoneyFactory.class, moneyFactory.getClass());\n assertNotEquals(MalayMoneyFactory.class, moneyFactory.getClass());\n assertEquals(currency, \"Baht\");\n setFactory(\"MalayMoneyFactory\");\n assertEquals(MalayMoneyFactory.class, moneyFactory.getClass());\n assertNotEquals(ThaiMoneyFactory.class, moneyFactory.getClass());\n assertEquals(currency, \"Ringgit\");\n }",
"public static PageGeneratorLanguareFactory init()\n {\n try\n {\n PageGeneratorLanguareFactory thePageGeneratorLanguareFactory = (PageGeneratorLanguareFactory)EPackage.Registry.INSTANCE.getEFactory(PageGeneratorLanguarePackage.eNS_URI);\n if (thePageGeneratorLanguareFactory != null)\n {\n return thePageGeneratorLanguareFactory;\n }\n }\n catch (Exception exception)\n {\n EcorePlugin.INSTANCE.log(exception);\n }\n return new PageGeneratorLanguareFactoryImpl();\n }",
"SpacesInvaders_estDansEspaceJeu createSpacesInvaders_estDansEspaceJeu();",
"protected abstract void construct();",
"public static GeoCoderInterface createGeoCoder(){\n\t\tif (Config.default_geo_api.equals(OSM)){\n\t\t\t//TODO: implement\n\t\t\tDebugger.println(\"GeoFactory - unknown GeoCoderInterface: \" + Config.default_geo_api, 1);\n\t\t\treturn null;\n\t\t}else if (Config.default_geo_api.equals(GOOGLE)){\n\t\t\treturn new GeoCoderGoogle();\n\t\t}else if (Config.default_geo_api.equals(GRAPHHOPPER)){\n\t\t\treturn new GeoCoderGraphhopper();\n\t\t}else{\n\t\t\tDebugger.println(\"GeoFactory - unknown GeoCoderInterface: \" + Config.default_geo_api, 1);\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n\tpublic AbstractReine createReine() {\n\t\treturn new ReineSN();\n\t}",
"public interface IFactory {\n IUser createUser();\n IDepartment createDepartment();\n}",
"public static void init()\n\t{\n\t\t\n\t\tu.creerGalaxie(\"VoieLactee\", \"spirale\", 0);\n\t\tu.creerEtoile(\"Soleil\", 0, 'F', u.getGalaxie(\"VoieLactee\")); //1\n\t\tu.creerObjetFroid(\"Terre\", 150000 , 13000 , 365 , u.getObjet(1)); //2\n\n\t\tu.creerObjetFroid(\"Lune\", 200 , 5000 , 30 , u.getObjet(2)); //3\n\n\t\tu.creerObjetFroid(\"Mars\", 200000 , 11000 , 750 , u.getObjet(1)); //4\n\n\t\tu.creerObjetFroid(\"Phobos\", 150 , 500 , 40 , u.getObjet(4)); //5\n\n\t\tu.creerObjetFroid(\"Pluton\", 1200000 , 4000 , 900 , u.getObjet(1)); //6\n\n\t\tu.creerEtoile(\"Sirius\", 2, 'B', u.getGalaxie(\"VoieLactee\")); //7\n\n\t\tu.creerObjetFroid(\"BIG-1\", 1000 , 50000 , 333 , u.getObjet(7)); //8\n\n\t\tu.creerGalaxie(\"M31\", \"lenticulaire\", 900000);\n\t\tu.creerEtoile(\"XS67\", 8, 'F', u.getGalaxie(\"M31\")); //9\n\t\tu.creerObjetFroid(\"XP88\", 160000 , 40000 , 400 , u.getObjet(9)); //10\n\t}",
"interface Create {}",
"public abstract Product productFactory(String type);",
"public interface EncoreFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tEncoreFactory eINSTANCE = Encore.impl.EncoreFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Concierto</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Concierto</em>'.\n\t * @generated\n\t */\n\tConcierto createConcierto();\n\n\t/**\n\t * Returns a new object of class '<em>Cancion</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Cancion</em>'.\n\t * @generated\n\t */\n\tCancion createCancion();\n\n\t/**\n\t * Returns a new object of class '<em>Secuencia</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Secuencia</em>'.\n\t * @generated\n\t */\n\tSecuencia createSecuencia();\n\n\t/**\n\t * Returns a new object of class '<em>Foco</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Foco</em>'.\n\t * @generated\n\t */\n\tFoco createFoco();\n\n\t/**\n\t * Returns a new object of class '<em>Strobo</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Strobo</em>'.\n\t * @generated\n\t */\n\tStrobo createStrobo();\n\n\t/**\n\t * Returns a new object of class '<em>Union Cancion Secuencia</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Union Cancion Secuencia</em>'.\n\t * @generated\n\t */\n\tUnionCancionSecuencia createUnionCancionSecuencia();\n\n\t/**\n\t * Returns a new object of class '<em>Union Secuencia Luz</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Union Secuencia Luz</em>'.\n\t * @generated\n\t */\n\tUnionSecuenciaLuz createUnionSecuenciaLuz();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tEncorePackage getEncorePackage();\n\n}",
"HarvestType createHarvestType();",
"@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}",
"public REA_EMLFactoryImpl() {\n\t\tsuper();\n\t}",
"SpaceInvaderTest_initialisation createSpaceInvaderTest_initialisation();",
"@DISPID(1001) //= 0x3e9. The runtime will prefer the VTID if present\r\n @VTID(8)\r\n int creator();",
"@DISPID(1001) //= 0x3e9. The runtime will prefer the VTID if present\r\n @VTID(8)\r\n int creator();",
"public IDetectionAlgorithm createInstance();",
"Schule createSchule();",
"public interface RoomFactory\n{\n public Room createRoom(int floorNumber, Booking booking, RoomType roomType);\n}",
"Reproducible newInstance();",
"public void testGeneralizationImpl() {\n instance = new GeneralizationImpl();\n assertNotNull(\"create failed.\", instance);\n assertNull(\"null expected.\", instance.getDiscriminator());\n assertNull(\"null expected.\", instance.getChild());\n assertNull(\"null expected.\", instance.getParent());\n assertNull(\"null expected.\", instance.getPowertype());\n }",
"Lehrkraft createLehrkraft();",
"RentalObject createRentalObject();",
"public RegistryCreator() {\n this.vehicleRegistry = new VehicleRegistry();\n this.inspectionResultRegistry = new InspectionResultRegistry();\n }",
"I createI();",
"public abstract Koordinate schuss();",
"public static Order createOrder() {\n OrderFactory orderFactory;\n Cuisine cuisine = ORDERING_FACADE.askForCuisine(); // choosing cuisine\n Meal mealType = ORDERING_FACADE.askForMealType(); // choosing meal type\n if (mealType.equals(Meal.LUNCH)) { // setting factory for meal choosen\n orderFactory = LUNCH_FACTORY;\n \n } else {\n orderFactory = DRINK_FACTORY;\n \n }\n return orderFactory.createOrder(cuisine); // creating and returning concrete meal order\n }",
"public interface Factory {\r\n}",
"Hurt createHurt();",
"public abstract T create(T obj);",
"protected abstract T createResource(Coordinate coord) throws VizException;",
"SpacesInvaders_aUnVaisseau createSpacesInvaders_aUnVaisseau();",
"public abstract StandaloneAlgorithm createAlgorithm();",
"public interface XxxFactory<T> {\n T createAaXxxProduct();\n T createBbXxxProduct();\n}",
"public interface TechnologyModuleGUIFactory {\n\n\t/**\n\t * Create a new Browser element for the specified TechnologyModelObject. <br>\n\t * Can return null if no specific element exists.\n\t * \n\t * @param object\n\t * @param browser\n\t * @param parent\n\t * @return the created Browser Element, or null.\n\t */\n\tpublic <T extends TechnologyModelObject> TechnologyModuleBrowserElement<T> createBrowserElement(T object, ProjectBrowser browser,\n\t\t\tBrowserElement parent);\n\n\t/**\n\t * Create a new model view for the specified TechnologyModelObject. <br>\n\t * Can return null if no specific view exists.\n\t * \n\t * @param object\n\t * @param controller\n\t * @param codeGenerationPerspective\n\t * @return the created view or null.\n\t */\n\tpublic <T extends TechnologyModelObject> ModuleView<T> createModelView(T object, SGController controller,\n\t\t\tCodeGenerationPerspective codeGenerationPerspective);\n\n\t/**\n\t * Called at SG Module actions initialization. Used to record all Technology Module specific actions.\n\t * \n\t * @param actionInitializer\n\t */\n\tpublic void initializeActions(SGControllerActionInitializer actionInitializer);\n}",
"public interface NassishneidermanFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tNassishneidermanFactory eINSTANCE = nassishneiderman.impl.NassishneidermanFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Algorithm</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Algorithm</em>'.\n\t * @generated\n\t */\n\tAlgorithm createAlgorithm();\n\n\t/**\n\t * Returns a new object of class '<em>Sequence</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Sequence</em>'.\n\t * @generated\n\t */\n\tSequence createSequence();\n\n\t/**\n\t * Returns a new object of class '<em>Action Block</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Action Block</em>'.\n\t * @generated\n\t */\n\tActionBlock createActionBlock();\n\n\t/**\n\t * Returns a new object of class '<em>Branching Block</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Branching Block</em>'.\n\t * @generated\n\t */\n\tBranchingBlock createBranchingBlock();\n\n\t/**\n\t * Returns a new object of class '<em>Multiple Branching Block</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Multiple Branching Block</em>'.\n\t * @generated\n\t */\n\tMultipleBranchingBlock createMultipleBranchingBlock();\n\n\t/**\n\t * Returns a new object of class '<em>Test Block</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Test Block</em>'.\n\t * @generated\n\t */\n\tTestBlock createTestBlock();\n\n\t/**\n\t * Returns a new object of class '<em>Test First Block</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Test First Block</em>'.\n\t * @generated\n\t */\n\tTestFirstBlock createTestFirstBlock();\n\n\t/**\n\t * Returns a new object of class '<em>Test Last Block</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Test Last Block</em>'.\n\t * @generated\n\t */\n\tTestLastBlock createTestLastBlock();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tNassishneidermanPackage getNassishneidermanPackage();\n\n}",
"EClass createEClass();"
]
| [
"0.7127313",
"0.63491035",
"0.6263281",
"0.6084058",
"0.59764254",
"0.5945587",
"0.5923676",
"0.58997184",
"0.58595455",
"0.58107346",
"0.5810553",
"0.5755647",
"0.575132",
"0.57312596",
"0.5724302",
"0.57207763",
"0.56887937",
"0.5652002",
"0.56073546",
"0.5605065",
"0.55981964",
"0.55856395",
"0.55399525",
"0.5516206",
"0.5504259",
"0.54941326",
"0.5489415",
"0.5483605",
"0.5470874",
"0.54567665",
"0.543671",
"0.5435596",
"0.54348755",
"0.54305774",
"0.5418214",
"0.5417105",
"0.5416678",
"0.5414844",
"0.5414844",
"0.5414844",
"0.5414844",
"0.5413552",
"0.541126",
"0.53986454",
"0.5398499",
"0.53951955",
"0.5382855",
"0.53803533",
"0.5373902",
"0.5366373",
"0.53588355",
"0.53539705",
"0.5347155",
"0.53466755",
"0.53417456",
"0.5341408",
"0.5318013",
"0.52915794",
"0.52912",
"0.5285428",
"0.5269224",
"0.52661407",
"0.5264948",
"0.5264522",
"0.5257493",
"0.52567667",
"0.5251911",
"0.52405167",
"0.5234183",
"0.5230501",
"0.52302635",
"0.5215431",
"0.5214968",
"0.521458",
"0.5207798",
"0.5190902",
"0.51886433",
"0.5185326",
"0.5185326",
"0.518344",
"0.51806045",
"0.5176108",
"0.517132",
"0.5168631",
"0.5168289",
"0.51638114",
"0.51541173",
"0.51523596",
"0.51485705",
"0.51430976",
"0.5141149",
"0.51410896",
"0.51387525",
"0.51386917",
"0.51374936",
"0.5137333",
"0.51298714",
"0.51289076",
"0.5128863",
"0.5124891"
]
| 0.5460782 | 29 |
/ here we must override the constructor for ArrayAdapter the only variable we care about now is ArrayList objects, because it is the list of objects we want to display. | public ItemAdapter(Context context, int textViewResourceId, ArrayList<item> objects) {
super(context, textViewResourceId, objects);
this.objects = objects;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public IngredientsAdapter(Context context, ArrayList ingredientsArray) {\n super(context, R.layout.ingredients_list, ingredientsArray);\n this.context = context;\n this.ingredientsArray = ingredientsArray;\n }",
"public CustomAdapter(List<Quiz> quizList) {// Now lets add stuff to the quiz.\n this.quizList = quizList;\n }",
"public AlarmArrayAdapter(Context context, int resource, ArrayList<Alarm> objects) {\n super(context, resource, objects);\n\n this.context = context;\n this.alarmProperties = objects;\n }",
"public MyAdapter(Context context, int resource, String []objects) //string ki parenthoti hai object\n {\n super(context, resource, objects);\n }",
"public customAdapter() {\n super(SeekerRatingsListActivity.this, R.layout.rating_content, seekerRatingsList);\n }",
"public RowListaCustomAdapter ( Context c, ArrayList<Row>data){\n Log.v(TAG, \"Construir Adaptador\");\n this.data = data;\n inflater = LayoutInflater.from(c);\n\n }",
"public RowAdapter(Activity a, ArrayList pc_no_array, ArrayList lab_no_array,ArrayList status_array,ArrayList date_array,ArrayList desc_array) {\n activity = a;\n this.pc_no_array = pc_no_array;\n this.lab_no_array = lab_no_array;\n RowAdapter.status_array = status_array;\n this.date_array = date_array;\n this.desc_array = desc_array;\n inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n }",
"public MyAdapter(ArrayList<String> myDataset) {\n mDataset = myDataset;\n }",
"public Item_Check_List_Adapter(Activity activity, ArrayList<Item> data)\n {\n this.activity=activity;\n this.data=new ArrayList<Item>(data);\n //arrayItem = new String[data.size()];\n }",
"public MyAdapter(ArrayList<MyData> myDataset) {\n\n mDataset = myDataset;\n }",
"public MyAdapter(Context context, ArrayList Etab) {\n this.context = context;\n this.Hospitals = Etab;\n\n }",
"@Override\n public String toString() {\n //return the text required for ArrayAdapter after checking the format. \n \t//return ArrayAdapter readable string;\n \treturn null;\n }",
"private void showArrayAdaptView() {\n\t\tPersonAdapt personAdapt = new PersonAdapt(this, persons, R.layout.listview_item);\n\t\tlistView.setAdapter(personAdapt);\n\t}",
"public FoundDeviceArrayAdapter(Context context, int textViewResourceId, List<FoundDevice> objects)\n {\n super(context, textViewResourceId, objects);\n this.foundDevices = objects;\n }",
"public MyAdapter(ArrayList<GpsData> myDataset) {\r\n dataset = myDataset;\r\n }",
"public CustomLocationListAdapter(Context context, Object[] objects)\n {\n super(context, R.layout.custom_location_list, objects);\n\n }",
"public ExampleDetailsAdapter(Context context, ArrayList<ExampleDetailObjects> objects) {\n super(context, R.layout.detail_itemtype_item, objects);\n this.context = context;\n this.objects = objects;\n }",
"public SongAdapter(Context context, ArrayList<Song> songs) {\n super(context, 0, songs);\n }",
"public SemAdapter(Context context, int textViewResourceId,\r\n\t\t\tArrayList<Mats> objects) {\r\n\t\tsuper(context, textViewResourceId, objects);\r\n\t\tthis.objects = objects;\r\n\t}",
"public AlbaniaAdapter(Context context, ArrayList<Albania> AlbaniaDatabase) {\n this.layoutInflater = LayoutInflater.from(context);\n this.AlbaniaDatabase = AlbaniaDatabase;\n\n\n }",
"public GalleryAdapter(ArrayList<String> myDataset) {\n mDataset = myDataset;\n }",
"public DataAdapter(Context context, int textViewResourceId,String[] objects) {\n\t\tsuper(context, textViewResourceId, objects);\n\t\tthis.Inflater = LayoutInflater.from(context);\n\t\tthis.folders = objects; \n\t}",
"public listAdapter(List<Genres> myDataset,List<Anime> anime) {\n values = myDataset;\n animevalues = anime;\n }",
"public RecyclerViewAdapter(List<String> arrayList)\n {\n this.arraylist = arrayList;\n\n }",
"public ExamslistArrayAdapter(Context context, int textViewResourceId,\r\n\t\tArrayList<ExamDetails> items) {\r\n\t super(context, textViewResourceId, items);\r\n\t this.items = items;\r\n\t}",
"public MyAdapter(ArrayList<pets> myDataset) {\n this.mDataset = myDataset;\n }",
"public ComicSearch_Adapter(Context aContext, ArrayList<Comic> listData) {\n this.listData = listData;\n layoutInflater = LayoutInflater.from(aContext);\n copie = new ArrayList<Comic>();\n copie.addAll(listData);\n this.context=aContext;\n }",
"private void setArrayAdapter(ArrayList arrayList) {\n arrayAdapter = new ArrayAdapter<String>(\n this, android.R.layout.simple_list_item_1, arrayList);\n listView.setAdapter(arrayAdapter);\n }",
"public InstagramPhotosAdapter(Context context, List<InstagramPhoto> objects) {\n super(context, android.R.layout.simple_list_item_1, objects);\n }",
"public MyAdapter(List<Track> myDataset, Activity activity) {\n values = myDataset;\n this.activity = activity;\n }",
"public MyAdapter(ArrayList<MyClassesActivity.MyPair> myDataset) {\n courselist = myDataset;\n }",
"public MyAdapter(@NonNull Context context, @LayoutRes int resource, @NonNull List<Model> objects) {\n super(context,resource,objects);\n this.context=context;\n this.resource=resource;\n modelList=objects;\n inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n }",
"public MyAdapter(ArrayList<Pair<String, String>> myDataset) {\n mDataset = myDataset;\n }",
"public DetailItemAdapter(ArrayList<DetailItem> tags) {\n mTags = tags;\n }",
"public TownAdapter(Activity context, ArrayList<Town> towns) {\n // Here, we initialize the ArrayAdapter's internal storage for the context and the list.\n // the second argument is used when the ArrayAdapter is populating a single TextView.\n // Because this is a custom adapter for four TextViews the adapter is not\n // going to use this second argument, so it can be any value. Here, we used 0.\n super(context, 0, towns);\n }",
"public CardAdapter(ArrayList<CardContent>data) {\n this.data = data;\n }",
"public AvailableBookAdapter(Context context, int resource, List objects) {\n super(context, resource, objects);\n resource_id = resource;\n }",
"public FishListAdapter (Context context) {\n\n super(context, R.layout.faqlist);//calls the superclass constructor\n list = new ArrayList<Fish>();//initalize the list as Fish\n Log.d(\"Adapter\", \"constructor\");\n }",
"public ItemsAdapter() {\n\n\n }",
"public AlbumAdapter(@NonNull Context context, ArrayList<Album> albums) {\n super(context, 0, albums);\n }",
"public void initView() {\n ArrayAdapter<String> arrayAdapter=new ArrayAdapter<String>(getView().getContext(),android.R.layout.simple_list_item_1,tracks);\n list.setAdapter(arrayAdapter);\n }",
"public Adapter(Context context, ArrayList<String> values) {\n\t\t\t\n\t\t\tsuper(context, R.layout.list_layout_no_image, values);\t\t\n\t\t\tthis.values = values;\n\t\t\tthis.context = context;\n//\t\t\tthis.values = values;\n\t\t}",
"private void setupCustomAdapter() {\n AnimalAdapter adapter = new AnimalAdapter(this, animals);\n aListView.setAdapter(adapter);\n }",
"private ArrayAdapter<String> getAdapter(ArrayList<String> arr) {\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(\n this, R.layout.support_simple_spinner_dropdown_item, arr);\n adapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n\n return adapter;\n }",
"public MyRecycledViewAdapter(ArrayList<Palette> datos) {\n this.datos = datos;\n }",
"public ListViewAdapter(List<SongModel> songs) {\n this.list = songs;\n }",
"MyAdapter(List<FakeNews> myList) {\n list = myList;\n }",
"public LivroAdapter(Context ctx, MyBooksDataBase myBooksDb){\n super(ctx,0,new ArrayList<Livro>());\n\n //banco\n this.myBooksDb = myBooksDb;\n }",
"public CountryAdapter(Context context, ArrayList<Country> countryList){\n countryArrayList = countryList;\n }",
"@Override\n\tpublic int getCount() {\n\t\treturn ArrayList.size();\n\t}",
"public void createViews(){\n ArrayList<Words> wordsArrayList = new ArrayList<Words>();\n\n //Fill array with english word and hindi translation by creating new word objects\n for(int i = 0; i < defaultWords.size() && i < hindiTranslation.size(); i++){\n wordsArrayList.add(new Words(defaultWords.get(i), hindiTranslation.get(i)));\n }\n\n //ArrayAdapter and ListView used so that not a lot of memory is used to create all textviews when not needed\n //Update** Using WordAdapter which extends ArrayAdapter and only has 2 parameters\n\n WordAdapter adapter = new WordAdapter(this, wordsArrayList);\n\n ListView listView = (ListView) findViewById(R.id.translation_root_view);\n\n listView.setAdapter(adapter);\n\n\n }",
"public ChatArrayAdapter(Context context, int textViewResourceId) {\n super(context, textViewResourceId);\n this.context = context;\n }",
"@Override\n\tpublic int getCount()\n\t{\n\t\treturn arrayList.size();\n\t}",
"public PostAdapter(Context context, int textViewResourceId, List<CloudEntity> objects) {\n super(context, textViewResourceId, objects);\n mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n }",
"public PostAdapter(Context context, int textViewResourceId, List<CloudEntity> objects) {\n super(context, textViewResourceId, objects);\n mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n }",
"public void listadaptor3(){\n final String[] sem = getResources().getStringArray(R.array.Sem3);\n\n //Creating an instance of ArrayAdaptor\n ArrayAdapter<String> adapter = new ArrayAdapter<>(\n this, android.R.layout.simple_list_item_1, sem);\n\n //Assigning the adapter to the listview\n lst_course.setAdapter(adapter);\n }",
"public FavoriteAdapter(ArrayList<String> myDataset) { // 초기 데이터형태\n //mContext = myContext;\n mDataset = myDataset;\n }",
"@Override\n\tprotected RecycleBaseAdapter getListAdapter() {\n\t\treturn new VipStudentAdapter();\n\t}",
"public news_adapter(Context context,ArrayList<data> dataset) {\n mData=dataset;\n mInflater = LayoutInflater.from(context);\n }",
"@Override\n public void onResponse(ArrayList<WeatherForeCastModel> weatherForeCastModel) {\n ArrayAdapter arrayAdapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, weatherForeCastModel);\n lv.setAdapter(arrayAdapter);\n }",
"@Override\n public void onResponse(ArrayList<WeatherForeCastModel> weatherForeCastModel) {\n ArrayAdapter arrayAdapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, weatherForeCastModel);\n lv.setAdapter(arrayAdapter);\n }",
"public void listadaptor2(){\n final String[] sem = getResources().getStringArray(R.array.Sem2);\n\n //Creating an instance of ArrayAdaptor\n ArrayAdapter<String> adapter = new ArrayAdapter<>(\n this, android.R.layout.simple_list_item_1, sem);\n\n //Assigning the adapter to the listview\n lst_course.setAdapter(adapter);\n }",
"public EventAdapter(ArrayList<Event> myDataset) {\n\t\tmDataset = myDataset;\n\t}",
"public EarthquakeAdapter(Activity context, ArrayList<Earthquake> earthquakes) {\n super(context, 0, earthquakes);\n\n }",
"a(ArrayList arrayList) {\n super(1);\n this.$result = arrayList;\n }",
"@Override\n public int getCount() {\n return arrlist.size();\n }",
"@Override\n public int getCount() {\n return arrlist.size();\n }",
"public VerseListArrayAdapter(Context context, List<Verse> verses){\n\t\tsuper(context, R.layout.verse_list_item, verses);\n\t\tthis.context = context;\n\t\tthis.verses = verses;\n\t\tthis.selectedItem = -1; //nothing is selected yet\n\t}",
"@Override\n public int getCount() {\n return arf.size();\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n return convertView;\n }",
"public void listadaptor1(){\n final String[] sem = getResources().getStringArray(R.array.Sem1);\n\n //Creating an instance of ArrayAdaptor\n ArrayAdapter<String> adapter = new ArrayAdapter<>(\n this, android.R.layout.simple_list_item_1, sem);\n\n //Assigning the adapter to the listview\n lst_course.setAdapter(adapter);\n }",
"public Adapter(ArrayList <HistoryModel> listOfModels) {\n this.listOfModels = listOfModels;\n }",
"public EmployeesAdapter(List<Employee> employeeList) {\n this.employeeList = employeeList;\n }",
"public RateAdapter(ArrayList<Rate> myDataset, Context context) {\n mRates = myDataset;\n mContext = context;\n }",
"public IngredientAdapter(@NonNull Context context, ArrayList<Ingredient> list){\n super(context, 0, list);\n mContext = context;\n ingredientList = list;\n }",
"@Override\n\tpublic View getView(int arg0, View arg1, ViewGroup arg2) {\n\t\tif (arg1 == null)\n\t\t\targ1 = new CardListSimpleCardView(context);\n\t\t((CardListSimpleCardView) arg1).setContent(simpleCardInfoUnitList\n\t\t\t\t.get(arg0));\n\t\treturn arg1;\n\n\t}",
"@Override\n\tpublic int getCount() {\n\t\treturn arrayList.size();\n\t}",
"@Override\n\tpublic int getCount() {\n\t\treturn arrayList.size();\n\t}",
"public PersoAdapter(List<Characters> myDataset){\n compteur = 0;\n mDataset = myDataset.toArray(new Characters[0]);\n }",
"public HorizontalCardAdapter(List<SuperCar> superCars, Context context){\n super();\n //Getting all superheroes\n this.superCars = superCars;\n this.context = context;\n }",
"RecyclerViewAdapter(ArrayList namaList, ArrayList jurusanList, ArrayList nimList){\n this.namaList = namaList;\n this.jurusanList = jurusanList;\n this.nimList = nimList;\n }",
"protected EntriesBaseAdapter(Context context, ArrayList<String> sortedFilesArrList, ArrayList<String> tag1ArrList, ArrayList<String> tag2ArrList, ArrayList<String> tag3ArrList,\n ArrayList<Boolean> favArrList, CustomAttributes userUIPreferences) {\n super(context, userUIPreferences);\n // transfers all the info from the calling activity to this adapter.\n this.sortedFilesArrList = new ArrayList<>(sortedFilesArrList);\n this.tag1ArrList = new ArrayList<>(tag1ArrList);\n this.tag2ArrList = new ArrayList<>(tag2ArrList);\n this.tag3ArrList = new ArrayList<>(tag3ArrList);\n this.favArrList = new ArrayList<>(favArrList);\n\n setupData();\n }",
"public MyRecyclerViewAdapter(Context context, ArrayList<itemView> data) {\n this.mInflater = LayoutInflater.from(context);\n this.mData = data;\n }",
"public HistoryArrayAdapter(Context context, ArrayList<String> BPMList, ArrayList<String> durationList, ArrayList<String> dateList) {\n\t\tsuper(context, R.layout.history_row, dateList);\n\t\tthis.context = context;\n\t\tthis.BPMList = BPMList;\n\t\tthis.durationList = durationList;\n\t\tthis.dateList = dateList;\n//\t\tthis.timeList = timeList;\n\t}",
"AdapterItems(int ID, String product)\n {\n this.ID=ID;\n this.product=product;\n //this. Description=Description;\n }",
"public AdapterShop(Activity context, List<shoppingcard> dades){\n super(context, R.layout.listitem_shop,dades);\n this.context = context;\n this.dades = dades;\n }",
"public DataPenemuanListAdapter(Context context) { mInflater = LayoutInflater.from(context); }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View itemView = convertView;\n LayoutInflater inflater = LayoutInflater.from(context);\n if (itemView == null) {\n itemView = inflater.inflate(R.layout.ingredients_list, parent, false);\n }\n\n if(ingredientsArray.get(0) instanceof IngredientsBase) {\n\n IngredientsBase currentIngredient = (IngredientsBase) ingredientsArray.get(position);\n\n TextView ingredientsText = (TextView) itemView.findViewById(R.id.ingredientsText);\n ingredientsText.setText(currentIngredient.getName() + \" \" + currentIngredient.getQuantity() + \" \" + currentIngredient.getMetricUnit());\n\n }\n else{\n\n IngredientsDetail currentIngredient = (IngredientsDetail) ingredientsArray.get(position);\n\n TextView ingredientsText = (TextView) itemView.findViewById(R.id.ingredientsText);\n ingredientsText.setText(currentIngredient.getName() + \" \" + currentIngredient.getId());\n }\n return itemView;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n return initView(position, convertView, parent);\n }",
"@Override\npublic void setObjectAdapter(ObjectAdapter adapter) {\n\t\n}",
"public WordAdapter(Activity context, ArrayList<Word> numbers, int resourceId)\n {\n //calls constructor of superclass with a 0 because the views\n // will be manually inflated\n super(context, 0, numbers);\n mResourceID = resourceId;\n }",
"public SurveyAdapter(List<Object> items) {\n this.items = items;\n }",
"public MyAdapter(Context context, ArrayList<String> dataset) {\n mContext = context;\n mDataset = dataset;\n setHasStableIds(true);\n }",
"public PassengerAdapter(Context context, List<PassengerDataVo> list) {\n\t\tarrayList = list;\n\t\tthis.context = context;\n\t\tinflater = LayoutInflater.from(context);\n\t}",
"public OrderAdapter() {\n super(new ArrayList<MultiItemEntity>());\n addItemType(TYPE_HEAD, R.layout.item_order_head);\n addItemType(TYPE_CONTENT, R.layout.item_order_content);\n addItemType(TYPE_FOOTER, R.layout.item_order_foot);\n }",
"protected ListAdapter makeAdapterArray(Intent data, Context activity, int layout, int[] ids){\n\n alertList = new ArrayList<>();\n //Key values for the mapping\n String[] keyNames = new String[]{AppCSTR.NAME, AppCSTR.EXTRA};\n //A row with array values in table\n String[] item = data.getStringArrayExtra(AppCSTR.DB_FIRST_ROW);\n //Take off brackets of string array from database, what is to be displayed in list view.\n String[] names = arrayParser(item[AppCSTR.FIRST_ELEMENT]);\n int count = names.length;\n String[] extras = getExtraInfo(item, count, (item.length - 1));\n\n //checkEmptyArray(names[AppCSTR.FIRST_ELEMENT]);\n for(int i = 0; i < count; i++){\n // creating new HashMap\n HashMap<String, String> map = new HashMap<>();\n map.put(AppCSTR.NAME, names[i]);\n map.put(AppCSTR.EXTRA, extras[i]);\n alertList.add(map);\n }\n /**\n * Details of how the adapter will be laid out.\n */\n return new SimpleAdapter(\n activity, alertList,\n layout, keyNames, ids);\n }",
"@Override\n\tprotected void initAdapter(){\n\t\tsuper.initAdapter();\n\t\tadapter = new BaseAdapter() {\n\n\t\t\t@Override\n\t\t\tpublic View getView(int position,View convertView,ViewGroup parent){\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tGoods goods = list.get(position);\n\t\t\t\tLayoutInflater inflater = getLayoutInflater();\n\t\t\t\tView view = inflater.inflate(R.layout.trade_listitem, null);\n\t\t\t\tTextView txt_goods_name = (TextView) view.findViewById(R.id.txt_goods_name);\n\t\t\t\tBmobFile file = new BmobFile();\n\t\t\t\tfile = goods.getPicture();\n\n\t\t\t\tif(file != null){\n\t\t\t\t\tString fileName = file.getFilename();\n\t\t\t\t\tString url = file.getFileUrl(mContext);\n\t\t\t\t\tString URL = BmobProFile.getInstance(mContext).signURL(fileName, url, AppConfig.AccessKey, 0, null);\n\t\t\t\t\tImageView imageView = (ImageView) view.findViewById(R.id.img_picture);\n\t\t\t\t\tImageListener listener = ImageLoader.getImageListener(imageView, android.R.drawable.ic_menu_rotate, android.R.drawable.ic_delete);\n\t\t\t\t\tmImageLoader.get(URL, listener);\n\n\t\t\t\t}\n\t\t\t\tString brand = \"\";\n\t\t\t\tif(goods.getBrand() != null){\n\t\t\t\t\tbrand = goods.getBrand();\n\t\t\t\t}\n\t\t\t\ttxt_goods_name.setText(brand + goods.getTradeName());\n\t\t\t\tTextView txt_goods_price = (TextView) view.findViewById(R.id.txt_goods_price);\n\t\t\t\ttxt_goods_price.setText(goods.getPrice() + \"\");\n\t\t\t\treturn view;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic long getItemId(int position){\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn position;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Object getItem(int position){\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn list.get(position);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int getCount(){\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn list.size();\n\t\t\t}\n\t\t};\n\t\tmPullRefreshListView.setAdapter(adapter);\n\n\t}",
"public MessageAdapter(ArrayList<ChatMessage> data) {\n this.data = data;\n\n }",
"public ExamsAdapter(AppCompatActivity context, List<Exam> data) {\n this.LayoutInflater = LayoutInflater.from(context);\n this.context = context;\n this.mData = data;\n }",
"@Override\r\n public int getCount() {\n return arraylist.size();//size\r\n }"
]
| [
"0.6806648",
"0.6804725",
"0.6775021",
"0.6726028",
"0.6718165",
"0.6715604",
"0.66856307",
"0.66839117",
"0.6671329",
"0.6614567",
"0.6605665",
"0.6554589",
"0.6548596",
"0.651715",
"0.6494715",
"0.64842963",
"0.64798385",
"0.647718",
"0.6468465",
"0.6448765",
"0.6420289",
"0.6416834",
"0.64004606",
"0.6400087",
"0.63530153",
"0.63508373",
"0.63141143",
"0.6310171",
"0.6292139",
"0.6290166",
"0.6283628",
"0.6271688",
"0.62514657",
"0.6248151",
"0.6242736",
"0.6227061",
"0.61574167",
"0.6155113",
"0.6142396",
"0.61408794",
"0.6128935",
"0.61207896",
"0.6084128",
"0.608412",
"0.60562295",
"0.60557574",
"0.6042859",
"0.6029092",
"0.6021495",
"0.6011043",
"0.59987456",
"0.5994806",
"0.59945846",
"0.5994462",
"0.5994462",
"0.5994008",
"0.5991038",
"0.59829885",
"0.59807116",
"0.5968981",
"0.5968981",
"0.5966681",
"0.5965334",
"0.5955159",
"0.59305155",
"0.5929078",
"0.5929078",
"0.5920869",
"0.5916364",
"0.59119266",
"0.59118503",
"0.5909535",
"0.5904035",
"0.5903381",
"0.5901911",
"0.5895941",
"0.58939815",
"0.58939815",
"0.5889643",
"0.5886612",
"0.5882224",
"0.5881242",
"0.58783627",
"0.58674484",
"0.58673334",
"0.5865137",
"0.5861791",
"0.58613724",
"0.5861252",
"0.5860547",
"0.5857053",
"0.58562446",
"0.585325",
"0.5848166",
"0.5845493",
"0.58444023",
"0.58427894",
"0.5839125",
"0.5833235",
"0.5832792"
]
| 0.6922675 | 0 |
/ we are overriding the getView method here this is what defines how each list item will look. | public View getView(int position, View convertView, ViewGroup parent){
// assign the view we are converting to a local variable
View v = convertView;
// first check to see if the view is null. if so, we have to inflate it.
// to inflate it basically means to render, or show, the view.
if (v == null) {
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = inflater.inflate(R.layout.list_item, null);
}
/*
* Recall that the variable position is sent in as an argument to this method.
* The variable simply refers to the position of the current object in the list. (The ArrayAdapter
* iterates through the list we sent it)
*
* Therefore, i refers to the current Item object.
*/
item i = objects.get(position);
if (i != null) {
// This is how you obtain a reference to the TextViews.
// These TextViews are created in the XML files we defined.
TextView tn = (TextView) v.findViewById(R.id.tnLabel);
TextView tnd = (TextView) v.findViewById(R.id.tnData);
TextView dt = (TextView) v.findViewById(R.id.dtLabel);
TextView dtd = (TextView) v.findViewById(R.id.dtData);
TextView at = (TextView) v.findViewById(R.id.atLabel);
TextView atd = (TextView) v.findViewById(R.id.atData);
// check to see if each individual textview is null.
// if not, assign some text
if (tn != null){
tn.setText("Train Number: ");
}
if (tnd != null){
tnd.setText(i.getTrainNum());
}
if (dt != null){
dt.setText("Departure Time: ");
}
if (dtd != null){
dtd.setText(i.getDepTime());
}
if (at != null){
at.setText("Arrival Time: ");
}
if (atd != null){
atd.setText(i.getArrTime());
}
}
// the view must be returned to our activity
return v;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position, convertView, parent);\n\n // Initialize a TextView for ListView each Item\n TextView tv = (TextView) view.findViewById(android.R.id.text1);\n\n // Set the text color of TextView (ListView Item)\n tv.setTextColor(Color.BLACK);\n\n // Generate ListView Item using TextView\n return view;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent){\n View view = super.getView(position, convertView, parent);\n\n // Initialize a TextView for ListView each Item\n TextView tv = (TextView) view.findViewById(android.R.id.text1);\n\n // Set the text color of TextView (ListView Item)\n tv.setTextColor(Color.WHITE);\n // Generate ListView Item using TextView\n return view;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position, convertView, parent);\n\n // Initialize a TextView for ListView each Item\n TextView tv = (TextView) view.findViewById(android.R.id.text1);\n\n // Set the text color of TextView (ListView Item)\n tv.setTextColor(Color.BLACK);\n\n // Generate ListView Item using TextView\n return view;\n }",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\treturn listlayout.get(position);\n\n\t\t}",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\treturn listlayout.get(position);\n\n\t\t}",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\treturn super.getView(position, convertView, parent);\n\t\t}",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\treturn super.getView(position, convertView, parent);\n\t\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n return convertView;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position, convertView, parent);\n\n TextView tv = view.findViewById(android.R.id.text1);\n\n // Set the text size 25 dip for ListView each item\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 25);\n tv.setTextColor(Color.parseColor(\"#FFEA0839\"));\n\n // Return the view\n return view;\n }",
"@Override\n public View getView(LayoutInflater inflater, View convertView) {\n return getViewItem(inflater, convertView);\n }",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent)\n\t{\n\t\tLinearLayout view = (LinearLayout) View.inflate(this.mContext, this.mCustomRowLayoutId, null);\n\t\tTextView text1 = (TextView) view.findViewById(R.id.text1);\n\t\tTextView text2 = (TextView) view.findViewById(R.id.text2);\n\t\t\n\t\tOrganization curr = getItem(position);\n\t\t\n\t\ttext1.setTextColor(Color.WHITE);\n\t\ttext2.setTextColor(Color.WHITE);\n\t\t\n\t\ttext1.setTextSize(20);\n\t\t\n\t\ttext1.setText(curr.getName());\n\t\ttext2.setText(curr.getDescription());\n\t\t\n\t\treturn view;\n\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n return getCustomView(position, convertView, parent);\n }",
"@Override\r\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t View layout= getLayoutInflater().inflate(R.layout.item_listview_age, null);\r\n\t\t TextView textView= (TextView) layout.findViewById(R.id.tv_listview_age);\r\n\t\t textView.setText(mAgeLists[position]);\r\n\t\t \r\n\t\t\treturn layout;\r\n\t\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n if (convertView == null) {\n convertView = ListAdapterInflater.createLayout(resourceLayout, mContext, parent);\n }\n\n setupItemView(convertView, getItem(position));\n\n return convertView;\n }",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\n\t\treturn super.getView(position, convertView, parent);\n\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n final Horse horse = (Horse) getItem(position);\n if (convertView == null) {\n LayoutInflater layoutInflater = (LayoutInflater) this.context\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n convertView = layoutInflater.inflate(R.layout.custom__list_item__horse_list, null);\n }\n TextView horseName = (TextView) convertView.findViewById(R.id.horse_name);\n TextView horseStall = (TextView) convertView.findViewById(R.id.horse_stall);\n TextView horseDescription = (TextView) convertView.findViewById(R.id.horse_description);\n\n horseName.setText(horse.getName());\n horseStall.setText(\"Stall \" + horse.getStallNumber());\n horseDescription.setText(horse.getColor() + \" \" + horse.getBreed());\n\n return convertView;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent)\n {\n //position = position of array element\n //this function will pick the first value of array\n //we give it the theme of a single row\n //it implements that theme, makes a row graphic and returns back to OS\n //OS prints it on screen\n //we make an xml file\n //supply data to this function\n //and create the custom list\n //this code runs for every element in the array\n View row=null;\n LayoutInflater li = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //OS uses this service to display graphic\n //We customise the theme and use that service to display our theme\n //only one function to get system services and modiffy it\n //we can either learn all the names of internal services\n //or you press ctrl plus space after context.\n row = li.inflate(R.layout.activity_custom_list,parent,false);\n ImageView iv = (ImageView)row.findViewById(R.id.imageView); //row - pehli line ka variable\n //xml se row bana\n\n TextView tv1 = (TextView)row.findViewById(R.id.textView1);\n TextView tv2 = (TextView)row.findViewById(R.id.textView2);\n tv1.setText(nameArray[position]);\n tv2.setText(infoArray[position]);\n\n if(position%2==0)\n iv.setImageResource(android.R.drawable.star_big_on);\n else\n iv.setImageResource(android.R.drawable.star_big_off);\n\n return row;\n\n }",
"@Override\n\t\t\tpublic View getView(int position,View convertView,ViewGroup parent){\n\t\t\t\tconvertView = getLayoutInflater().inflate(R.layout.main_griditem_home, null);\n\t\t\t\tView view = convertView.findViewById(R.id.item);\n\t\t\t\t// TextView txt_notice = (TextView)\n\t\t\t\t// convertView.findViewById(R.id.txt_notice);\n\t\t\t\tif((position + 1) <= menus.size()){\n\t\t\t\t\tMenuItem menuItem = menus.get(position);\n\t\t\t\t\tint Id = getResources().getIdentifier(menuItem.getIcon(), \"drawable\", mContext.getPackageName());// 这个是图片id\n\t\t\t\t\tif(Id == 0){\n\t\t\t\t\t\tview.setBackgroundResource(R.color.white);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tview.setBackgroundDrawable(getResources().getDrawable(Id));\n\t\t\t\t\t}\n\t\t\t\t\tTextView txt_notice = (TextView) convertView.findViewById(R.id.txt_notice);\n\t\t\t\t\ttxt_notice.setText(menuItem.getName());\n\t\t\t\t\ttxt_notice.setVisibility(0);\n\t\t\t\t\t// updateNum(menuItem, txt_notice);\n\t\t\t\t}else{\n\t\t\t\t\tview.setBackgroundResource(R.drawable.kongbai);\n\t\t\t\t}\n\t\t\t\tAbsListView.LayoutParams layoutParams = new AbsListView.LayoutParams(LayoutParams.MATCH_PARENT, (int) (app.getScreenHeight() * 0.15));\n\t\t\t\tconvertView.setLayoutParams(layoutParams);\n\t\t\t\treturn convertView;\n\t\t\t}",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tView layout3_item = inflater.inflate(R.layout.layout4_lvitem,null);\n\t\treturn layout3_item;\n\t}",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tLayoutInflater inflater=(LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);\n\t\t\tView v=inflater.inflate(R.layout.custom, null);\n\t\t\t\n\t\t\ttv1=(TextView)v.findViewById(R.id.text1);\n\t\t\ttv1.setText(names[position]);\n\t\t\t\n\t\t\t\n\t\t\ttv2=(TextView)v.findViewById(R.id.text2);\n\t\t\ttv2.setText(phones[position]);\n\t\t\t\n\t\t\t\n\t\t\treturn v;\n\t\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n LayoutInflater inflater = getLayoutInflater();\n View newView;\n newView = inflater.inflate(R.layout.recipe_list, parent, false);\n TextView info = newView.findViewById(R.id.recipeInfo);\n String title = (String) getItem(position);\n info.setText(title);\n return newView;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n return initView(position, convertView, parent);\n }",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\tRelativeLayout rl = null;\n\t\tLayoutInflater inflater = (LayoutInflater) myContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\trl = (RelativeLayout) inflater.inflate(R.layout.tour_item, parent, false);\n\n\t\tRatingBar rb = (RatingBar)rl.findViewById(R.id.TourRaTab);\n\t\tTextView tourName = (TextView) rl.findViewById(R.id.listTourName);\n\t\tTextView tourDesc = (TextView) rl.findViewById(R.id.descInList);\n\n\t\trb.setRating(CommonShared.getInstance().getmTours().get(position).finRate());\n\t\ttourName.setText(CommonShared.getInstance().getmTours().get(position).getmTourName());\n\t\ttourDesc.setText(CommonShared.getInstance().getmTours().get(position).getmTourDescription());\n\n\n\t\treturn rl;\n\t}",
"@Override\r\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\r\n\r\n\t\tRelativeLayout mLayout = new RelativeLayout(context);\r\n\t\tmLayout.setLayoutParams(new ListView.LayoutParams(ListView.LayoutParams.FILL_PARENT,\r\n\t\t\t\tListView.LayoutParams.FILL_PARENT));\r\n\r\n\t\tRelativeLayout.LayoutParams mParams = new RelativeLayout.LayoutParams(\r\n\t\t\t\tRelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\r\n\t\tmParams.addRule(RelativeLayout.CENTER_IN_PARENT);\r\n\r\n\t\tTextView textView = new TextView(context);\r\n\t\ttextView.setText(getItem(position).name);\r\n\t\ttextView.setTextSize(13);\r\n\t\ttextView.setLayoutParams(mParams);\r\n\t\tmLayout.addView(textView);\r\n\t\treturn mLayout;\r\n\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View view = convertView;\n if(view == null) {\n view = mInflater.inflate(R.layout.wheel_item_2, parent, false);\n }\n TextView content = (TextView) view.findViewById(R.id.content);\n Node item = (Node)getItem(position);\n content.setText(item != null ? item.mDisplayName : null);\n return view;\n }",
"public View getView(int position, View convertView, ViewGroup parent) {\n return itemViews[position];\r\n// return convertView;\r\n }",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tView view = LayoutInflater.from(getActivity()).inflate(R.layout.discovery_fragment_listitem, null);\n\t\t\tImageView icon = (ImageView)view.findViewById(R.id.itemIcon);\n\t\t\tTextView textView = (TextView)view.findViewById(R.id.itemTv);\n\t\t\tImageView inImageView = (ImageView)view.findViewById(R.id.itemInImg);\n\t\t\t\n\t\t\ticon.setImageResource(imgs[position]);\n\t\t\ttextView.setText(names[position]);\n\t\t\tinImageView.setImageResource(R.drawable.in);\n\t\t\treturn view;\n\t\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent){\n View view = super.getView(position,convertView,parent);\n if(position %2 == 1)\n {\n // Set a background color for ListView regular row/item\n view.setBackgroundColor(Color.rgb(130, 130, 130));\n }\n else\n {\n // Set the background color for alternate row/item\n view.setBackgroundColor(Color.argb(100, 100, 100, 100));\n }\n return view;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View itemView = convertView;\n LayoutInflater inflater = LayoutInflater.from(context);\n if (itemView == null) {\n itemView = inflater.inflate(R.layout.ingredients_list, parent, false);\n }\n\n if(ingredientsArray.get(0) instanceof IngredientsBase) {\n\n IngredientsBase currentIngredient = (IngredientsBase) ingredientsArray.get(position);\n\n TextView ingredientsText = (TextView) itemView.findViewById(R.id.ingredientsText);\n ingredientsText.setText(currentIngredient.getName() + \" \" + currentIngredient.getQuantity() + \" \" + currentIngredient.getMetricUnit());\n\n }\n else{\n\n IngredientsDetail currentIngredient = (IngredientsDetail) ingredientsArray.get(position);\n\n TextView ingredientsText = (TextView) itemView.findViewById(R.id.ingredientsText);\n ingredientsText.setText(currentIngredient.getName() + \" \" + currentIngredient.getId());\n }\n return itemView;\n }",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tif(convertView == null){\n\t\t\tif(StoreDetailActivity.isGridView){\n\t\t\t\tconvertView = inflater.inflate(R.layout.listcell_store_grid, parent, false);\n\t\t\t}else {\n\t\t\t\tconvertView = inflater.inflate(R.layout.store_list_layout, parent, false);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(StoreDetailActivity.isGridView){\n\t\t\tfor(int i = 0; i < mRows; i++){\n\t\t\t\tJSONObject goodsList = mGoodsList.optJSONObject(position * mRows + i);\n\t\t\t\tLinearLayout contentView = (LinearLayout) convertView;\n\t\t\t\tsetItemView(contentView.getChildAt(i % 2 == 0 ? 0 : 1), goodsList);\n\t\t\t}\n\t\t}else {\n\t\t\tJSONObject goodsList = mGoodsList.optJSONObject(position);\n\t\t\tsetItemView(convertView, goodsList);\n\t\t}\n\t\t\n\t\t\n\t\treturn convertView;\n\t}",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tif(null == convertView){\n\t\t\t\t// Our view has not been recycled, let's create a new one!\n\t\t\t\tconvertView = getLayoutInflater().inflate(R.layout.item_list_image, null);\n\t\t\t}\n\t\t\t// Update recycled or old view\n\t\t\tTextView label = (TextView) convertView.findViewById(R.id.text);\n\t\t\tlabel.setText(activities[position].getSimpleName());\n\t\t\t\n\t\t\treturn convertView;\n\t\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View listItemView = convertView;\n if (listItemView == null) {\n listItemView = LayoutInflater.from(getContext()).inflate(\n R.layout.list_item, parent, false);\n }\n\n // Get the Description object located at this position in the list\n Description currentDescription = getItem(position);\n\n // Find the TextView in the list_item.xml layout with the ID description\n TextView descriptionTextView = (TextView) listItemView.findViewById(R.id.description);\n // Get the Description from the currentDescription object and set this text on\n // the descriptionTextView\n descriptionTextView.setText(currentDescription.getDescription());\n\n\n // Find the ImageView in the list_item.xml layout with the ID ic_link\n ImageView imageView1 = (ImageView) listItemView.findViewById(R.id.ic_link);\n imageView1.setImageResource(currentDescription.getImage1());\n // Find the ImageView in the list_item.xml layout with the ID image\n ImageView imageView2 = (ImageView) listItemView.findViewById(R.id.image);\n imageView2.setImageResource(currentDescription.getImage2());\n\n // Return the whole list item layout (containing 2 ImageViews and 1 TextView) so that it can be shown in\n // the ListView.\n return listItemView;\n }",
"@Override\r\n public View getView(final int position, View convertView, ViewGroup parent) {\n if (convertView == null) {\r\n convertView = LayoutInflater.from(context).inflate(R.layout.layout_item_for_common, parent, false);\r\n convertView.setTag(new ViewHolder(convertView));\r\n }\r\n ViewHolder vh = (ViewHolder) convertView.getTag();\r\n\r\n vh.item_name.setText(list.get(position).getName());\r\n vh.page_left.setImageDrawable(list.get(position).getPageLeft());\r\n vh.item_setting.setText(list.get(position).getItemName());\r\n vh.page_right.setImageDrawable(list.get(position).getPageRight());\r\n return convertView;\r\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View listItem = convertView;\n int pos = position;\n\n if(listItem == null){\n listItem = layoutInflater.inflate(R.layout.item_list, null);\n }\n\n //Colocando na tela os elementos da busca\n ImageView iv = (ImageView) listItem.findViewById(R.id.thumb);\n TextView tvTitle = (TextView) listItem.findViewById(R.id.title);\n TextView tvDate = (TextView) listItem.findViewById(R.id.date);\n\n //aplicando as views no form_contato\n imageLoader.DisplayImage(feed.getItem(pos).getImage(), iv);\n tvTitle.setText(feed.getItem(pos).getTitle());\n tvDate.setText(feed.getItem(pos).getDate());\n\n return listItem;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View view = convertView;\n if (view == null) {\n LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n view = vi.inflate(R.layout.menu_list, null);\n }\n\n ControlsMenuOptions menuItem = items.get(position);\n\n if (menuItem != null) {\n TextView header = (TextView) view.findViewById(R.id.tvMenuItem);\n header.setText(menuItem.getMenuDescription());\n }\n return view;\n }",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\tif (convertView == null) {\n\t\t\tconvertView = View.inflate(c,R.layout.follower,\n\t\t\t\t\tnull);\n\t\t}\n\n\t\t// setupView(convertView, book);\n\n\t\treturn convertView;\n\t}",
"@Override\n\t\tpublic View getView(int arg0, View arg1, ViewGroup arg2) {\n\t\t\tif (arg1 == null) {\n\t\t\t\tLayoutInflater inflater = (LayoutInflater) MainActivity.this\n\t\t\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\t\targ1 = inflater.inflate(R.layout.listitem, arg2, false);\n\t\t\t}\n\n\t\t\tTextView chapterName = (TextView) arg1\n\t\t\t\t\t.findViewById(R.id.feed_text1);\n\t\t\tTextView chapterDesc = (TextView) arg1\n\t\t\t\t\t.findViewById(R.id.feed_text2);\n\n\t\t\tnewsfeed recent_update = newsfeedList.get(arg0);\n\n\t\t\tchapterName.setText(recent_update.username);\n\t\t\tchapterDesc.setText(recent_update.recommendation_detail);\n\n\t\t\treturn arg1;\n\t\t}",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tListItemView listItemView = new ListItemView();\n\t\tif (convertView == null || position < lists.size()) {\n\t\t\tconvertView = LayoutInflater.from(mContext).inflate(\n\t\t\t\t\tR.layout.st_sug_list, null);\n\t\t\tlistItemView.KeyIndex = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.num_index);\n\t\t\tlistItemView.KeyName = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.KeyName);\n\t\t\tlistItemView.keyCity = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.KeyCity);\n\t\t\tconvertView.setTag(listItemView);\n\n\t\t} else {\n\t\t\tlistItemView = (ListItemView) convertView.getTag();\n\t\t}\n//\t\tif (height != 0) {\n//\t\t\tlistItemView.KeyName\n//\t\t\t\t\t.setTextSize(CommonUtil.getTextSizes(height, 5));\n//\t\t\tlistItemView.KeyIndex\n//\t\t\t.setTextSize(CommonUtil.getTextSizes(height, 5));\n//\t\n//\t\t}\n\t\tlistItemView.KeyIndex.setText(String.valueOf(position + 1));\n\t\tlistItemView.KeyName.setText(lists.get(position).getKeyName());\n\n\t\t// convertView.setTag(R.id.tagItemCchoose, lists.get(position));\n\n\t\t// listItemView.loc_city.setText(lists.get(position).getCityName());\n\t\t// if(position ==0){\n\t\t// convertView.setBackgroundResource(R.color.grayblackish_green);\n\t\t// }\n\t\treturn convertView;\n\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View listItemView = convertView;\n if (listItemView == null) {\n listItemView = LayoutInflater.from(getContext()).inflate(\n R.layout.item_layout, parent, false);\n }\n // get the current object located at position\n ItemObject currentObject = getItem(position);\n // Find the TextView in the list_item.xml layout with the ID version_name\n TextView nameTextView = listItemView.findViewById(R.id.item_name);\n nameTextView.setText(currentObject.getPlanetName());\n ImageView itemImage = listItemView.findViewById(R.id.item_img);\n itemImage.setImageResource(currentObject.getImageID());\n return listItemView;\n }",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tView itemView=convertView;\n\t\t\tif(itemView==null){\n\t\t\t\titemView=getLayoutInflater().inflate(R.layout.house_view, parent, false);\n\t\t\t}\n\t\t\t\n\t\t\tHomeData myHouse=houseList.get(position);\n\t\t\t\n\t\t\tImageView houseTypeIv=(ImageView)itemView.findViewById(R.id.houseTypeIv);\n\t\t\t\n\t\t\tTextView roomTv=(TextView) itemView.findViewById(R.id.roomLvTv);\n\t\t\tTextView priceTv=(TextView) itemView.findViewById(R.id.priceLvTv);\n\t\t\tTextView addressTv=(TextView) itemView.findViewById(R.id.addressLvTv);\n\t\t\tTextView ownerNameTv=(TextView) itemView.findViewById(R.id.ownerNameLvTv);\n\t\t\t\n\t\t\t//assign value to each view\n\t\t\thouseType=String.valueOf(myHouse.mHouseType);\n\t\t\t\n\t\t\tif(houseType==\"House\"){\n\t\t\t\thouseTypeIv.setImageResource(R.drawable.pizza);\n\t\t\t}else if(houseType==\"Apartment\"){\n\t\t\t\thouseTypeIv.setImageResource(R.drawable.apt);\n\t\t\t}else if(houseType==\"Condo\"){\n\t\t\t\thouseTypeIv.setImageResource(R.drawable.condo);\n\t\t\t}\n\t\t\t\n\t\t\tif(myHouse.mNumOfRoom==1){\n\t\t\t\troomTv.setText(String.valueOf(myHouse.mNumOfRoom)+\" room\");\n\t\t\t}else{\n\t\t\t\troomTv.setText(String.valueOf(myHouse.mNumOfRoom)+\" rooms\");\n\t\t\t}\n\t\t\t\n\t\t\tpriceTv.setText(\"as $\"+String.valueOf(myHouse.mPrice));\n\t\t\taddressTv.setText(myHouse.mAddress);\n\t\t\townerNameTv.setText(myHouse.mOwnerName);\n\t\t\t\n\t\t\treturn itemView;\n\t\t}",
"@Override\n\tpublic View getView(int position, View itemView, ViewGroup parent) {\n\t\tViewHolder holder = null;\n\n\t\tif (itemView == null)\n\t\t{\n\t\t\titemView = layoutInflater.inflate(R.layout.homeblock_item, parent, false);\n\n\t\t\tholder = new ViewHolder();\n\t\t\t//\tholder.imgProductImage = (ImageView) itemView.findViewById(R.id.imgProductImage);\n\n\t\t\tholder.imgProductImage = (NetworkImageView) itemView.findViewById(R.id.imgProductImage);\n\t\t\tholder.txtProductName=(TextView)itemView.findViewById(R.id.txtProductTitle);\n\t\t\tholder.txtDescreption=(TextView)itemView.findViewById(R.id.txtProductdescrebption);\n\t\t\tholder.txtShopNow=(TextView)itemView.findViewById(R.id.txtshopnow);\n\n\t\t\tint\tindividualItemHeight=(IOUtils.getHieghtOfScreen(mContext)/2)+(80*(int)mContext.getResources().getDisplayMetrics().density);\n\t\t\tAbsListView.LayoutParams param = new AbsListView.LayoutParams(\n\t\t\t\t\tandroid.view.ViewGroup.LayoutParams.MATCH_PARENT, individualItemHeight);\n\t\t\titemView.setLayoutParams(param);\n\n\t\t\titemView.setTag(holder);\n\t\t}\n\n\t\tholder = (ViewHolder) itemView.getTag();\n\t\tIOUtils.setImageToNetworkImageView(holder.imgProductImage, modelWishlist.get(position).getImageUrl());\n\n\t\tholder.txtProductName.setText(\"\"+modelWishlist.get(position).getTitle());\n\t\tholder.txtDescreption.setText(\"\"+modelWishlist.get(position).getType());\n\n\t\treturn itemView;\n\t}",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\t\tLayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\tView view = inflater.inflate(R.layout.list_item_table_row_read, parent, false);\n\t\t\tSet<Entry<String, JsonElement>> set = mTableRows[position].getAsJsonObject().entrySet();\n\t\t\tLinearLayout layoutItem = (LinearLayout) view.findViewById(R.id.layoutItem);\n\t\t\t//Loop through each data item in the row and create a layout with the key and \n\t\t\t//value displayed in TextViews within it\n\t\t\tfor (Entry<String, JsonElement> entry : set) {\n\t\t\t\tLog.i(TAG, entry.getKey());\t\t\t\t\n\t\t\t\tRelativeLayout rowLayout = new RelativeLayout(mContext);\n\t\t\t\tRelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\t\t\t\t\n\t\t\t\trowLayout.setLayoutParams(params);\t\t\t\t\n\t\t\t\tTextView lblKey = new TextView(mContext);\n\t\t\t\tlblKey.setText(entry.getKey());\t\t\t\t\n\t\t\t\tRelativeLayout.LayoutParams keyParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\tkeyParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT);\n\t\t\t\tkeyParams.leftMargin = 20;\n\t\t\t\tlblKey.setLayoutParams(keyParams);\t\t\t\t\n\t\t\t\tTextView lblValue = new TextView(mContext);\t\t\t\t\n\t\t\t\tRelativeLayout.LayoutParams valueParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\tvalueParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);\n\t\t\t\tlblValue.setLayoutParams(valueParams);\n\t\t\t\t//Limit the amount of text we show so the UI isn't dirty\n\t\t\t\tInputFilter[] FilterArray = new InputFilter[1];\n\t\t\t\tFilterArray[0] = new InputFilter.LengthFilter(25);\n\t\t\t\tlblValue.setFilters(FilterArray);\n\t\t\t\tlblValue.setText(entry.getValue().getAsString());\n\t\t\t\tlblValue.setGravity(Gravity.RIGHT);\n\t\t\t\trowLayout.addView(lblKey);\n\t\t\t\trowLayout.addView(lblValue);\n\t\t\t\tlayoutItem.addView(rowLayout);\n\t\t\t}\t\t\t\n\t\t\treturn view;\n\t\t}",
"@Override\r\n public View getView(int position, View convertView, ViewGroup parent){\r\n\r\n View view = super.getView(position, convertView, parent);\r\n\r\n TextView tv = (TextView) view.findViewById(android.R.id.text1);\r\n\r\n\r\n tv.setTextColor(Color.WHITE);\r\n\r\n return view;\r\n }",
"@NonNull\n @Override\n public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {\n\n View view=inflater.inflate(R.layout.item_list_view_settings, null);\n ImageView row_image=view.findViewById(R.id.row_image);\n TextView row_title=view.findViewById(R.id.row_title);\n\n row_image.setImageResource(image_resources[position]);\n row_title.setText(title[position]);\n\n return view;\n }",
"@Override\r\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tViewHolder holder;\r\n\t\tif (null == convertView) {\r\n\t\t\tconvertView = mInflater.inflate(R.layout.item_article_layout, null);\r\n\t\t\tholder = new ViewHolder();\r\n\t\t\tholder.icon = (ImageView) convertView.findViewById(R.id.item_icon);\r\n\t\t\tholder.title = (TextView) convertView.findViewById(R.id.item_title);\r\n\t\t\tholder.name = (TextView) convertView\r\n\t\t\t\t\t.findViewById(R.id.item_user_name);\r\n\t\t\tholder.time = (TextView) convertView.findViewById(R.id.item_time);\r\n\t\t\tholder.count = (TextView) convertView.findViewById(R.id.item_count);\r\n\t\t\tholder.line = (TextView) convertView.findViewById(R.id.item_line);\r\n\t\t\tconvertView.setTag(holder);\r\n\t\t} else {\r\n\t\t\tholder = (ViewHolder) convertView.getTag();\r\n\t\t}\r\n\t\tArticleItem item = list.get(position);\r\n\t\tholder.title.setText(item.getTitle());\r\n\t\tString name = item.getU_name();\r\n\t\tholder.name.setText(name);\r\n\t\tlong time = Long.parseLong(item.getTime());\r\n\t\tholder.time.setText(getTimeFormat(time));\r\n\t\tholder.count.setText(String.valueOf(item.getReply_count()));\r\n\t\tif (isNewPublish(time)) {\r\n\t\t\tholder.line.setBackgroundResource(R.drawable.article_divider_new);\r\n\t\t} else {\r\n\t\t\tholder.line.setBackgroundResource(R.drawable.article_divider_1);\r\n\t\t}\r\n\t\t//使用头像加载器显示头像\r\n\t\tLoadIconManager.getInstance().showHeadIcon(mContext, holder.icon, name,\r\n\t\t\t\titem.getU_photo(), onLoadIconListener);\r\n\t\treturn convertView;\r\n\t}",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\tconvertView = LayoutInflater.from(context).inflate(layoutID, null);\n\n\t\tTextView v = (TextView) convertView\n\t\t\t\t.findViewById(R.id.tv_forum_item_title);\n\t\tif (v != null) {\n\t\t\tv.setText(data.get(position).get(\"title\"));\n\t\t}\n\t\tTextView v1 = (TextView) convertView\n\t\t\t\t.findViewById(R.id.tv_forum_item_date);\n\t\tif (v1 != null) {\n\t\t\tv1.setText(data.get(position).get(\"date\"));\n\t\t}\n\t\tTextView v2 = (TextView) convertView\n\t\t\t\t.findViewById(R.id.tv_forum_item_click);\n\t\tif (v2 != null) {\n\t\t\tv2.setText(data.get(position).get(\"nums\"));\n\t\t\t\n\t\t\tif (data.get(position).get(\"folder\").equals(\"folder_digest\")) {\n\t\t\t\tv2.setTextColor(convertView.getContext().getResources().getColor( R.color.folder_digest));\n\t\t\t}else if (data.get(position).get(\"folder\").equals(\"folder_hot\")) {\n\t\t\t\tv2.setTextColor(convertView.getContext().getResources().getColor( R.color.folder_hot));\n\t\t\t}else {\n\t\t\t\tv2.setTextColor(convertView.getContext().getResources().getColor( R.color.folder_new));\n\t\t\t}\n\t\t\t \n\t\t}\n\t\tTextView v3 = (TextView) convertView\n\t\t\t\t.findViewById(R.id.tv_forum_item_author);\n\t\tif (v3 != null) {\n\t\t\tv3.setText(data.get(position).get(\"author\"));\n\t\t}\n\t\tTextView v4 = (TextView) convertView\n\t\t\t\t.findViewById(R.id.tv_forum_item_topidID);\n\t\tif (v4 != null) {\n\t\t\tv4.setText(data.get(position).get(\"topicid\"));\n\t\t}\n\n\t\tImageView im_avatar=(ImageView) convertView.findViewById(R.id.img_forum_item_head);\n\t\t\n\t\tBitmap bmp = BitmapFactory.decodeResource(convertView.getContext()\n\t\t\t\t.getResources(), R.drawable.ic_attachment_contact_vcf_picture);\n\n\t\tbm.loadBitmap(data.get(position).get(\"avatar\"), im_avatar,\n\t\t\t\tbmp, 86, 86);\n\t\treturn convertView;\n\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n Mood mood = getItem(position);\n // Check if an existing view is being reused, otherwise inflate the view\n if (convertView == null) {\n convertView = LayoutInflater.from(getContext()).inflate(R.layout.mood_list, parent, false);\n }\n\n // Lookup view for data population\n TextView userName = (TextView) convertView.findViewById(R.id.moodUserName);\n TextView emoticon = (TextView) convertView.findViewById(R.id.moodEmoticon);\n TextView group = (TextView) convertView.findViewById(R.id.moodGroup);\n TextView emotion = (TextView) convertView.findViewById(R.id.moodEmotion);\n TextView details = (TextView) convertView.findViewById(R.id.moodDetails);\n TextView date = (TextView) convertView.findViewById(R.id.moodDate);\n ImageView image = (ImageView) convertView.findViewById(R.id.moodImageView);\n LinearLayout item = (LinearLayout) convertView.findViewById(R.id.moodListItem);\n\n\n // Populate the data into the template view using the data object\n userName.setText(mood.getUserName());\n emoticon.setText(mood.getEmotion().getEmoticon());\n group.setText(mood.getSocialSituation());\n emotion.setText(mood.getEmotion().getEmotion());\n details.setText(mood.getMessage());\n date.setText(mood.getDateForView());\n image.setImageBitmap(mood.getImage());\n if(mood.getImage() == null){\n// Log.i(\"no image\",Integer.toString(position));\n image.setMaxHeight(0);\n }else{\n// Log.i(\"has image\",Integer.toString(position));\n image.setMaxHeight(720);\n// Log.i(\"image height\",Integer.toString(mood.getImage().getHeight()));\n }\n// Log.i(\"view height\",Integer.toString(image.getHeight()));\n item.setBackgroundColor(mood.getEmotion().getColour());\n\n\n\n\n // Return the completed view to render on screen\n return convertView;\n }",
"@Override\n public View getView(final int position, final View convertView, final ViewGroup parent) {\n return mBaseAdapter.getView(position, convertView, parent);\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n\n LayoutInflater inflater = LayoutInflater.from(mContext);\n View rowView = inflater.inflate(R.layout.main_fragment_grid_category_buttons, null,true);\n\n TextView txtTitle = (TextView) rowView.findViewById(R.id.main_fragment_grid_category_element_text);\n ImageView imageView = (ImageView) rowView.findViewById(R.id.main_fragment_grid_category_element_pic);\n\n txtTitle.setText(drawerMainElements[position]);\n imageView.setImageResource(drawerMainElementsPics[position]);\n\n return rowView;\n }",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tTextView text;\n\t\t\ttext = new TextView(mContext);\n\t\t\ttext.setPadding(2, 2, 2, 2);\n\t\t\tQuestion theCom = questions.get(questions.size() - 1 - position);\n\t\t\ttext.setText(theCom.getUser() + \" - \"+ (theCom.getDate().getMonth() + 1) +\"/\" + theCom.getDate().getDate() + \"/\" + theCom.getDate().getYear() + \"\\n\" + theCom.getComment());\n\t\t\tLinearLayout.LayoutParams items = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n\t\t\ttext.setLayoutParams(items);\n\t\t\tGradientDrawable qgd = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0xFF004684, 0xFF00284D});\n\t\t\tqgd.setCornerRadius(0f);\n\t\t\t\n\t\t\ttext.setBackgroundDrawable(qgd);\n\t\t\tLinearLayout ans = new LinearLayout(mContext);\n\t\t\tans.setOrientation(LinearLayout.VERTICAL);\n\t\t\tans.addView(text, 0);\n\t\t\ttext.setTextSize(21);\n\t\t\tif (openQuestion == position){\n\t\t\t\t//GradientDrawable qgd2 = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0xFF98BEE0, 0xFF418ACD});\n\t\t\t\tGradientDrawable qgd2 = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0xFF004684, 0xFF00284D});\n\t\t\t\ttext.setBackgroundDrawable(qgd2);\n\t\t\t\ttext.setTextColor(0xFFFFFFFF);\n\t\t\t\tif (theCom.getAnswers().size() > 0){\n\t\t\t\t\t\n\t\t\t\t\tint ind = 0;\n\t\t\t\t\tfor(int i = 0; i <theCom.getAnswers().size(); i++){\n\t\t\t\t\t\tif (i > 0){ //Add a line between the items in the form of a view\n\t\t\t\t\t\t\tView theLine = new View(mContext);\n\t\t\t\t\t\t\tint pixels = (int) (1 * scale + 0.5f);\n\t\t\t\t\t\t\tLinearLayout.LayoutParams linPar = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, pixels);\n\t\t\t\t\t\t\ttheLine.setLayoutParams(linPar);\n\t\t\t\t\t\t\ttheLine.setBackgroundColor(Color.parseColor(\"#00284D\"));\n\t\t\t\t\t\t\tind++;\n\t\t\t\t\t\t\tans.addView(theLine, ind);//ind++ or 1\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tTextView anAns = new TextView(mContext);\n\t\t\t\t\t\tanAns.setText(theCom.getAnswers().get(i).getUser() + \" - \"+ (theCom.getAnswers().get(i).getDate().getMonth() + 1) +\"/\" + theCom.getAnswers().get(i).getDate().getDate() + \"/\" + theCom.getAnswers().get(i).getDate().getYear() + \"\\n\" + theCom.getAnswers().get(i).getComment());\n\t\t\t\t\t\tLinearLayout.LayoutParams ansPar = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n\t\t\t\t\t\tansPar.setMargins(30, 0, 0, 0);\n\t\t\t\t\t\tanAns.setLayoutParams(ansPar);\n\t\t\t\t\t\tind++;\n\t\t\t\t\t\tanAns.setTextSize(21);\n\t\t\t\t\t\t//GradientDrawable qgd3 = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0xFF98BEE0, 0xFF418ACD});\n\t\t\t\t\t\t//GradientDrawable qgd3 = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0xFF004684, 0xFF00284D});\n\t\t\t\t\t\tanAns.setTextColor(0xFFFFFFFF);\n\t\t\t\t\t\t//anAns.setBackgroundDrawable(qgd3);\n\t\t\t\t\t\tans.addView(anAns, ind); //ind or 1\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTextView anAns = new TextView(mContext);\n\t\t\t\t\tanAns.setText(\"no answers\");\n\t\t\t\t\tLinearLayout.LayoutParams ansPar = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n\t\t\t\t\tansPar.setMargins(30, 0, 0, 0);\n\t\t\t\t\tanAns.setLayoutParams(ansPar);\n\t\t\t\t\tanAns.setTextSize(21);\n\t\t\t\t\tanAns.setTextColor(0xFFFFFFFF);\n\t\t\t\t\t//GradientDrawable qgd3 = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0xFF004684, 0xFF00284D});\n\t\t\t\t\t//anAns.setBackgroundDrawable(qgd3);\n\t\t\t\t\tans.addView(anAns); //ind or 1\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (openQuestion == -1){\n\t\t\t\t\n\t\t\t\ttext.setTextColor(0xFFFFFFFF);\n\t\t\t} else {\n\t\t\t\tGradientDrawable qgd4 = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0x08004684, 0x8000284D});\n\t\t\t\ttext.setBackgroundDrawable(qgd4);\n\t\t\t\ttext.setTextColor(0x80FFFFFF);\n\t\t\t}\n\t\t\t\n\t\t\tAbsListView.LayoutParams params = new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n\t\t\tans.setLayoutParams(params);\n\t\t\treturn ans;\n\t\t}",
"@Override\n public View getView (int position, View convertView, ViewGroup parent) {\n\n appManager = AppManager.getInstance();\n\n\n //challengeParticipation challengeParticipation = (ChallengeParticipation) getItem(position);\n if (convertView == null)\n convertView = LayoutInflater.from(getContext()).inflate(R.layout.activity_challenges_available_custom_item,\n parent, false);\n\n //handlers to the elements in activity .xml\n TextView list_item_challenge_available_title = (TextView) convertView.findViewById(R.id.challenge_title_available);\n //TextView list_item_challenge_days_to_end_ = (TextView) convertView.findViewById(R.id.challenge_days_to_end_value);\n\n list_item_challenge_available_title.setText(\"Famous People Challenge\");\n //list_item_challenge_days_to_end_.setText(\"\" +appManager.getCurrentUser().getChallengesParticipations().get(position).getGems());\n return convertView;\n }",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tViewHolder holder = null;\n\t\t\tif(convertView == null){\n\t\t\t\tconvertView = View.inflate(mContext, R.layout.view_textplan_item, null);\n\t\t\t\tholder = new ViewHolder();\n\t\t\t\tTextView name = (TextView) convertView.findViewById(R.id.list_item_name);\n\t\t\t\tholder.name = name;\n\t\t\t\tImageView image = (ImageView) convertView.findViewById(R.id.list_item_img);\n\t\t\t\tholder.image = image;\n\t\t\t\tconvertView.setTag(holder);\n\t\t\t}\n\t\t\tString name = (String) getItem(position);\n\t\t\tholder = (ViewHolder) convertView.getTag();\n\t\t\tholder.name.setText(name);\n\t\t\tif(position == 0){\n\t\t\t\tholder.image.setBackgroundDrawable(mContext.getResources().getDrawable(R.drawable.icon_list_item_start));\n\t\t\t\tholder.name.setTextColor(mContext.getResources().getColor(R.color.text_bule));\n\t\t\t\tholder.name.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);\n\t\t\t}\n\t\t\telse if(position == mDatas.size()-1){\n\t\t\t\tholder.image.setBackgroundDrawable(mContext.getResources().getDrawable(R.drawable.icon_list_item_end));\n\t\t\t\tholder.name.setTextColor(mContext.getResources().getColor(R.color.text_planend));\n\t\t\t\tholder.name.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tholder.image.setBackgroundDrawable(mContext.getResources().getDrawable(R.drawable.icon_list_item_img));\n\t\t\t\tholder.name.setTextColor(mContext.getResources().getColor(R.color.text_darkgrey));\n\t\t\t\tholder.name.setTextSize(TypedValue.COMPLEX_UNIT_SP, 13);\n\t\t\t}\n\t\t\t\t\n\t\t\treturn convertView;\n\t\t}",
"@Override\r\n public View getView(int position, View convertView, ViewGroup parent) {\n View listItemView = convertView;\r\n if (listItemView == null) {\r\n listItemView = LayoutInflater.from(getContext()).inflate(\r\n R.layout.list_item, parent, false);\r\n }\r\n\r\n // Get the {@link Attractions} object located at this position in the list\r\n Attractions currentWord = getItem(position);\r\n\r\n TextView attractionsTextView = (TextView) listItemView.findViewById(R.id.name_text_view);\r\n attractionsTextView.setText(currentWord.getattractionId());\r\n\r\n TextView detailsTextView = (TextView) listItemView.findViewById(R.id.details_text_view);\r\n detailsTextView.setText(currentWord.getdetailsId());\r\n\r\n // Find the ImageView in the list_item.xml layout with the ID image.\r\n ImageView imageView = (ImageView) listItemView.findViewById(R.id.image);\r\n // Check if an image is provided for this word or not\r\n if (currentWord.hasImage()) {\r\n // If an image is available, display the provided image based on the resource ID\r\n imageView.setImageResource(currentWord.getImageResourceId());\r\n // Make sure the view is visible\r\n imageView.setVisibility(View.VISIBLE);\r\n } else {\r\n // Otherwise hide the ImageView (set visibility to GONE)\r\n imageView.setVisibility(View.GONE);\r\n }\r\n\r\n // Set the theme color for the list item\r\n View textContainer = listItemView.findViewById(R.id.text_container);\r\n // Find the color that the resource ID maps to\r\n int color = ContextCompat.getColor(getContext(), mColorResourceId);\r\n // Set the background color of the text container View\r\n textContainer.setBackgroundColor(color);\r\n\r\n // Return the whole list item layout (containing 2 TextViews) so that it can be shown in\r\n // the ListView.\r\n return listItemView;\r\n\r\n }",
"@Override\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n\t\tsuper.onMeasure(widthMeasureSpec, heightMeasureSpec);\n\t\t\n\t ListAdapter listAdapter = this.getAdapter(); \n\t if (listAdapter == null) { \n\t return; \n\t } \n\t \n\t int totalHeight = 0; \n\t for (int i = 0; i < listAdapter.getCount(); i++) { \n\t View listItem = listAdapter.getView(i, null, this); \n\t try\n\t {\n\t \tlistItem.measure(0, 0); \n\t }\n\t catch (Exception e)\n\t {\n\t \te.printStackTrace();\n\t }\n\t \n\t totalHeight += listItem.getMeasuredHeight(); \n\t } \n\t \n\t totalHeight = totalHeight + (this.getDividerHeight() * (listAdapter.getCount() - 1));\n\t totalHeight += this.getPaddingBottom();\n\t totalHeight += this.getPaddingTop();\n\t \n\t this.setMeasuredDimension(this.getMeasuredWidth(), totalHeight);\n\t\t\n\t\t\n\t}",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent)\n\t\t{\n\t\t\t\n\t\t\tViewHolder viewHolder = null;\n\t\t\t\n\t\t\tif(convertView == null)\n\t\t\t{\n\t\t\t\tconvertView = getLayoutInflater().inflate(R.layout.customadapterview_item, parent, false);\n\t\t\t\tviewHolder = new ViewHolder();\n\t\t\t\tviewHolder.imageView = (ImageView) convertView.findViewById(R.id.imageView);\n\t\t\t\tviewHolder.textView = (TextView) convertView.findViewById(R.id.textView);\n\t\t\t\tconvertView.setTag(viewHolder);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tviewHolder = (ViewHolder) convertView.getTag();\n\t\t\t}\n\t\t\t\n\t\t\tviewHolder.imageView.setImageResource(imageIds[position]);\n\t\t\tviewHolder.textView.setText(\"Image\"+position);\n\t\t\t\n\t\t\treturn convertView;\n\t\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n //Check if there is an existing list item view (called converView) that\n //we can reuse, otherwise, if converView is null, then inflate a new list item layout\n View listItemView = convertView;\n if(listItemView == null){\n listItemView = LayoutInflater.from(getContext()).inflate(\n R.layout.book_list_item, parent, false);\n }\n\n //Find the book at the given position in the list of books\n Book currentBook = getItem(position);\n\n //Find the ImageView with view ID thumbnail_view\n ImageView thumbNailView = (ImageView) listItemView.findViewById((R.id.thumbnail_view));\n //Display the thumbnail for the current book\n thumbNailView.setImageBitmap(currentBook.getThumbnailURL());\n\n //Find the TextView with the view ID title_view\n TextView titleView = (TextView) listItemView.findViewById((R.id.title_view));\n //Display the title for the book\n titleView.setText(currentBook.getTitle());\n\n //Find the TextView with the view ID author_view\n TextView authorView = (TextView) listItemView.findViewById((R.id.author_view));\n //Display the author of the book\n authorView.setText(currentBook.getAuthor());\n\n //Find the TextView with the view ID published_view\n TextView publishedView = (TextView) listItemView.findViewById((R.id.publish_view));\n //Display the published date of the book\n publishedView.setText(currentBook.getPublishedYear());\n\n //Find the TextView with the view ID rating_view\n TextView ratingView = (TextView) listItemView.findViewById((R.id.rating_view));\n\n //TODO fix the formatter\n //Check if there is a rating for the current book\n if(!currentBook.getRating().equals(\"N/A\")) {\n //Convert String to a double and set the corresponding color\n double formattedRating = formatRating(currentBook.getRating());\n\n //Set the proper background color on the rating circle.\n //Fetch the background from the TextView, which is ratingView\n GradientDrawable ratingCircle = (GradientDrawable) ratingView.getBackground();\n //Get the appropriate background color based on the current book rating\n int magnitudeColor = getRatingColor(formattedRating);\n ratingCircle.setColor(magnitudeColor);\n\n //Display rating for the book\n ratingView.setText(currentBook.getRating());\n } else{\n //Otherwise, Display the \"N/A\" rating for the book\n ratingView.setText(currentBook.getRating());\n //Set the proper background color on the rating circle.\n //Fetch the background from the TextView, which is ratingView\n GradientDrawable ratingCircle = (GradientDrawable) ratingView.getBackground();\n //Get the appropriate background color based on the current book rating\n int magnitudeColor = ContextCompat.getColor(getContext(), R.color.rating1);\n ratingCircle.setColor(magnitudeColor);\n\n }\n\n\n //Return the list item view\n return listItemView;\n\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n Item item = getItem(position);\n // Check if an existing view is being reused, otherwise inflate the view\n if (convertView == null) {\n convertView = LayoutInflater.from(getContext()).inflate(R.layout.list_layout, parent, false);\n }\n\n // Lookup view for data population\n TextView tvName = convertView.findViewById(R.id.item_textview);\n TextView tvNum = convertView.findViewById(R.id.num_textview);\n\n // TODO\n // Set the text used by tvName and tvNum using the data object\n // This will need to updated once the entity model has been updated\n tvName.setText(item.getName());\n tvNum.setText(item.getNum());\n\n // Return the completed view to render on screen\n return convertView;\n }",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tLayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\tView rowView;\n\t\tif (convertView == null){\n\t\t\trowView = inflater.inflate(R.layout.alumno_row, parent,false);\n\t\t} else {\n\t\t\trowView = convertView;\n\t\t}\n\t\t\n\t\tTextView lblAlumnoApellido = (TextView) rowView.findViewById(R.id.lblAlumnoApellido);\n\t\tTextView lblAlumnoNombre = (TextView) rowView.findViewById(R.id.lblAlumnoNombre);\n\t\t\n\t\tAlumno alumno = mAlumnos.get(position);\n\t\t\n\t\tlblAlumnoApellido.setText(alumno.getApellido());\n\t\tlblAlumnoNombre.setText(alumno.getNombre());\n\t\t\n//\t\tif (position % 2 == 0)\n//\t\t\trowView.setBackgroundColor(Color.parseColor(\"#656D78\"));\n\t\t\n\t\treturn rowView;\n\t\t\n\t}",
"@Override\n\t\tpublic View getView(final int position, View convertView, ViewGroup parent) {\n\t\t\t// A ViewHolder keeps references to children views to avoid\n\t\t\t// unneccessary calls to findViewById() on each row.\n\t\t\tViewHolder holder;\n\t\t\tIconListBean bean = beans.get(position);\n\n\t\t\t// When convertView is not null, we can reuse it directly, there is no need to reinflate it.\n\t\t\t// We only inflate a new View when the convertView supplied by ListView is null.\n\t\t\tif (convertView == null) {\n\t\t\t\tconvertView = mInflater.inflate(idHolder.getListRowLayoutId(), null);\n\n\t\t\t\t// Creates a ViewHolder and store references to the two children\n\t\t\t\t// views we want to bind data to.\n\t\t\t\tholder = new ViewHolder();\n\t\t\t\tholder.lineHead = (TextView) convertView.findViewById(idHolder.getLineHeadId());\n\t\t\t\tholder.lineBody = (TextView) convertView.findViewById(idHolder.getLineBodyId());\n\t\t\t\tif (idHolder.getLineIconId() > 0) {\n\t\t\t\t\tholder.lineIcon = (ImageView) convertView.findViewById(idHolder.getLineIconId());\n\t\t\t\t}\n\t\t\t\tint icon2Id1 = idHolder.getIntExtra(IconListIdHolder.KEY_ADDITIONAL_ICON1, -1);\n\t\t\t\tif (icon2Id1 > 0) {\n\t\t\t\t\tholder.additionalIcon1 = (ImageView) convertView.findViewById(icon2Id1);\n\t\t\t\t}\n\t\t\t\tint icon2Id2 = idHolder.getIntExtra(IconListIdHolder.KEY_ADDITIONAL_ICON2, -1);\n\t\t\t\tif (icon2Id2 > 0) {\n\t\t\t\t\tholder.additionalIcon2 = (ImageView) convertView.findViewById(icon2Id2);\n\t\t\t\t}\n\t\t\t\tconvertView.setTag(holder);\n\t\t\t} else {\n\t\t\t\t// Get the ViewHolder back to get fast access to the TextView\n\t\t\t\t// and the ImageView.\n\t\t\t\tholder = (ViewHolder) convertView.getTag();\n\t\t\t}\n\n\t\t\t// Bind the data efficiently with the holder\n\t\t\tholder.lineHead.setText(bean.getHead());\n\t\t\tholder.lineBody.setText(bean.getBody());\n\t\t\tint iconId = bean.getIconId();\n\t\t\tif (idHolder.getLineIconId() > 0 && iconId > 0) {\n\t\t\t\tholder.lineIcon.setImageResource(iconId);\n\t\t\t} else {\n\t\t\t\tholder.lineIcon.setImageResource(0);\n\t\t\t}\n\t\t\tint icon2 = bean.getIntExtra(IconListBean.KEY_ADDITIONAL_ICON1, -1);\n\t\t\tif (holder.additionalIcon1 != null) {\n\t\t\t\tif (icon2 > 0) {\n\t\t\t\t\tholder.additionalIcon1.setImageResource(icon2);\n\t\t\t\t} else {\n\t\t\t\t\tholder.additionalIcon1.setImageResource(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tint icon3 = bean.getIntExtra(IconListBean.KEY_ADDITIONAL_ICON2, -1);\n\t\t\tif (holder.additionalIcon2 != null) {\n\t\t\t\tif (icon3 > 0) {\n\t\t\t\t\tholder.additionalIcon2.setImageResource(icon3);\n\t\t\t\t} else {\n\t\t\t\t\tholder.additionalIcon2.setImageResource(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn convertView;\n\t\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View listItemView = convertView;\n\n if (listItemView == null) {\n listItemView = LayoutInflater.from(getContext()).inflate(\n R.layout.seller_product_layout, parent, false);\n }\n\n //Find the item at the given position in the list of items\n Item currentItem = (Item) getItem(position);\n\n ImageView image = (ImageView) listItemView.findViewById(R.id.image);\n\n if(image!=null){\n Glide.with(getContext()).load(currentItem.getmImageUrl()).into(image);\n }\n\n TextView type = (TextView) listItemView.findViewById(R.id.type_seller);\n type.setText(currentItem.getType());\n\n TextView pricepd = (TextView) listItemView.findViewById(R.id.ppd);\n pricepd.setText(String.valueOf(currentItem.getPayPerDay()));\n\n TextView deposit = (TextView) listItemView.findViewById(R.id.deposit);\n deposit.setText(String.valueOf(currentItem.getDeposit()));\n\n TextView description = (TextView) listItemView.findViewById(R.id.description);\n description.setText(String.valueOf(currentItem.getProductinfo()));\n\n TextView fromdate = (TextView) listItemView.findViewById(R.id.fromdate);\n fromdate.setText(String.valueOf(currentItem.getFromdate()));\n\n TextView todate = (TextView) listItemView.findViewById(R.id.todate);\n todate.setText(String.valueOf(currentItem.getTodate()));\n\n// TextView rating = (TextView) listItemView.findViewById(R.id.rating);\n// if(rating!=null){\n// rating.setText(currentItem.getType());\n// }\n\n //Return the list item view that is now showing the appropriate data\n return listItemView;\n\n }",
"@Override\n public View getView(int position, View ConvertView, ViewGroup parent){ ///position starts from zero,one and goes on, parent would be the layout we want to display all elements\n View row=ConvertView; //to optimize we inflate the item only first else we recycle the view using converterView\n if(row==null) {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n //**View of which we want to convert to java view object\n row = inflater.inflate(R.layout.single_row, parent, false);\n }\n //*****From row view we can access the view items and populate it data\n ImageView imageView = (ImageView)row.findViewById(R.id.imageView);\n TextView myDiscription=(TextView)row.findViewById(R.id.myDescription);\n TextView myTitle=(TextView)row.findViewById(R.id.mytitle);\n\n imageView.setImageResource(images[position]); //postion will incremented automaticlly as views will populate\n myDiscription.setText(description[position]);\n myTitle.setText(titles[position]);\n\n return row;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n // Check if the existing view is being reused, otherwise inflate the view\n View listItemView = convertView;\n if (listItemView == null) {\n listItemView = LayoutInflater.from(getContext()).inflate(\n R.layout.list_item, parent, false);\n\n }\n\n // Get the {@link Book} object located at this position in the list\n Book currentBook = getItem(position);\n\n // Find the TextView in the list_item.xml file with the ID title\n TextView titleTextView = (TextView) listItemView.findViewById(R.id.title);\n\n // Get the current Title from the Book object and set it on this TextView\n titleTextView.setText(currentBook.getTitle());\n\n // Find the TextView in the list_item.xml file with the ID author\n TextView authorTextView = (TextView) listItemView.findViewById(R.id.author);\n\n // Get the current author from the Book object and set it on this TextView\n authorTextView.setText(\"by: \" + currentBook.getAuthor());\n\n // Return the whole list item layout (Containing 2 TextViews)\n // so that it can be shown in the ListView\n return listItemView;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) \n {\n TextView text = (TextView)super.getView(position, convertView, parent);\n text.setTypeface(MainActivity.pixelFont);\n\t\treturn text;\n }",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\n\t\tLayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\tView rowView = inflater.inflate(R.layout.listview_item, parent, false);\n\t\tTextView bookTile = (TextView) rowView.findViewById(R.id.book_title);\n\t\tTextView timeStamp = (TextView) rowView.findViewById(R.id.time_stamp);\n\t\tImageView bookCover = (ImageView) rowView.findViewById(R.id.image);\n\t\t\n\t\tObject cur_obj = objects.get(position);\n\t\tBookDataContainer cur_book = (BookDataContainer) cur_obj;\n\t\t\n\t // Set the timestamp in the listview \n\t\ttimeStamp.setText(cur_book.time_stamp);\n\t\t \n\t\t// Set the book title in the listview \n\t\tbookTile.setText(cur_book.title);\n\t\t\n\t\t// Set the image \n\t\tLoadImageFromURL setImage = new LoadImageFromURL(cur_book.image_url,bookCover);\n\t\tsetImage.execute();\n\t\t\n\t\treturn rowView;\n\t}",
"@NonNull\n @Override\n public View getView(int position, View convertView, @NonNull ViewGroup parent) {\n return getCustomView(position, convertView, parent);\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n ViewHolder viewHolder = new ViewHolder();\n if (convertView == null) {\n convertView = inflate.inflate(R.layout.adapter_audititems_item, null, true);\n }\n\n viewHolder.title_category = (TextView) convertView.findViewById(R.id.title_category);\n viewHolder.txt_rightarrow = (TextView) convertView.findViewById(R.id.txt_rightarrow);\n viewHolder.txt_rightarrow.setText(R.string.rightarrow);\n Helper.getTypeFace(context, context.getString(R.string.contentfontname), viewHolder.title_category);\n Helper.getTypeFace(context, context.getString(R.string.fontawsome), viewHolder.txt_rightarrow);\n\n AuditItems productCnsts = (AuditItems) catCnstsArrayList.get(position);\n viewHolder.title_category.setText(productCnsts.getLoc_name());\n\n\n return convertView;\n }",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t// Take the data source at position (i.e 0)\n\t\t// get data items\n\t\tInstagramModel igModel = getItem(position);\n\t\t\n\t\t// check if we are using a recycled view\n\t\tif (convertView == null) {\n\t\t\t// if not using recycled view, create it\n\t\t\t// LayoutInflater.from(<arg1>, <arg2>, <arg3>)\n\t\t\t// getContext() == returning the activity instance within the adapter\n\t\t\t// R.layout.item_photo == to which XML template we want to inflate\n\t\t\t// parent == listView itself\n\t\t\t// false == not to attach yet, will attach when ready\n\t\t\tconvertView = LayoutInflater.from(getContext()).inflate(R.layout.item_photo, parent, false);\t\n\t\t}\n\t\t\n\t\t// Lookup the subview within the template\n\t\tTextView tvCaption = (TextView) convertView.findViewById(R.id.tvCaption);\n\t\tTextView tvUN\t= (TextView) convertView.findViewById(R.id.tvUN);\n\t\tTextView tvLikesCount = (TextView) convertView.findViewById(R.id.tvLikesCount);\n\t\tTextView tvPostedTime = (TextView) convertView.findViewById(R.id.tvPostedTime);\n//\t\tTextView tvComment = (TextView) convertView.findViewById(R.id.tvComment);\n\t\tImageView imgPhoto = (ImageView) convertView.findViewById(R.id.imgPhoto);\n//\t\tCircularImageView imgProfile = (CircularImageView) convertView.findViewById(R.id.imgUN);\n\t\tImageView imgProfile = (ImageView) convertView.findViewById(R.id.imgUN);\n\t\t\n\t\t// populate the subviews (textfield, imageview) with the correct data\n\t\tSpanned UNColor = Html.fromHtml(\"<font color=\\\"#206199\\\"><b>\" + igModel.usernmae + \"</b></font><font color=\\\"#000000\\\"></font>\");\n\t\ttvCaption.setText(UNColor + \" \" + igModel.caption);\n\t\ttvUN.setText(UNColor);\n\t\ttvPostedTime.setText(setToDays(igModel.postedTime));\n//\t\ttvComment.setText(igModel.commentUser + \" \" + igModel.comment);\n\t\ttvLikesCount.setText(Html.fromHtml(\"<font color=\\\"#206199\\\"><b>\" + igModel.likesCount + \" likes\" + \" \" + \"</b></font><font color=\\\"#000000\\\"></font>\"));\n\t\t// set image height before loading\n//\t\timgPhoto.getLayoutParams().height = igModel.imageHeight;\n\t\t// reset images from recycled view\n\t\timgPhoto.setImageResource(0);\n\t\t// ask for photo to be added to imageview based on the photo url\n\t\t// BACKGROUND: send a network request to url, download image bytes, convert into bitmap, resizing image, insert bitmap into imageview\n\t\t// now using \"picasso\" library\n\t\tPicasso.with(getContext()).load(igModel.imageUrl).into(imgPhoto);\n\t\tPicasso.with(getContext()).load(igModel.imageProfile).into(imgProfile);\n\t\t\n\t\t// return the view for that data item\n\t\treturn convertView;\n\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View vi = super.getView(position, convertView, parent);\n \n // change the background color if book is lent out.\n if (isEnabled(position)) {\n vi.setBackgroundResource(android.R.color.background_light);\n } else {\n vi.setBackgroundResource(android.R.color.darker_gray);\n }\n\n return vi;\n }",
"public View getView(int position, View convertView, ViewGroup parent) {\n\t\t TextView tv;\n\t\t \n//\t\t \n\t\t if (convertView == null) {\n\t\t tv = new TextView(mContext);\n\t\t if(v==1)\n\t\t {\n\t\t tv.setLayoutParams(new GridView.LayoutParams(70, 30));\n\t\t }\n\t\t else if(v==2)\n\t\t {\n\t\t \t tv.setLayoutParams(new GridView.LayoutParams(100, 30));\n\t\t }\n\t\t }\n\t\t else {\n\t\t tv = (TextView) convertView;\n\t\t }\n\n\t\t tv.setText(grddispitems[position]);\n\t\t \n\t\t return tv;\n\n\t\t }",
"@Override\r\n\t\tpublic View newView(Context arg0, Cursor arg1, ViewGroup arg2) {\n\t\t\t\t LayoutInflater inflater = LayoutInflater.from(arg2.getContext());\r\n\t\t\t View retView = inflater.inflate(R.layout.report_listitems, arg2, false);\r\n\t\t\t int j=i%2;\r\n\t\t\t retView.setBackgroundColor(colors[j]);\r\n\t\t\t i++;\r\n\t\t\t bindView(retView,arg0,arg1);\r\n\t\t\t return retView;\r\n\t\t\t \r\n\t\t}",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\tViewHolder holder;\n\t\t// Recycle existing view if passed as parameter\n\t\t// This will save memory and time on Android\n\t\t// This only works if the base layout for all classes are the same\n\t\tView rowView = convertView;\n\t\tif (rowView == null) {\n\t\t\tLayoutInflater inflater = context.getLayoutInflater();\n\t\t\trowView = inflater.inflate(R.layout.about_screen_item, null, true);\n\t\t\tholder = new ViewHolder();\n\t\t\t\n\t\t\tholder.image = (ImageView) rowView.findViewById(R.id.AS_item_image);\n\t\t\tholder.label = (TextView) rowView.findViewById(R.id.AS_item_label);\n\t\t\tholder.subtext = (TextView) rowView.findViewById(R.id.AS_item_subtext);\n\t\t\t\n\t\t\trowView.setTag(holder);\n\t\t} else {\n\t\t\tholder = (ViewHolder) rowView.getTag();\n\t\t}\n\n\n\t\tif (items.get(position).getType().equals(\"email\")){\n\t\t\tholder.image.setImageDrawable(context.getResources().getDrawable(R.drawable.email));\n\t\t}\n\t\telse if (items.get(position).getType().equals(\"link\")){\n\t\t\tholder.image.setImageDrawable(context.getResources().getDrawable(R.drawable.link));\n\t\t}\n\t\t\n\t\tholder.label.setText(items.get(position).getLabel());\n\t\tholder.subtext.setText(items.get(position).getSubtext());\n\t\t\n\t\treturn rowView;\n\t}",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tView v = convertView;\n\t\tif (v == null) {\n\t\t\tLayoutInflater inflater = (LayoutInflater)getContext().getSystemService(Service.LAYOUT_INFLATER_SERVICE);\n\t\t\tv = inflater.inflate(R.layout.rss_item, null);\n\t\t}\n\t\tTextView tvTitle = (TextView)v.findViewById(R.id.tvTitle);\n\t\tTextView tvSummary = (TextView)v.findViewById(R.id.tvSummary);\n\t\tRSSItem item = this.getItem(position);\n\t\ttvTitle.setText(item.getTitle());\n\t\ttvSummary.setText(item.getDescription());\n\t\treturn v;\n\t}",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tViewHold viewHold = null;\n\t\t\tif (convertView == null) {\n\t\t\t\tconvertView = View.inflate(mContext,\n\t\t\t\t\t\tR.layout.quickstartprefixlayoutitem, null);\n\t\t\t\tviewHold = new ViewHold();\n\t\t\t\tviewHold.item_icon = (ImageView) convertView\n\t\t\t\t\t\t.findViewById(R.id.prefix_item_icon);\n\t\t\t\tviewHold.item_text = (TextView) convertView\n\t\t\t\t\t\t.findViewById(R.id.prefix_item_title);\n\t\t\t\tviewHold.item_radioButton = (RadioButton) convertView\n\t\t\t\t\t\t.findViewById(R.id.prefix_item_radio);\n\t\t\t\tviewHold.item_radioButton.setClickable(false);\n\t\t\t\tconvertView.setTag(viewHold);\n\t\t\t} else {\n\t\t\t\tviewHold = (ViewHold) convertView.getTag();\n\t\t\t}\n\t\t\tString componentName = FingerprintData.getFingerQuickApplication(\n\t\t\t\t\tmContext, mFingerId);\n\t\t\tif(componentName == null){\n\t\t\t\tcomponentName = \"\";\n\t\t\t}\n\t\t\tLog.e(\"fuck\", \"--------->componentName = \" + componentName);\n\t\t\tswitch (position) {\n\t\t\tcase ITEM_UNLOCK:\n\t\t\t\tviewHold.item_icon\n\t\t\t\t\t\t.setImageResource(R.drawable.ftp_quick_unlock);\n\t\t\t\tviewHold.item_text\n\t\t\t\t\t\t.setText(R.string.ftp_quick_start_setting_item_unlock);\n\t\t\t\tviewHold.item_radioButton.setVisibility(View.VISIBLE);\n\t\t\t\tbreak;\n\t\t\tcase ITEM_CAMERA:\n\t\t\t\tviewHold.item_icon\n\t\t\t\t\t\t.setImageResource(R.drawable.ftp_quick_camera);\n\t\t\t\tviewHold.item_text\n\t\t\t\t\t\t.setText(R.string.ftp_quick_start_setting_item_flashshot);\n\t\t\t\tviewHold.item_radioButton.setVisibility(View.VISIBLE);\n\t\t\t\tbreak;\n\t\t\tcase ITEM_WEICHAT:\n\t\t\t\tviewHold.item_icon\n\t\t\t\t\t\t.setImageResource(R.drawable.ftp_quick_mm);\n\t\t\t\tviewHold.item_text\n\t\t\t\t\t\t.setText(R.string.ftp_quick_start_setting_item_wechat);\n\t\t\t\tviewHold.item_radioButton.setVisibility(View.VISIBLE);\n\t\t\t\tbreak;\n\t\t\tcase ITEM_MORE:\n\t\t\t\tviewHold.item_icon\n\t\t\t\t\t\t.setImageResource(R.drawable.ftp_quick_more);\n\t\t\t\tviewHold.item_text\n\t\t\t\t\t\t.setText(R.string.ftp_quick_start_setting_item_more);\n\t\t\t\t//viewHold.item_radioButton.setVisibility(View.GONE);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (mIsDefaultMode) {\n\t\t\t\tif ((componentName.equals(FingerprintData.ITEM_LOCK)) && (position == ITEM_UNLOCK)) {\n\t\t\t\t\tviewHold.item_radioButton.setChecked(true);\n\t\t\t\t\tmCurSelectPosition = position;\n\t\t\t\t} else if (componentName.equals(FingerprintData.ITEM_CAMERA) && (position == ITEM_CAMERA)) {\n\t\t\t\t\tviewHold.item_radioButton.setChecked(true);\n\t\t\t\t\tmCurSelectPosition = position;\n\t\t\t\t} else if (componentName.equals(FingerprintData.ITEM_WECHART)\n\t\t\t\t\t\t&& (position == ITEM_WEICHAT)) {\n\t\t\t\t\tviewHold.item_radioButton.setChecked(true);\n\t\t\t\t\tmCurSelectPosition = position;\n\t\t\t\t} else if((!componentName.equals(FingerprintData.ITEM_LOCK)) \n && (!componentName.equals(FingerprintData.ITEM_CAMERA))\n && (!componentName.equals(FingerprintData.ITEM_WECHART))\n && position == ITEM_MORE){\n\t\t\t\t\tviewHold.item_radioButton.setChecked(true);\n\t\t\t\t} else {\n\t\t\t\t\tviewHold.item_radioButton.setChecked(false); \n }\n\t\t\t} else {\n\t\t\t\tif (mCurSelectPosition == position) {\n\t\t\t\t\tviewHold.item_radioButton.setChecked(true);\n\t\t\t\t} else {\n\t\t\t\t\tviewHold.item_radioButton.setChecked(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn convertView;\n\t\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n MatchSummaryUIModel matchSummary = getItem(position);\n // Check if an existing view is being reused, otherwise inflate the view\n if (convertView == null) {\n convertView =\n LayoutInflater.from(getContext()).inflate(\n R.layout.match_summary, parent, false);\n }\n // Lookup view for data population\n // Populate the champion icon view\n Drawable champIcon =\n ImageFetcher.getImage(getContext(), matchSummary.getChampion()\n .getImage());\n ImageView championIconView =\n (ImageView) convertView\n .findViewById(R.id.match_history_champion_icon);\n championIconView.setImageDrawable(champIcon);\n\n // Populate the spell views\n Drawable[] spellIcons = new Drawable[matchSummary.getSpells().length];\n ImageView[] spellIconViews = new ImageView[spellIcons.length];\n for (int i = 0; i < spellIcons.length; i++) {\n spellIcons[i] =\n ImageFetcher.getImage(getContext(),\n matchSummary.getSpells()[i].getImage());\n\n spellIconViews[i] =\n (ImageView) convertView.findViewById(SPELL_VIEWS_ID[i]);\n\n spellIconViews[i].setImageDrawable(spellIcons[i]);\n }\n\n // Populate the multiInfo view\n TextView matchResult =\n (TextView) convertView.findViewById(R.id.match_history_result);\n matchResult.setText(matchSummary.matchResult());\n int matchResultColor =\n matchSummary.getMatch().isWinner() ? Color.GREEN : Color.RED;\n matchResult.setTextColor(matchResultColor);\n\n // multiInfo.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18);\n\n TextView creation =\n (TextView) convertView\n .findViewById(R.id.match_history_creation_time);\n creation.setText(matchSummary.creationTimeToString());\n\n return convertView;\n }",
"@Override\r\n public View getView(int position, View convertView, ViewGroup parent) {\n ViewHolder holder=null;\r\n int who=(Integer)chatList.get(position).get(\"person\");\r\n convertView= LayoutInflater.from(context).inflate(\r\n layout[who==ME?0:1], null);\r\n holder=new ViewHolder();\r\n holder.imageView=(ImageView)convertView.findViewById(to[who*2+0]);\r\n holder.textView=(TextView)convertView.findViewById(to[who*2+1]);\r\n //System.out.println(holder);\r\n //System.out.println(\"WHYWHYWHYWHYW\");\r\n //System.out.println(holder.imageView);\r\n holder.imageView.setBackgroundResource((Integer)chatList.get(position).get(from[0]));\r\n holder.textView.setText(chatList.get(position).get(from[1]).toString());\r\n return convertView;\r\n }",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tif (convertView == null) {\n\t\t\t\tconvertView = LayoutInflater.from(ListActivity.this).inflate(R.layout.item_list, null);\n\t\t\t}\n\t\t\tfinal TextView item = (TextView) convertView.findViewById(R.id.tv_item_list);\n\t\t\titem.setText(BaseData.list.get(position)[1]);\n\t\t\titem.startAnimation(AnimationUtils.loadAnimation(ListActivity.this, R.anim.push_left_in));\n\n\t\t\treturn convertView;\n\t\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n Log.d(TAG, \"getview called\" + position);\n View view = getLayoutInflater().inflate(R.layout.time_slot_layout, parent, false);\n TextView gendername = (TextView) view.findViewById(R.id.time_slot_range);\n gendername.setText(mGenderList.get(position));\n\n // ... Fill in other views ...\n return view;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent){\n\t\tView view;\n \tif(convertView != null)\n \t\tview = convertView;\n \telse\n \t\tview = ((LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE))\n \t\t\t\t\t\t\t\t\t.inflate(R.layout.playlist_item, parent, false);\n \t\n \t((TextView) view.findViewById(R.id.playlist_name)).setText(playlistArray.get(position).name);\n \t\n \treturn view;\n }",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tViewHolder holder;\n\t\t\tif (convertView == null) {\n\t\t\t\tconvertView = View.inflate(MainActivity.this, \n\t\t\t\t\t\tR.layout.demo_list_item, null);\n\t\t\t\tholder = new ViewHolder();\n\t\t\t\tholder.tvLable = (TextView)convertView.findViewById(R.id.label);\n\t\t\t\tholder.tvDesc = (TextView)convertView.findViewById(R.id.desc);\n\t\t\t\tconvertView.setTag(holder);\n\t\t\t} else {\n\t\t\t\tholder = (ViewHolder)convertView.getTag();\n\t\t\t}\n\n\t\t\tholder.tvLable.setText(demos[position].lable);\n\t\t\tholder.tvDesc.setText(demos[position].desc);\n\n\t\t\treturn convertView;\n\t\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n if (list != null) {\n return list.get(position);\n }\n return null;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent){\n View view = super.getView(position, convertView, parent);\n\n // Initialize a TextView for ListView each Item\n TextView tv = (TextView) view.findViewById(android.R.id.text1);\n\n // Set the text color of TextView (ListView Item)\n\n if(lv.isItemChecked(position) == true){\n tv.setBackgroundColor(Color.BLUE);}\n else{tv.setBackgroundColor(Color.TRANSPARENT);}\n for(int p = 0; p < lv.getCount(); p++){\n if(lv.isItemChecked(position) == true){ tv.setBackgroundColor(Color.GREEN);}\n else{tv.setBackgroundColor(Color.TRANSPARENT);}\n }\n\n // Generate ListView Item using TextView\n return view;\n }",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tfinal ViewHolder holder;\n\t\tif (convertView == null) {\n\t\t\tconvertView = mInflater.inflate(R.layout.list_single, null);\n\t\t\tholder = new ViewHolder();\n\t\t\t\n\t\t\tholder.tv_Title = (TextView) convertView.findViewById(R.id.txt);\n\t\t\tholder.imgvw_pic = (ImageView) convertView.findViewById(R.id.img);\n\t\t\t//ad=new AvatarDownloader(mContext);\n\t\t\tmImageLoader=new ImageLoader(mContext);\n\t\t\tmImageLoader.DisplayImage(ArrayList.get(position).GetThumbURL(), ArrayList.get(position).GetTitle(), null, holder.imgvw_pic);\n\t\t\t\n\t\t\tconvertView.setTag(holder);\n\t\t} else {\n\t\t\tholder = (ViewHolder) convertView.getTag();\n\t\t}\n\t\t\n\t\tholder.tv_Title.setText(ArrayList.get(position).GetTitle());\n\t\t\n\t\t\n\t\t\t \t\t\t\t\n\t\treturn convertView;\n\t}",
"public View getView(int position, View convertView, ViewGroup parent) {\n if (convertView == null) {\n // This a new view we inflate the new layout\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n convertView = inflater.inflate(R.layout.book_image, parent, false);\n }\n // Now we can fill the layout with the right values\n tv = (TextView) convertView.findViewById(R.id.item2);\n thumbView = (ImageView) convertView.findViewById(R.id.thumb);\n Book book = arrList.get(position);\n thumbView.setImageBitmap(book.getThumbImg());\n tv.setText(book.getTitle()+\" (\"+book.getAuthor_prenom()+\" \"+book.getAuthor_nom()+\", \"+book.getPublicationyear()+\") nombre emprunts: \"+book.getIssues());\n\n\n return convertView;\n\n }",
"@Override\r\n\t\tpublic View getView (int position, View convertView, ViewGroup parent) {\r\n\t\t\tView view = super.getView(position, convertView, parent);\r\n\t\t\tTextView t1 = (TextView)view.findViewById(R.id.statisticsitem3);\r\n\t\t\t\r\n\t\t\t//Sets the +/- stats to a color of red, black, or black and \"Even\" depending on its value\r\n\t\t\tif(position<5 && position>0 && t1.getText().toString() != \"-\"){\r\n\t\t\t\tif(Double.parseDouble(t1.getText().toString())<0){\r\n\t\t\t\t\tt1.setTextColor(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse if(Double.parseDouble(t1.getText().toString())==0){\r\n\t\t\t\t\tt1.setText(\"Even\");\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tt1.setText(\"+\"+t1.getText());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tt1.setTextColor(Color.BLACK);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Sets the header rows to have a green background with gray bold text\r\n\t\t\tif (position==0 ||\r\n position==5 ||\r\n position==11 ||\r\n position==20 ||\r\n position==32 ||\r\n position==46 ||\r\n position==60){\r\n\t\t\t\tview.setBackgroundColor(0xff347c12);\r\n\t\t\t\t\r\n\t\t\t\tt1 = (TextView)view.findViewById(R.id.statisticsitem1);\r\n\t\t\t\tt1.setTextColor(t2.getTextColors().getDefaultColor());\r\n\t\t\t\tt1.setTypeface(null, Typeface.BOLD);\r\n\t\t\t\t\r\n\t\t\t\tt1 = (TextView)view.findViewById(R.id.statisticsitem2);\r\n\t\t\t\tt1.setTextColor(t2.getTextColors().getDefaultColor());\r\n\t\t\t\tt1.setTypeface(null, Typeface.BOLD);\r\n\t\t\t\t\t\r\n\t\t\t\tt1 = (TextView)view.findViewById(R.id.statisticsitem3);\r\n\t\t\t\tt1.setTextColor(t2.getTextColors().getDefaultColor());\r\n\t\t\t\tt1.setTypeface(null, Typeface.BOLD);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tview.setBackgroundColor(0xffffffff);\r\n\t\t\t\t\r\n\t\t\t\tt1 = (TextView)view.findViewById(R.id.statisticsitem1);\r\n\t\t\t\tt1.setTextColor(0xff000000);\r\n\t\t\t\tt1.setTypeface(null, Typeface.NORMAL);\r\n\t\t\t\t\r\n\t\t\t\tt1 = (TextView)view.findViewById(R.id.statisticsitem2);\r\n\t\t\t\tt1.setTextColor(0xff000000);\r\n\t\t\t\tt1.setTypeface(null, Typeface.NORMAL);\r\n\t\t\t\t\t\r\n\t\t\t\tt1 = (TextView)view.findViewById(R.id.statisticsitem3);\r\n\t\t\t\tif(position>5){\r\n\t\t\t\t\tt1.setTextColor(0xff000000);\r\n\t\t\t\t}\r\n\t\t\t\tt1.setTypeface(null, Typeface.NORMAL);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn view;\r\n\t\t}",
"@Override\r\n\tpublic View getView(int position, View convertView, ViewGroup viewGroup) {\n\t\tItemViewTag item;\r\n\t\tif(convertView == null)\r\n\t\t{\r\n\t\t\tconvertView = infalter.inflate(R.layout.gridview_item,null);\r\n\t\t\titem = new ItemViewTag((ImageView)convertView.findViewById(R.id.grid_icon),(TextView)convertView.findViewById(R.id.grid_name));\r\n\t\t\tconvertView.setTag(item);\r\n\t\t}else\r\n\t\t{\r\n\t\t\titem = (ItemViewTag)convertView.getTag();\r\n\t\t}\r\n\t\titem.icon.setBackgroundDrawable(grid_icons.get(position));\r\n\t\titem.name.setText(grid_names.get(position));\r\n\t\treturn convertView;\r\n\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n // Check if there is an existing list item view (called convertView) that we can reuse,\n // otherwise, if convertView is null, then inflate a new list item layout.\n View listItemView = convertView;\n if (listItemView == null) {\n listItemView = LayoutInflater.from(getContext()).inflate(\n R.layout.article_list_item, parent, false);\n }\n\n // Find the article at the given position in the list of articles\n Article currentArticle = getItem(position);\n\n // Find the TextView with view ID title\n TextView titleView = (TextView) listItemView.findViewById(R.id.title);\n titleView.setSelected(true);\n titleView.setText(currentArticle.getTitle());\n\n // Find the TextView with view ID section\n TextView sectionView = (TextView) listItemView.findViewById(R.id.section);\n sectionView.setText(currentArticle.getSection());\n\n // Find the TextView with view ID author\n TextView authorView = (TextView) listItemView.findViewById(R.id.author);\n // Display the author of the current article in that TextView\n if (TextUtils.isEmpty(currentArticle.getAuthor())) {\n authorView.setText(getContext().getString(R.string.no_author));\n } else {\n authorView.setText(currentArticle.getAuthor());\n }\n\n // Find the TextView with ID publication date\n TextView publicationDateView = (TextView) listItemView.findViewById(R.id.publication_date);\n if (TextUtils.isEmpty(currentArticle.getPublicationDate())) {\n publicationDateView.setText(getContext().getString(R.string.no_publication_date));\n } else {\n publicationDateView.setText(currentArticle.getPublicationDate());\n }\n\n // Return the list item view that is now showing the appropriate data\n return listItemView;\n }",
"@Override\n\tpublic View getView(int arg0, View arg1, ViewGroup arg2) {\n\t\tViewHolder holder;\n\t\tif(arg1==null){\n\t\t\tholder=new ViewHolder();\n\t\t\t\n\t\targ1=mInflater.inflate(R.layout.list_item, null);\n\t\tholder.textView1=(TextView) arg1.findViewById(R.id.id);\n\t\tholder.textView2=(TextView) arg1.findViewById(R.id.id2);\n arg1.setTag(holder);\n\t\t}\n\t\telse{\n\t\t\tholder=(ViewHolder) arg1.getTag();\n\t\t}\n\t\tholder.textView1.setText(arrayList.get(arg0).getId());\n\t\tholder.textView2.setText(arrayList.get(arg0).getName());\n\t\t\n\t\treturn arg1;\n\t}",
"@Override\n\tprotected View getView(int position, View convertView) {\n\t\tif (convertView == null) {\n\t\t\tconvertView = LinearLayout.inflate(context, R.layout.mid_listview,\n\t\t\t\t\tnull);\n\t\t\tviewHolder = new MidViewHolder();\n\t\t\tviewHolder.midname = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.midname);\n\t\t\tviewHolder.middate = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.middate);\n\t\t\tviewHolder.midtitle = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.midtitle);\n\t\t\tviewHolder.midtext = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.midtext);\n\t\t\tconvertView.setTag(viewHolder);\n\n\t\t} else {\n\t\t\tviewHolder = (MidViewHolder) convertView.getTag();\n\t\t}\n\t\tviewHolder.midname.setText(mRssName);\n\t\tviewHolder.middate.setText(mModelRssItems.get(position).getPubdate());\n\t\tviewHolder.midtitle\n\t\t\t\t.setText(mModelRssItems.get(position).getNewstitle());\n\n\t\tif (mModelRssItems.get(position).isIsread()) {\n\t\t\tviewHolder.midtitle\n\t\t\t\t\t.setTextAppearance(context, R.style.styleHasRead);\n\t\t} else {\n\t\t\tviewHolder.midtitle.setTextAppearance(context, R.style.customstyle);\n\t\t}\n\n\t\tviewHolder.midtext.setText(mModelRssItems.get(position).getCategory());\n\t\treturn convertView;\n\t}",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tViewHolder holder1 = null;\n\t\tViewHolder holder2 = null;\n\t\tint type = getItemViewType(position);\n\t\tif (convertView == null) {\n\t\t\tswitch (type) {\n\t\t\tcase (TYPE_1): {\n\t\t\t\tconvertView = mInflater.inflate(\n\t\t\t\t\t\tR.layout.other_setting_item_list, null);\n\t\t\t\tholder1 = new ViewHolder();\n\t\t\t\tholder1.itemName = (TextView) convertView\n\t\t\t\t\t\t.findViewById(R.id.item_name);\n\t\t\t\tholder1.itemSetting = (EditText) convertView\n\t\t\t\t\t\t.findViewById(R.id.item_setting);\n\t\t\t\tholder1.pageLeft = (ImageView) convertView\n\t\t\t\t\t\t.findViewById(R.id.page_left);\n\t\t\t\tholder1.pageRight = (ImageView) convertView\n\t\t\t\t\t\t.findViewById(R.id.page_right);\n\n\t\t\t\tconvertView.setTag(holder1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase (TYPE_2): {\n\t\t\t\tconvertView = mInflater.inflate(R.layout.activity_common_list2,\n\t\t\t\t\t\tnull);\n\t\t\t\tholder2 = new ViewHolder();\n\t\t\t\tholder2.itemName = (TextView) convertView\n\t\t\t\t\t\t.findViewById(R.id.item_name);\n\t\t\t\tholder2.pageRight = (ImageView) convertView\n\t\t\t\t\t\t.findViewById(R.id.page_right);\n\t\t\t\tconvertView.setTag(holder2);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tswitch (type) {\n\t\t\tcase TYPE_1: {\n\t\t\t\tholder1 = (ViewHolder) convertView.getTag();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase TYPE_2: {\n\t\t\t\tholder2 = (ViewHolder) convertView.getTag();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tswitch (type) {\n\t\tcase (TYPE_1): {\n\t\t\tif (null != mCommonItemList.get(position).getItemName()) {\n\t\t\t\tholder1.itemName.setText(mCommonItemList.get(position)\n\t\t\t\t\t\t.getItemName());\n\n\t\t\t}\n\t\t\tif (null != mCommonItemList.get(position).getPageLeft()) {\n\t\t\t\tholder1.pageLeft.setImageDrawable(mCommonItemList.get(position)\n\t\t\t\t\t\t.getPageLeft());\n\t\t\t\tholder1.pageLeft.setVisibility(View.VISIBLE);\n\t\t\t\tholder1.itemSetting.setVisibility(View.VISIBLE);\n\n\t\t\t} else {\n\t\t\t\tholder1.pageLeft.setImageDrawable(null);\n\t\t\t\tholder1.pageLeft.setVisibility(View.GONE);\n\t\t\t}\n\t\t\tif (null != mCommonItemList.get(position).getItemSetting()) {\n\t\t\t\t// TODO\n\t\t\t\tholder1.itemSetting.setText(mCommonItemList.get(position)\n\t\t\t\t\t\t.getItemSetting());\n\t\t\t\tholder1.itemSetting.setVisibility(View.VISIBLE);\n\t\t\t} else {\n\t\t\t\tholder1.itemSetting.setText(null);\n\t\t\t\tholder1.itemSetting.setVisibility(View.GONE);\n\t\t\t}\n\t\t\tif (null != mCommonItemList.get(position).getPageRight()) {\n\t\t\t\tholder1.pageRight.setImageDrawable(mCommonItemList\n\t\t\t\t\t\t.get(position).getPageRight());\n\t\t\t\tholder1.pageRight.setVisibility(View.VISIBLE);\n\t\t\t} else {\n\t\t\t\tholder1.pageRight.setImageDrawable(null);\n\t\t\t\tholder1.pageRight.setVisibility(View.GONE);\n\t\t\t}\n\n\t\t\tbreak;\n\t\t}\n\t\tcase (TYPE_2): {\n\t\t\tif (null != mCommonItemList.get(position).getItemName()) {\n\t\t\t\tholder2.itemName.setText(mCommonItemList.get(position)\n\t\t\t\t\t\t.getItemName());\n\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t}\n\n\t\treturn convertView;\n\t}",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\tif (convertView == null) {\n\t\t\tconvertView = inflater.inflate(\n\t\t\t\t\tR.layout.report_module_listview_item, null);\n\t\t\tmViewHolder = new ViewHolder();\n\t\t\tmViewHolder.name_text = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.name);\n\t\t\tmViewHolder.content_text = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.content);\n\t\t\tmViewHolder.value_text = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.value);\n\t\t\tmViewHolder.unit_text = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.unit);\n\t\t\tmViewHolder.stateImage = (ImageView) convertView\n\t\t\t\t\t.findViewById(R.id.state_image);\n\t\t\tmViewHolder.time_text = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.time);\n\t\t\tconvertView.setTag(mViewHolder);\n\t\t} else {\n\t\t\tmViewHolder = (ViewHolder) convertView.getTag();\n\t\t}\n\n\t\tJsonBase measureinfo = mMeasuresinfoes.get(position);\n\t\tString timeStamp = \"\";\n\t\tString content = \"\";\n\t\tString tittle = \"\";\n\t\tString value = \"\";\n\t\tString unit = \"\";\n\t\tboolean bIsAbnormal = false;\n\t\tif (measureinfo instanceof EcgInfoBean) {\n\t\t\tEcgInfoBean ecgInfo = (EcgInfoBean) measureinfo;\n\t\t\ttimeStamp = TimeFormatUtil.turnDateFormat(ecgInfo.mTimeStamp\n\t\t\t\t\t.substring(0, 8));\n\t\t\ttimeStamp = timeStamp\n\t\t\t\t\t+ \" \"\n\t\t\t\t\t+ TimeFormatUtil.turnTimeFormat(ecgInfo.mTimeStamp\n\t\t\t\t\t\t\t.substring(8, 12));\t\t\t\n\t\t\ttimeStamp = TimeFormatUtil.ecgOrBppShowTime(timeStamp);\n\t\t\t\n\t\t\tif (!ecgInfo.bIsNormal) {\n\t\t\t\tbIsAbnormal = true;\n\t\t\t}\n\t\t\ttittle = mActivity.getResources().getString(\n\t\t\t\t\tR.string.title_xindian_report);\n\t\t\tcontent = \"平均心率: \";\n\t\t\tvalue = \"\" + ecgInfo.mHeartRate;\n\t\t\tunit = \"bpm\";\n\t\t}\n\t\tif (measureinfo instanceof PpgInfoBean) {\n\t\t\tPpgInfoBean ppgInfo = (PpgInfoBean) measureinfo;\n\n\t\t\ttimeStamp = TimeFormatUtil.turnDateFormat(ppgInfo.mTimeStamp\n\t\t\t\t\t.substring(0, 8));\n\t\t\ttimeStamp = timeStamp\n\t\t\t\t\t+ \" \"\n\t\t\t\t\t+ TimeFormatUtil.turnTimeFormat(ppgInfo.mTimeStamp\n\t\t\t\t\t\t\t.substring(8, 12));\t\t\t\n\t\t\ttimeStamp = TimeFormatUtil.ecgOrBppShowTime(timeStamp);\n\t\t\t\n\t\t\tif (!ppgInfo.bIsNormal) {\n\t\t\t\tbIsAbnormal = true;\n\t\t\t}\n\t\t\ttittle = mActivity.getResources().getString(\n\t\t\t\t\tR.string.title_maibo_report);\n\t\t\tcontent = \"平均脉率: \";\n\t\t\tvalue = \"\" + ppgInfo.mPulserate;// 平均脉率的数值\n\t\t\tunit = \"bpm\";\n\t\t}\n\t\tif (measureinfo instanceof BsInfoBean) {\n\t\t\tBsInfoBean bsInfo = (BsInfoBean) measureinfo;\n\t\t\ttimeStamp = bsInfo.mTimeStamp;\t\t\t\n\t\t\ttimeStamp = TimeFormatUtil.bsOrBpShowTime(timeStamp);\n\t\t\ttittle = mActivity.getResources().getString(\n\t\t\t\t\tR.string.title_xuetang_report);\n\t\t\tcontent = \"血糖: \";\n\t\t\tvalue = \"\" + bsInfo.mLimosis;\n\t\t\tunit = \"mmol/L\";\n\t\t\tif (!bsInfo.bIsNormal) {\n\t\t\t\tbIsAbnormal = true;\n\t\t\t}\n\t\t}\n\t\tif (measureinfo instanceof BpInfoBean) {\n\t\t\tBpInfoBean bpInfo = (BpInfoBean) measureinfo;\n\t\t\ttimeStamp = bpInfo.mTimeStamp;\n\t\t\ttimeStamp = TimeFormatUtil.bsOrBpShowTime(timeStamp);\n\t\t\ttittle = mActivity.getResources().getString(\n\t\t\t\t\tR.string.title_xueya_report);\n\t\t\tcontent = \"血压: \";\n\t\t\tvalue = \"\" + bpInfo.mSleepSpb;\n\t\t\tunit = \"mmHg\";\n\t\t\tif (!bpInfo.bIsNormal) {\n\t\t\t\tbIsAbnormal = true;\n\t\t\t}\n\t\t}\n\n//\t\t// 因为第一根线超过了圆圈头部,所以需要将它的纵坐标设置一下\n//\t\tif (position == 0) {\n//\t\t\tfloat yValue = mActivity.getResources().getDimensionPixelSize (\n//\t\t\t\t\tR.dimen.line_image_set_Y);\n//\t\t\tmViewHolder.lineImage.setY(yValue);\n//\t\t} else {\n//\t\t\tmViewHolder.lineImage.setY(0);\n//\t\t}\n\t\tmViewHolder.name_text.setText(tittle);\n\t\tmViewHolder.content_text.setText(content);\n\t\tmViewHolder.value_text.setText(value);\n\t\tmViewHolder.unit_text.setText(unit);\n\t\tif (bIsAbnormal) {\n\t\t\tmViewHolder.stateImage.setImageResource(R.drawable.abnormal);\n\t\t} else {\n\t\t\tmViewHolder.stateImage.setImageResource(R.drawable.normal);\n\t\t}\n\t\tmViewHolder.time_text.setText(timeStamp);\n\t\tsetListViewTextSize();\n\t\treturn convertView;\n\t}",
"@Override\n\t public View getView(int position, View convertView, ViewGroup parent) {\n\t ViewHolder view;\n\t LayoutInflater inflator = activity.getLayoutInflater();\n\t \n\t if(convertView==null)\n\t {\n\t view = new ViewHolder();\n\t convertView = inflator.inflate(R.layout.gridview_row, null);\n\t \n\t view.imgView = (ImageView) convertView.findViewById(R.id.imageView1);\n\t \n\t convertView.setTag(view);\n\t }\n\t else\n\t {\n\t view = (ViewHolder) convertView.getTag();\n\t }\n\t view.imgView.setImageDrawable(listImg.get(position));\n\t \n\t return convertView;\n\t }",
"@Override\n public View getView(int position, View convertView, @NonNull ViewGroup parent) {\n TextView textView = (TextView) super.getView(position, convertView, parent);\n textView.setTextColor(Color.WHITE);\n return textView;\n }",
"@Override\n\tpublic View getView(int arg0, View arg1, ViewGroup arg2) {\n\t\tListItem item=list.get(arg0);\n\t\tViewHolder holder=null;\n\t\tif(arg1==null){\n\t\t\tholder=new ViewHolder();\n\t\t\n\t\t\targ1=LayoutInflater.from(context).inflate(R.layout.layout_item, null);\t\n\t\t\tholder.ll=(LinearLayout)arg1;\n\t\t\targ1.setTag(holder);\n\t\t}else{\n\t\t\tholder=(ViewHolder)arg1.getTag();\n\t\t}\n\t\tList<Stories> stories=item.getList();\n\t\tTextView date=(TextView)holder.ll.findViewById(R.id.textView);\n\t\tLinearLayout l=(LinearLayout)holder.ll.findViewById(R.id.container);\n\t\tdate.setText(item.getDate());\n\t\tl.removeAllViews();\n\n\t\tfor(int i=0;i<stories.size();i++){\n\t\t\tfinal Stories s=stories.get(i);\n\t\t\tView v=LayoutInflater.from(context).inflate(R.layout.news_layout, null);\n\t\t\tv.setOnClickListener(new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tIntent intent=new Intent(context,TextActivity.class);\n\t\t\t\t\tintent.putExtra(\"ID\", s.getId());\n\t\t\t\t\tcontext.startActivity(intent);\n\t\t\t\t}\n\t\t\t});\n\t\t\tTextView tv=(TextView)v.findViewById(R.id.tvTitle);\n\t\t\ttv.setText(s.getTitle());\n\t\t\tImageView iv=(ImageView)v.findViewById(R.id.ivTitle);\n\t\t\tString url = s.getImages().replace(\"\\\\\", \"\");\n\t\t\t\n\t\t\tImageLoaderUtil.display(url, iv);\n\t\t\tl.addView(v);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\treturn arg1;\n\t}",
"@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\t\tViewHolder viewHolder;\n\t\t\tAVTravelDiary avTravelDiary = diaries.get(position);\n\t\t\tif(null == convertView) {\n\t\t\t\tviewHolder = new ViewHolder();\n\t\t\t\tconvertView = LayoutInflater.from(parentAct).inflate(R.layout.item_diary_list,null);\n\t\t\t\tviewHolder.coverImageView = (ImageView) convertView.findViewById(R.id.diary_cover_imageview);\n\t\t\t\tviewHolder.baseInfoTextView = (TextView) convertView.findViewById(R.id.diary_base_info_tv);\n\t\t\t\tviewHolder.headlineTextView = (TextView) convertView.findViewById(R.id.diary_headline_tv);\n\t\t\t\tviewHolder.praiseTimesTextView = (TextView) convertView.findViewById(R.id.praise_times_tv);\n\t\t\t\tviewHolder.userNicknameTextView = (TextView) convertView.findViewById(R.id.user_nickname_tv);\n\t\t\t\tconvertView.setTag(viewHolder);\n\t\t\t}\n\n\t\t\tviewHolder = (ViewHolder) convertView.getTag();\n\t\t\tviewHolder = (ViewHolder) convertView.getTag();\n\t\t\tviewHolder.headlineTextView.setText(avTravelDiary.getHeadline());\n\t\t\tviewHolder.baseInfoTextView.setText(getDiaryBaseInfo(avTravelDiary));\n\t\t\tviewHolder.praiseTimesTextView.setText(avTravelDiary.getPraiseTimes()+\"\");\n\t\t\tcom.nostra13.universalimageloader.core.ImageLoader.getInstance().displayImage(avTravelDiary.getCover().getUrl(), viewHolder.coverImageView, ImageLoaderOptionsSetting.getConstantImageLoaderDefaultOptions());\n\t\t\tAVBaseUserInfo avBaseUserInfo = avTravelDiary.getAuthorBaseInfo();\n\t\t\tif(null != avBaseUserInfo)\n\t\t\t\tviewHolder.userNicknameTextView.setText(avBaseUserInfo.getNickname());\n\t\t\treturn convertView;\n\t\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View listItem = convertView;\n if (listItem == null) {\n listItem = layoutInflater.inflate(R.layout.listview_articoli_circolari, null);\n }\n\n LayoutObjs_listview_articoli_circolari_xml LAYOUT_OBJs;\n LAYOUT_OBJs = new LayoutObjs_listview_articoli_circolari_xml(listItem);\n // Initialize the views in the layout\n ImageView iv = LAYOUT_OBJs.image;\n TextView textView_info_circolare = LAYOUT_OBJs.textView_info_circolare;\n TextView textView_oggetto = LAYOUT_OBJs.textView_oggetto;\n TextView textView_tag = LAYOUT_OBJs.textView_tag;\n\n final ArticoloSdo<ArticoloDetailsCircolare> c = this.articoliCircolari.articoli.get(position);\n final ArticoloDetailsCircolare circolare = c.getDetails();\n\n textView_info_circolare.setText(\"Circolare n.\" + circolare.numeroCircolare + \" del \" + C_DateUtil.toDDMMYYY(circolare.dataCircolare));\n textView_oggetto.setText(circolare.oggetto);\n\n StringBuilder sb = new StringBuilder();\n for (ArticoloTagDetails tag : c.getDetails().getTags()) {\n sb.append(\" \").append(tag.getTag());\n }\n textView_tag.setText(sb.toString().trim());\n\n return listItem;\n }",
"public View getView(int position, View convertView, ViewGroup parent) {\n \t Log.i(TAG, \"starting getView position = \" + position );\n \t \n \t //check to see if it's time to add another batch, if so do\n \t addAnotherBatch(position);\n \n //Sets the current item to be referenced by other classes in the provider\n \t provide.setCurItem(position);\n \n \t //clears focus from like or dislike buttons\n \t dislikeb.setFocusableInTouchMode(false);\n \t likeb.setFocusableInTouchMode(false);\n \t dislikeb.clearFocus();\n \t likeb.clearFocus();\n \t \n //Sets up the landscape based on Current item\n setLandscapeName();\n setLandscapePrice();\n \n Log.i(TAG, \"User name \" + provide.getCurUser().getName());\n Log.i(TAG, \"User id \" + provide.getCurUser().getID());\n \n \n //Sets the view context image\n ImageView i = new ImageView(mContext);\n Log.i(TAG,\"GetbitmapfromURL item namae \" + provide.getCurItem().getName());\n Bitmap bimage = getBitmapFromURL(provide.getCurItem().getImageFileString());\n i.setImageBitmap(bimage);\n i.setAdjustViewBounds(true);\n i.setMaxHeight(499);\n i.setMinimumHeight(499);\n\n //scales the images accordingly\n i.setPadding(50, 0, 50, 0);\n i.setScaleType(ImageView.ScaleType.FIT_XY);\n \n Log.i(TAG, \"bitmap width\"+bimage.getWidth());\n \n \n //Set landscape or portrait gallery/image size\n Gallery.LayoutParams galayout;\n if(mContext.getResources().getConfiguration().orientation==Configuration.ORIENTATION_LANDSCAPE){\n \t galayout = new Gallery.LayoutParams(300,LayoutParams.MATCH_PARENT);\n }\n else{\n \t galayout = new Gallery.LayoutParams(LayoutParams.MATCH_PARENT, 499);\n }\n i.setLayoutParams(galayout);\n\n //sets the border\n i.setBackgroundColor(R.color.white);\n\n return i;\n }",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tShopListHolder holder;\n\t\tif (convertView == null) {\n\t\t\tconvertView = mInflater.inflate(R.layout.item_shoplistview, null);\n\t\t\tholder = new ShopListHolder();\n\t\t\tholder.shopImageView = (ImageView)convertView.findViewById(R.id.shopsImageView);\n\t\t\tholder.shopOneFlagImageView = (ImageView)convertView.findViewById(R.id.shopsFlagImageView);\n\t\t\tholder.shopTwoFlagImageView = (ImageView)convertView.findViewById(R.id.shopsTwoFlagImageView);\n\t\t\tholder.shopTitleTextView = (TextView)convertView.findViewById(R.id.shopTitleTextView);\n\t\t\tholder.shopLevelRatingBar = (RatingBar)convertView.findViewById(R.id.ratingBar);\n\t\t\tholder.shopDistanceTextView = (TextView)convertView.findViewById(R.id.distanceTextView);\n\t\t\tholder.shopFreeSendLimitTextView = (TextView)convertView.findViewById(R.id.freeSendLimitTextView);\n\t\t\tholder.shopSendTimeTextView = (TextView)convertView.findViewById(R.id.sendTimeTextView);\n\t\t\tconvertView.setTag(holder);\n\t\t}\n\t\telse {\n\t\t\tholder = (ShopListHolder)convertView.getTag();\n\t\t}\n\t\timageLoader.displayImage(mListData.get(position).getPicture(), holder.shopImageView, SSMHelper.displayOptions());\n\t\tholder.shopTitleTextView.setText(mListData.get(position).getName());\n\t\tholder.shopLevelRatingBar.setRating(mListData.get(position).getLevel());\n\t\tif (mListData.get(position).getDistance() > 1000) {\n\t\t\tdouble dis = mListData.get(position).getDistance()/1000;\n\t\t\tholder.shopDistanceTextView.setText(String.valueOf(dis) + \"公里\");\n\t\t}\n\t\telse {\n\t\t\tholder.shopDistanceTextView.setText(String.valueOf(mListData.get(position).getDistance())+\"米\");\n\t\t}\n\t\t\n\t\tholder.shopFreeSendLimitTextView.setText(\"满\"+String.valueOf(mListData.get(position).getSendLimit())+\n\t\t\t\t\"元免\"+String.valueOf(mListData.get(position).getSendFee())+\"元配送费\");\n\t\tholder.shopSendTimeTextView.setText(mListData.get(position).getSendTime()+\"分钟\");\n\n\t\treturn convertView;\n\t}",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tif (convertView == null)\n\t\t{\n\t\t\t// first time through, map it into a new view holder\n\t\t\tLayoutInflater vi = (LayoutInflater)Context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\tconvertView = vi.inflate(R.layout.listadapter_event, null);\n\n\t\t\t// create our ViewHolder to cache the views for this row\n\t\t\tViewHolder = new ViewHolder();\n\n\t\t\t// cache the views for this line\n\t\t\tViewHolder.textViewDetails = (TextView)convertView.findViewById(R.id.textViewEventTitle);\n\t\t\tViewHolder.textViewDetails.setTypeface(null, Typeface.BOLD);\n\t\t\tViewHolder.textViewResults = (TextView)convertView.findViewById(R.id.textViewEventDescription);\n\t\t\t\n\t\t\t// set the viewHolder as the tag of this object\n\t\t\tconvertView.setTag(ViewHolder);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// subsequent pass, recall it from the view holder\n\t\t\tViewHolder = (ViewHolder)convertView.getTag();\n\t\t}\n\n\t\t// get the directory for this row\n\t\tPyLaunchResult result = (PyLaunchResult) DataList.get(position);\n\t\t\n\t\tString formatTitle = result.GetFileName();\n\t\tViewHolder.textViewDetails.setText(formatTitle);\n\t\t\n\t\t\n\t\tString formatResult = \"\";\n\t\t//\n\t\tfor (String nextResult : result.mResults)\n\t\t{\n\t\t\tif ( formatResult.length() != 0 )\n\t\t\t\tformatResult += \"\\n\";\n\t\t\tformatResult += \"> \" + nextResult;\n\t\t}\n\t\t\n\t\tif ( result.mExpanded )\n\t\t{\t\n\t\t\tformatResult += \"\\n\\nDetails:\";\n\t\t\tformatResult += \"\\n - Launched By: \" + result.IpOfRequest;\n\t\t\tformatResult += \"\\n - Time Requested: \" + result.TimeRequest;\n\t\t\tformatResult += \"\\n - Time Launched: \" + result.TimeLaunch;\n\t\t\tformatResult += \"\\n - Time Completed: \" + result.TimeComplete;\n\t\t}\n\t\t\n\t\t\n\t\tViewHolder.textViewResults.setText(formatResult);\n\t\t\n\t\tif ( position % 2 == 0 )\n\t\t{\n\t\t\tconvertView.setBackgroundColor(Color.parseColor(\"#383838\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconvertView.setBackgroundColor(Color.parseColor(\"#282828\"));\n\t\t}\n\t\t\n\t\t\n\t\n\t\t// set the check box current state from persistent data\n\t\treturn convertView;\n\t}",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tif(convertView == null){\n\t\t\tconvertView = inflater.inflate(id,null);\n\t\t}\n\t\tTextView title = (TextView) convertView.findViewById(R.id.find_music_title);\n\t\tTextView time = (TextView) convertView.findViewById(R.id.find_music_riqi);\n\t\tTextView userQuantity = (TextView) convertView.findViewById(R.id.find_renshu_shuzhi);\n\t\tTextView praiseQuantity = (TextView) convertView.findViewById(R.id.find_dianzan_shuzhi);\n\t\tTextView commentQuantity = (TextView) convertView.findViewById(R.id.find_dianjicishu_shuzhi);\n\t\t\n\t\tFindSetgetLuyin fs2 =lists.get(position);\n\t\t\n\t/*\timageView.setBackgroundDrawable(context.getResources().getDrawable(\n\t\t\t\tproducts.getImgedt())); �����*/\n\t\ttitle.setText(fs2.getTitle());\n\t\ttime.setText(fs2.getTitle());\n\t\tuserQuantity.setText(fs2.getUserQuantity());\n\t\tpraiseQuantity.setText(fs2.getPraiseQuantity());\n\t\tcommentQuantity.setText(fs2.getCommentQuantity());\n\t\t\n\t\treturn convertView;\n\t}",
"@Override\n\t\tpublic View getView(final int position, View convertView, ViewGroup parent) {\n\t\t\tListItemView listItemView = new ListItemView();\n\t\t\tif (convertView == null) {\n\t\t\t\tconvertView = listContainer.inflate(R.layout.book_download_item, null);\n\t\t\t\tlistItemView.cover = (ImageView) convertView.findViewById(R.id.cover_iv);\n\t\t\t\tlistItemView.nameTv = (TextView) convertView.findViewById(R.id.name_tv);\n\t\t\t\tlistItemView.downNumberTv = (TextView) convertView.findViewById(R.id.down_number_tv);\n\t\t\t\tlistItemView.descTv = (TextView) convertView.findViewById(R.id.desc_tv);\n\t\t\t\tlistItemView.statusTv = (TextView) convertView.findViewById(R.id.status_tv);\n\t\t\t\tlistItemView.bar = (ProgressBar) convertView.findViewById(R.id.progress_bar);\n\t\t\t\tlistItemView.deleteTv = (TextView) convertView.findViewById(R.id.delete_tv);\n\t\t\t\tconvertView.setTag(listItemView);\n\t\t\t} else {\n\t\t\t\tlistItemView = (ListItemView) convertView.getTag();\n\t\t\t}\n\t\t\tMyLog.d(\"bookAdapter\", books.get(position).getName()+\"\");\n//\t\t\tDrawable drawable = Tool.getBitmapByWidth(vector.get(position).getCover(),\n//\t\t\t\t\t Tool.getwindowWidth(context)/3-20, \n//\t\t\t\t\t (Tool.getwindowWidth(context)/3-20)*4/3, 0);\n\t\t\t//listItemView.cover.setImageDrawable(drawable);\n\t\t\tlistItemView.cover.setImageBitmap(Tool.getImageThumbnail(books.get(position).getCover(),\n\t\t\t\t\tTool.getwindowWidth(context)/3-20,(Tool.getwindowWidth(context)/3-20)*4/3));\n\t\t\t\n\t\t\tlistItemView.nameTv.setText(books.get(position).getName());\n\t\t\t\n\t\t\tlistItemView.downNumberTv.setText(books.get(position).getDownNumber() + \"人下载\");\n//\t\t\tlistItemView.SizeTv.setText(getFileSize(books.get(position).get()));\n\t\t\tlistItemView.descTv.setText(books.get(position).getDescription());\n\t\t\tif (!books.get(position).isIsdownload()) {\n\t\t\t\tif (code.equals(books.get(position).getCode())) {\n\t\t\t\t\tDrawable rightImg = getResources().getDrawable(R.drawable.downloading);\n\t\t\t\t\t// 调用setCompoundDrawables时,必须调用Drawable.setBounds()方法,否则图片不显示\n\t\t\t\t\trightImg.setBounds(0, 0, rightImg.getMinimumWidth(), rightImg.getMinimumHeight());\n\t\t\t\t\tlistItemView.statusTv.setCompoundDrawables(null, rightImg, null, null);\n\t\t\t\t\tlistItemView.statusTv.setText(getString(R.string.downloading));\n\t\t\t\t\tlistItemView.bar.setMax(100);\n\t\t\t\t\tlistItemView.bar.setProgress(bookCurrent);\n\t\t\t\t\tlistItemView.bar.setSecondaryProgress(fileCurrent);\n\t\t\t\t} else {\n\t\t\t\t\tDrawable rightImg = getResources().getDrawable(R.drawable.wait_download);\n\t\t\t\t\t// 调用setCompoundDrawables时,必须调用Drawable.setBounds()方法,否则图片不显示\n\t\t\t\t\trightImg.setBounds(0, 0, rightImg.getMinimumWidth(), rightImg.getMinimumHeight());\n\t\t\t\t\tlistItemView.statusTv.setCompoundDrawables(null, rightImg, null, null);\n\t\t\t\t\tlistItemView.statusTv.setText(getString(R.string.wait_downloading));\n\t\t\t\t\tlistItemView.bar.setMax(100);\n\t\t\t\t\tlistItemView.bar.setProgress(0);\n\t\t\t\t\tlistItemView.bar.setSecondaryProgress(0);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tDrawable rightImg = getResources().getDrawable(R.drawable.wait_download);\n\t\t\t\t// 调用setCompoundDrawables时,必须调用Drawable.setBounds()方法,否则图片不显示\n\t\t\t\trightImg.setBounds(0, 0, rightImg.getMinimumWidth(), rightImg.getMinimumHeight());\n\t\t\t\tlistItemView.statusTv.setCompoundDrawables(null, rightImg, null, null);\n\t\t\t\tlistItemView.statusTv.setText(getString(R.string.download_fail));\n\t\t\t\tlistItemView.bar.setMax(100);\n\t\t\t\tlistItemView.bar.setProgress(0);\n\t\t\t\tlistItemView.bar.setSecondaryProgress(0);\n\t\t\t\t\n\t\t\t}\n\t\t\tif (candelete == position) {\n\t\t\t\tlistItemView.deleteTv.setVisibility(View.VISIBLE);\n\t\t\t\tlistItemView.statusTv.setVisibility(View.GONE);\n\t\t\t} else {\n\t\t\t\tlistItemView.deleteTv.setVisibility(View.GONE);\n\t\t\t\tlistItemView.statusTv.setVisibility(View.VISIBLE);\n\t\t\t}\n\t\t\tconvertView.setOnClickListener(new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tif (!app.isDownLoading) {\n\t\t\t\t\t\tcandelete = position;\n\t\t\t\t\t\tnotifyDataSetChanged();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowToast(\"下载中无法进行操作\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tlistItemView.deleteTv.setOnClickListener(new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tdeleteBook(position);\n\t\t\t\t\tcandelete =-1;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn convertView;\n\t\t}",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n if(convertView == null) {\n convertView = layoutInflater.inflate(R.layout.main_activity_single_item, null);\n }\n title = (TextView)convertView.findViewById(R.id.tvMain);\n description = (TextView)convertView.findViewById(R.id.tvDescription);\n imageView = (ImageView)convertView.findViewById(R.id.ivMain);\n title.setText(titleArray[position]);\n // titlearray contains the title for all cardviews\n // position denotes the title for that particular cardview.\n // same for description\n description.setText(descriptionArray[position]);\n\n if(titleArray[position].equalsIgnoreCase(\"Timetable\")){\n imageView.setImageResource(R.drawable.timetable);\n }else if(titleArray[position].equalsIgnoreCase(\"Subjects\")){\n imageView.setImageResource(R.drawable.book);\n }else if(titleArray[position].equalsIgnoreCase(\"Faculty\")){\n imageView.setImageResource(R.drawable.contact);\n }else {\n imageView.setImageResource(R.drawable.settings);\n }\n return convertView;\n }"
]
| [
"0.74268144",
"0.7380633",
"0.7378192",
"0.7363616",
"0.7363616",
"0.7348054",
"0.7348054",
"0.7325791",
"0.73190445",
"0.7283113",
"0.72248375",
"0.72038805",
"0.7198069",
"0.71929824",
"0.71467406",
"0.7123825",
"0.7117648",
"0.7072037",
"0.70370305",
"0.70221305",
"0.7021445",
"0.70106",
"0.69874626",
"0.69870645",
"0.6983569",
"0.6978611",
"0.69779634",
"0.6973373",
"0.6958295",
"0.69491214",
"0.69470406",
"0.6942393",
"0.6927286",
"0.6922241",
"0.6920961",
"0.6915209",
"0.68904513",
"0.6862607",
"0.6856426",
"0.6846825",
"0.68380475",
"0.68310994",
"0.6822669",
"0.6819883",
"0.681941",
"0.6818501",
"0.6816235",
"0.68079543",
"0.68046623",
"0.68025887",
"0.6786071",
"0.6783759",
"0.67809045",
"0.6780853",
"0.67804444",
"0.6777396",
"0.6776788",
"0.6772037",
"0.6768094",
"0.67666745",
"0.67658305",
"0.6764625",
"0.67591584",
"0.6754355",
"0.6752285",
"0.67507863",
"0.67410475",
"0.6740088",
"0.67359775",
"0.6730964",
"0.672789",
"0.672776",
"0.6721131",
"0.6720143",
"0.67180115",
"0.6715091",
"0.67095834",
"0.67093545",
"0.67041004",
"0.6703778",
"0.6702238",
"0.66878605",
"0.6686631",
"0.66858166",
"0.6681632",
"0.6678596",
"0.6677715",
"0.6677068",
"0.6667106",
"0.6666376",
"0.666623",
"0.6660506",
"0.6657793",
"0.6656903",
"0.6651892",
"0.6648586",
"0.6648187",
"0.66445214",
"0.6643872",
"0.6642243",
"0.6640877"
]
| 0.0 | -1 |
TODO Autogenerated method stub | boolean _keyReleased(KeyEvent ev) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | boolean _mousePressed(MouseEvent ev) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | boolean _mouseMoved(MouseEvent ev) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | boolean _mouseReleased(MouseEvent ev) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | boolean _mouseWheel(MouseWheelEvent ev) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | public void render(Graphics2D g, BFGWindowProperties properties) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
All queries for the database | @Query("SELECT * FROM tabUsers WHERE username=:username AND password=:password ")
User getUserLogin(String username, String password); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void runQueries();",
"public void Query() {\n }",
"Query query();",
"private void executeQuery() {\n }",
"@Override\n\tpublic List queryAll() throws Exception {\n\t\treturn null;\n\t}",
"void db_all(Context context);",
"private RunQueriesEx setupQueries() {\n RunQueriesEx queries = new RunQueriesEx();\n \n //for each column in our table, update one of our lists\n for(int i = 0; i < this.dataTable.getColumnCount(); i++) {\n this.updateList(i);\n }\n \n updateEmptyLists(); //pads any lists that didn't get updates with empty strings\n \n //add a new query for each row in the table\n for(int i = 0; i < this.dataTable.getRowCount(); i++) {\n queries.add(this.createQueryFromRow(i));\n }\n \n return queries;\n }",
"public void start() {\n \n for (Object obj: bufferedQueries) {\n \n switch(obj.getClass().getName()) {\n case \"uzh.tomdb.db.operations.Insert\":\n if (inserts == null) {\n inserts = new ArrayList<>();\n }\n inserts.add((Insert) obj);\n break;\n case \"uzh.tomdb.db.operations.CreateTable\":\n if (creates == null) {\n creates = new ArrayList<>();\n }\n creates.add((CreateTable) obj);\n break;\n case \"uzh.tomdb.db.operations.Update\":\n if (updates == null) {\n updates = new ArrayList<>();\n }\n updates.add((Update) obj);\n break;\n case \"uzh.tomdb.db.operations.Delete\":\n if (deletes == null) {\n deletes = new ArrayList<>();\n }\n deletes.add((Delete) obj);\n break;\n }\n }\n \n if (inserts != null) {\n inserts();\n }\n if (creates != null) {\n creates();\n }\n if (updates != null) {\n updates();\n }\n if (deletes != null) {\n deletes();\n }\n }",
"public abstract ResultList executeQuery(DatabaseQuery query);",
"@Override\r\n\tpublic List<String> queryAll() {\n\t\tList<String> list = homePageDao.queryAll();\r\n\t\treturn list;\r\n\t}",
"public QueryGeneral() {\n try {\n connection = ConnectionDB.getInstance().getConnection();\n } catch (SQLException event) {\n log.error(\"Error in: \" + event.getMessage(), event);\n } catch (ClassNotFoundException event) {\n log.error(\"Error in: \" + event.getMessage(), event);\n }\n }",
"@Override\n public List<T> getAll() throws SQLException {\n\n return this.dao.queryForAll();\n\n }",
"public abstract Statement queryToRetrieveData();",
"Query queryOn(Connection connection);",
"private DbQuery() {}",
"@Override\r\n\tpublic List<Repair> queryAll() {\n\t\treturn repairDao.queryAll();\r\n\t}",
"@Override\n\tpublic final Iterable<R> execute() {\n\t\t\n\t\treturn new Iterable<R>() {\n\t\t\t\n\t\t\t@Override \n\t\t\tpublic Iterator<R> iterator() {\n\t\t\t\t\n\t\t\t\treturn AbstractMultiQuery.this.iterator();\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\t\n\t}",
"@Override\n\tpublic List<Student> queryAll() {\n\t\treturn sDao.queryAll();\n\t}",
"public Queries loadQueries() {\r\n\t\tQueries queries = null;\r\n\t try {\r\n queries = Queries.unmarshalAsQueries();\r\n\t } catch (Exception e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t return queries;\r\n\t}",
"@Override\n\tpublic List<T> queryAll(T common, String firstSql) {\n\t\treturn commonDao.queryAll(common, firstSql);\n\t}",
"public List<Document> execute(){\n if(!advancedQuery)\n return convertToDocumentsList(executeRegularQuery());\n else\n return convertToDocumentsList(executeAdvancedQuery());\n }",
"public void customerQuery(){\n }",
"public List<IEntity> query(IQuery query) throws SQLException;",
"@Override\n\tpublic void queryData() {\n\t\t\n\t}",
"@Override\n\tpublic List<Employee> queryAll() {\n\t\treturn dao.queryAll();\n\t}",
"protected final void executeQuery() {\n\ttry {\n\t executeQuery(queryBox.getText());\n\t} catch(SQLException e) {\n\t e.printStackTrace();\n\t clearTable();\n\t JOptionPane.showMessageDialog(\n\t\tnull, e.getMessage(),\n\t\t\"Database Error\",\n\t\tJOptionPane.ERROR_MESSAGE);\n\t}\n }",
"@Override\n\t\tpublic void executeQuery(String query) {\n\t\t\t\n\t\t}",
"@Override\n\tpublic Object queryAll(Map<String, Object> params) throws Exception {\n\t\treturn null;\n\t}",
"public abstract ResultList executeSQL(RawQuery rawQuery);",
"public void query()\n\t{\n\t\tJSONObject queryInfo = new JSONObject();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tqueryInfo.put(\"type\", \"query\");\n\t\t\t\n\t\t\tos.println(queryInfo.toString());\n\t\t\tos.flush();\n\t\t\t\n\t\t\tSystem.out.println(\"send query request : \" + queryInfo.toString());\n\t\t}\n\t\tcatch (JSONException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\tvoid executeQuery(String query) {\n\t\tSystem.out.println(\"Mssql ==> \" + query);\n\t}",
"public void fetch(){ \n for(int i = 0; i < this.queries.size(); i++){\n fetch(i);\n }\n }",
"private <T extends RealmModel> List<MasterDatabaseObject> queryDatabaseMasterAll() {\n\n Realm realm = DatabaseUtilities.buildRealm(this.realmConfiguration);\n RealmQuery query = RealmQuery.createQuery(realm, MasterDatabaseObject.class);\n\n //Start transaction\n RealmResults<T> results = query.findAll();\n if (results.size() <= 0) {\n return new ArrayList<>();\n }\n try {\n List<MasterDatabaseObject> masterDatabaseObjectList = new ArrayList<MasterDatabaseObject>();\n for (T t : results) {\n if (t != null) {\n MasterDatabaseObject mdo = (MasterDatabaseObject) t;\n if (!StringUtilities.isNullOrEmpty(mdo.getId()) &&\n !StringUtilities.isNullOrEmpty(mdo.getJsonString())) {\n masterDatabaseObjectList.add(mdo);\n }\n }\n }\n\n return masterDatabaseObjectList;\n } catch (Exception e) {\n return new ArrayList<>();\n }\n }",
"public DBViewAllPilot() {\n\t\ttry {\n\t\tstatement = connection.createStatement(); \n\t\tviewAll(); //call the viewAll function; \n\t\t\n\t}catch(SQLException ex) {\n\t\tSystem.out.println(\"Database connection failed DBViewAllAircraft\"); \n\t}\n}",
"public ResultSet executeQuery(String request) {\n try {\r\n return st.executeQuery(request);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n return null;\r\n }\r\n }",
"@Override\n protected Map<String, String> initializeCommonQueries() {\n Map<String, String> commonQueries = new HashMap<>();\n\n commonQueries.put(SELECT_ALL_QUERY_KEY, SELECT_ALL_QUERY);\n commonQueries.put(SELECT_BY_ID_QUERY_KEY, SELECT_BY_ID_QUERY);\n commonQueries.put(DELETE_BY_ID_QUERY_KEY, DELETE_BY_ID_QUERY);\n commonQueries.put(INSERT_ENTITY_QUERY_KEY, INSERT_ENTITY_QUERY);\n commonQueries.put(UPDATE_ENTITY_QUERY_KEY, UPDATE_ENTITY_QUERY);\n\n return commonQueries;\n }",
"void queriesEnd();",
"@Override\n\tpublic List<Generator> getAll() {\n\n\t\tList<Generator> result = new ArrayList<>();\n\n\t\ttry (Connection c = context.getConnection(); \n\t\t\tStatement stmt = c.createStatement()) {\n\n\t\t\tResultSet rs = stmt.executeQuery(getAllQuery);\n\n\t\t\twhile (rs.next()) {\n \tGenerator generator = new Generator(\n \t\trs.getInt(1),\n \t\trs.getString(2),\n \t\trs.getString(3),\n \t\trs.getInt(4),\n \t\trs.getInt(5),\n \t\trs.getInt(6)\n \t);\n\t\t\t\tresult.add(generator);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t\treturn result;\n\n\t}",
"public Queries queries() {\n return this.queries;\n }",
"private void querys() {\n\t try {\r\n\t\tBoxYieldRptFactory.getRemoteInstance().SteDate();\r\n\t } catch (EASBizException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t } catch (BOSException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t }\r\n\t}",
"public List<OwnerQueryStatsDTO> getQueries() {\n\t\tif (queries == null) {\n\t\t\ttry (Config config = ConfigFactory.get()) {\n\n\t\t\t queries = DbUtil.getOwnerQueries(config, userBean.getUserId(), getFilterTerms(),\n\t\t\t\t\t flagFilter);\n\t\t\t\tsortQueries();\n\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn queries;\n\t}",
"public void query(String sql) throws SQLException {\r\n Statement st = con.createStatement();\r\n ResultSet rs = st.executeQuery(sql);\r\n\r\n while (rs.next()){\r\n System.out.println(rs.getInt(\"id\")+\" \"+rs.getString(\"name\")+\" \"+rs.getString(\"surname\")+\" \"+rs.getFloat(\"grade\"));\r\n }\r\n\r\n }",
"@Override\n public boolean onQueryTextSubmit(String query) {\n queryMain = query;\n consultarDb();\n return true;\n }",
"public Cursor fetchAll() {\n\t\treturn db.query(tableName, fields, null, null, null, null, null);\n\t}",
"private Queries() {\n // prevent instantiation\n }",
"public void run() {\n List<Map> queries = (List<Map>) server.get(\"queries\");\n Connection connection = null;\n if (queries != null && !queries.isEmpty()) {\n String dbServerDisplayName = (String) server.get(\"displayName\");\n try {\n long timeBeforeConnection = System.currentTimeMillis();\n connection = getConnection();\n long timeAfterConnection = System.currentTimeMillis();\n logger.debug(\"Time taken to get Connection: \" + (timeAfterConnection - timeBeforeConnection));\n\n logger.debug(\"Time taken to get Connection for \" + dbServerDisplayName + \" : \" + (timeAfterConnection - timeBeforeConnection));\n\n if (connection != null) {\n logger.debug(\" Connection successful for server: \" + dbServerDisplayName);\n for (Map query : queries)\n executeQuery(connection, query);\n } else {\n\n logger.debug(\"Null Connection returned for server: \" + dbServerDisplayName);\n }\n\n } catch (SQLException e) {\n logger.error(\"Error Opening connection\", e);\n status = false;\n } catch (ClassNotFoundException e) {\n logger.error(\"Class not found while opening connection\", e);\n status = false;\n } catch (Exception e) {\n logger.error(\"Error collecting metrics for \"+dbServerDisplayName, e);\n status = false;\n }\n finally {\n try {\n if (connection != null) {\n closeConnection(connection);\n }\n } catch (Exception e) {\n logger.error(\"Issue closing the connection\", e);\n }\n }\n }\n }",
"@Override\n\tpublic List<WxProcessDefinition> queryAll() {\n\t\tCriteriaBuilder cb = this.getCriteriaBuilder();\n\t\tCriteriaQuery<WxProcessDefinition> c = cb.createQuery(getEntityClass());\n\t\tRoot<WxProcessDefinition> root = c.from(getEntityClass());\n\t\tc.orderBy(cb.asc(root.get(\"index\")));\n\t\treturn super.query(c.select(root), null, null);\n\t}",
"public DatabaseQuery getQuery() {\n return query;\n }",
"@Override\n\tpublic List<T> getAll() {\n\t\treturn getDao().findAll();\n\t}",
"public List<Tutores> readAllJPQL() throws SecurityException{ \n String sql=\"Select tu from Tutores tu\";\n \n Query q=em.createQuery(sql); \n return q.getResultList();\n }",
"public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}",
"protected void executeSchemaOperations() {\n }",
"public void runQuery(String query) throws SQLException {\n runQuery(query, \"default\");\n }",
"public ResultSet executeQuery() throws SQLException {\n return statement.executeQuery();\n }",
"@Test\n public void testSelectAll() throws Exception {\n String sql = \"SELECT ALL a FROM g\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \"a\");\n verifyProperty(selectNode, Select.DISTINCT_PROP_NAME, false);\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"g\");\n\n verifySql(\"SELECT a FROM g\", fileNode);\n }",
"public abstract QueryResultIterable executeGroundingQuery(Formula formula);",
"SelectQueryBuilder selectAll();",
"public int getQueriesCount() {\n return queries_.size();\n }",
"@Override\n\tpublic List<Basicunit> selectAll() {\n\t\treturn basicDAOManager.selectAll();\n\t}",
"private void setQuerySQL(Settings set) {\n SEARCH_DATA_BASE = set.getValue(\"sql.searchDataBase\");\n CREATE_DATA_BASE = set.getValue(\"sql.createDataBase\");\n SEARCH_TABLE_VACANCY = set.getValue(\"sql.searchTableVacancy\");\n CREATE_TABLE_VACANCY = set.getValue(\"sql.createTableVacancy\");\n ADD_VACANCY = set.getValue(\"sql.addVacancy\");\n COUNT = set.getValue(\"sql.count\");\n MAX_DATE = set.getValue(\"sql.maxDate\");\n }",
"public static void queryEnvironments() throws SQLException {\n\t\tList<DatabaseEnv> envs = dbEnvMgr.getEnvironments();\n\t\tif (envs == null) {\n\t\t\tlog.warn(\"No environments detected. Nothing to query\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor (DatabaseEnv env : envs) {\n\t\t\tString envName = env.getEnvName();\n\n\t\t\t\n\n\t\t\tfor (Query q : qMgr.getQueries()) {\t\n\t\t\t\tConnection connection = ConnectionFactory.getConnection(env, q);\n\t\t\t\tlog.info(String.format(\"Connected to database %s under user %s \", envName, q.getSchema()));\n\t\t\t\ttry {\n\t\t\t\t\tJDBCManager.executeQuery(connection, env, q);\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tif (connection != null) {\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t\tconnection = null;\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\tlog.info(\"DONE!\");\t\t\t\t\t\n\t\t}\n\t\t\n\t}",
"public List<T> findAll() throws NoSQLException;",
"@Override\n\tpublic void getAll() {\n\t\tArrayList<Post> list = new ArrayList<Post>();\n\t\tlist = dao.selectAll();\n\t\t\n\t\tfor (Post p : list) {\n\t\t\tSystem.out.println(p.getPostId() + \".\" + p.getPostName() + \" 작성자:\" + p.getMemberId());\n\t\t}\n\t}",
"public static void main(String[] args) throws IOException, SQLException {\n Connection con = connect(\"jdbc:mysql://mysql1:3306/world?\" + \"user=root&password=example\");\n\n /**\n * END OF DATABASE CONNECTION CODE\n */\n\n /**\n * this list is used to store SQL queries\n */\n List<SQLquery> queries = updateQueryList();\n\n /**\n * this piece of code is used to run all available SQL queries\n */\n for (SQLquery query : queries) {\n System.out.println(query.name);\n System.out.println(query.sql);\n System.out.println(getQueryResult(query, con));\n }\n\n /**\n * at the end of main, close database connection\n */\n if (con != null)\n {\n try\n {\n // Close database connection\n con.close();\n }\n catch (Exception e)\n {\n System.out.println(\"Error closing connection to database\");\n }\n }\n\n }",
"@Override\n\tpublic List<Object> getAll(String hql) {\n\t\tSession session = HibernateSessionFactory.getSession();\n\t\tTransaction ts = session.beginTransaction();\n\n\t\tList<Object> list = new ArrayList<Object>();\n\t\tlist = session.createQuery(hql).list();\n\t\tts.commit();\n\t\tsession.close();\n\t\treturn list;\n\t}",
"public List<TreateWait> queryAll() {\n\t\tQuery query = Query.query(Criteria.where(\"id\").exists(true));\n\t\treturn treateWaitDao.queryList(query);\n\t\t\n\t}",
"DBCursor execute();",
"protected abstract void onQueryStart();",
"@Override\n\tpublic List<DatabaseObject> selectAll(DatabaseHandler db) {\n\t\treturn db.getAllWorks();\n\t}",
"private void executeRequest(String sql) {\n\t}",
"public interface SqlQueries {\n\n /**\n * The constant QUOTATION.\n */\n String QUOTATION = \"'\";\n\n /**\n * The constant SELECT_ALL_CARS.\n */\n String SELECT_ALL_CARS = \"SELECT * FROM Car\";\n\n /**\n * The constant SELECT_ALL_USERS.\n */\n String SELECT_ALL_USERS = \"SELECT * FROM Users\";\n\n /**\n * The constant FIND_CAR_BY_ID.\n */\n String FIND_CAR_BY_ID = \"Select * from Car Where id = \";\n\n /**\n * The constant CREATE_A_CAR.\n */\n String CREATE_A_CAR = \"insert into car values({0},{1}, {2}, {3}, {4})\";\n\n}",
"int getQueriesCount();",
"public ResultSet executeSQL() {\t\t\n\t\tif (rs != null) {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch(SQLException se) {\n\t\t\t} finally {\n\t\t\t\trs = null;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\trs = pstmt.executeQuery();\n\t\t} catch (SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}\n\t\treturn rs;\n\t}",
"List<E> queryAll(String namedQuery);",
"public void init () throws IOException , GateException {\n conn = getConnection(db); \n Gate.init();\n\n String query = \"SELECT \" + db.idcol + ',' + db.textcol + \" FROM \" + db.table;\n if(db.where != null && !\"\".equals(db.where)){\n query = query + \" WHERE \" + db.where;\n }\n log.debug(\"attempting to prepare query: \"+ query);\n\n // fetch a resultset \n try{\n PreparedStatement stmt = conn.prepareStatement(query);\n rs = stmt.executeQuery();\n } catch(SQLException e){\n log.error(\"Problem running SQL query\", e);\n System.exit(5);\n }\n }",
"public List<Account> queryAll() {\n\t\treturn null;\n\t}",
"WorldUps.UQuery getQueries(int index);",
"java.util.List<WorldUps.UQuery> \n getQueriesList();",
"public static <T> void queryAll() {\n\t\tString sql = \"SELECT * FROM LIBRARY ORDER BY BID \";\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tClass<T> clazz = (Class<T>) Lib.class;\n\t\tSystem.out.println(\"All books info is displayed below: \");\n\t\ttry {\n\t\t\tList<T> eleList = dao.queryData(sql, clazz);\n\t\t\tfor (T ele : eleList) {\n\t\t\t\tSystem.out.println(\"\\t\"+ele);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public ORM executeQuery(String query) {\n ResultSet rs = null;\n this.query =query;\n System.out.println(\"run: \" + this.query);\n //this.curId = 0;\n Statement statement;\n try {\n statement = this.conn.createStatement();\n rs = statement.executeQuery(this.query);\n //this.saveLog(0,\"\",query);\n } catch (SQLException e) {\n System.out.println( ColorCodes.ANSI_RED +\"ERROR in SQL: \" + this.query);\n // e.printStackTrace();\n }\n lastResultSet=rs;\n this.fields_values = \"\";\n return this;\n\n }",
"List<Bill> all() throws SQLException;",
"public abstract String createQuery();",
"public static List<SqlRow> findAll() {\n\n try{\n List<SqlRow> queryFindAll = Ebean.createSqlQuery(\"SELECT * FROM pub_infoapi;\")\n .findList();\n return queryFindAll;\n }catch(Exception e){\n e.printStackTrace();\n return null;\n }\n }",
"public List<RunningQuery> getRunningQueries() {\n return jdbi.withHandle(handle -> {\n handle.registerRowMapper(ConstructorMapper.factory(RunningQuery.class));\n return handle.createQuery(RunningQuery.extractQuery)\n .mapTo(RunningQuery.class)\n .list();\n });\n }",
"private String queryAllFrom(String tableName) {\n return EXTRA_ALL_FROM + tableName + EXTRA_SEMI_COLON;\n }",
"ResultSet runSQL(String query) {\n try {\n return connection.prepareStatement(query).executeQuery();\n }\n catch (SQLException e) {\n System.err.println(e.getMessage());\n return null;\n }\n }",
"public static void main(String[] args) {\n\t\tSession s2=util.getSession();\r\n\t\tQuery qry=s2.getNamedQuery(\"q2\");\r\n\t\t//Query qry=s2.getNamedQuery(\"q3\");\r\n\t\t//qry.setInteger(0, 50);\r\n\t\tList<Object[]> lust=qry.list();\r\n\t\tfor(Object[] row:lust) {\r\n\t\t\tSystem.out.println(Arrays.toString(row));\r\n\t\t}\r\n\t\tSystem.out.println(\"Completed\");\r\n\t}",
"@ActionTrigger(action=\"QUERY\")\n\t\tpublic void spriden_Query()\n\t\t{\n\t\t\t\n\t\t\t\tnextBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tnextBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tclearBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tnextBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tclearBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tnextBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tclearBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tpreviousBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tpreviousBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tpreviousBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tpreviousBlock();\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t\tenterQuery();\n//\t\t\t\tif ( SupportClasses.SQLFORMS.FormSuccess().not() )\n//\t\t\t\t{\n//\t\t\t\t\t\n//\t\t\t\t\tthrow new ApplicationException();\n//\t\t\t\t}\n\t\t\t}",
"public List<T> selectAll() {\n Logger logger = getLogger();\n List<T> objectList = new ArrayList<>();\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getSelectAll())) {\n\n logger.info(\"Executing statement: \" + preparedStatement);\n ResultSet rs = preparedStatement.executeQuery();\n\n while (rs.next()) {\n T object = setObjectParams(rs);\n setObjectId(rs, object);\n objectList.add(object);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Select all: success\");\n return objectList;\n }",
"public Collection<T> getAll() throws DaoException;",
"private ResultSet executeQuery(String query) {\r\n Statement stmt;\r\n ResultSet result = null;\r\n try {\r\n// System.out.print(\"Connect DB .... \");\r\n conn = openConnect();\r\n// System.out.println(\"successfully \");\r\n stmt = conn.createStatement();\r\n result = stmt.executeQuery(query);\r\n } catch (SQLException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return result;\r\n }",
"public abstract void resetQuery();",
"public List sqlQuery(String sql,Object... params);",
"@Override\n\tpublic Collection<MovementPK> dbSelectAll()\tthrows DAOSysException {\n\t\treturn dbSelectAll(MovementDAO.SELECT_ALL_STM);\n\t}",
"public List<Alumno> readAllJPQL() throws SecurityException{ \n String sql=\"Select a from Alumno a\";\n \n Query q=em.createQuery(sql); \n return q.getResultList();\n }",
"private void FetchingData() {\n\t\t try { \n\t\t\t \n\t \tmyDbhelper.onCreateDataBase();\n\t \t \t\n\t \t\n\t \t} catch (IOException ioe) {\n\t \n\t \t\tthrow new Error(\"Unable to create database\");\n\t \n\t \t} \n\t \ttry {\n\t \n\t \t\tmyDbhelper.openDataBase();\n\t \t\tmydb = myDbhelper.getWritableDatabase();\n\t\t\tSystem.out.println(\"executed\");\n\t \t\n\t \t}catch(SQLException sqle){\n\t \n\t \t\tthrow sqle;\n\t \n\t \t}\n\t}",
"public FindIterable<Document> getAllDocuments() {\n\t\tMongoDatabase db = mongoClient.getDatabase(MongoActions.props.getDBName());\n\t\tMongoCollection<Document> table = db.getCollection(MongoActions.props.getCollectionName());\n\t\tFindIterable<Document> iterable = table.find();\n\n\t\treturn iterable;\n\t}",
"public QbUpdate all();",
"private void queryAllMenu()\n\t{\n\t\tclearPanel(getPanel1());\n\t\t\n\t\t//get value from combo boxes into Values\n\t\tsetValue1(getTopics1().getSelectedItem().toString());\t\n\t\tsetValue2(getTopics2().getSelectedItem().toString());\n\t\t\n\t\t//load user values into query1 by calling CrimeQuery and passing the values\n\t\tsetQuery1(new CrimeQuery(getValue1(),getValue2()));\n\t\t\n\t\t//get the table from QueryAll from CrimeQuery class\n\t\tJTable table=getQuery1().QueryAll();\n\t\t\n\t\t//add table with new options\n\t\tJScrollPane scrolltable = new JScrollPane(table);\n\t\tscrolltable.setBounds(500,10,500,500);\n\t\n\t\tgetPanel1().add(scrolltable);\n\t\t\n\t\tgetPanel1().add(getButton2());\n\t\tgetPanel1().add(getButton5());\n\t\tgetPanel1().add(getButton3());\n\t\tgetPanel1().add(getButton6());\n\t\tgetButton3().setBounds(100,10,230,60);\n\t\tgetButton6().setBounds(100,215,230,60);\n\t\tgetButton5().setBounds(100,315,230,60);\n\t\tgetButton2().setBounds(100,410,230,60);\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\n\tpublic List<Setting> queryall() {\n\t\treturn SettingMapper.queryall();\n\t}",
"List<RequestHistory> getQueries() throws RemoteException;"
]
| [
"0.7790227",
"0.7246101",
"0.72175884",
"0.7041373",
"0.694852",
"0.6755668",
"0.6749714",
"0.6686173",
"0.66472316",
"0.65644485",
"0.6560402",
"0.65294945",
"0.6445602",
"0.6434316",
"0.6393314",
"0.638004",
"0.6368257",
"0.6354751",
"0.63416594",
"0.6260548",
"0.62333554",
"0.62101007",
"0.61453265",
"0.6139355",
"0.61308706",
"0.6127435",
"0.61168104",
"0.6114232",
"0.6105284",
"0.6099497",
"0.6036747",
"0.6013481",
"0.6004205",
"0.60031",
"0.59911555",
"0.59862757",
"0.59754884",
"0.59618896",
"0.5956905",
"0.5922433",
"0.5917519",
"0.59048235",
"0.5899924",
"0.58973736",
"0.5883322",
"0.58765787",
"0.5861498",
"0.5847966",
"0.58422714",
"0.5840701",
"0.5839035",
"0.5832036",
"0.58313775",
"0.5808682",
"0.5801646",
"0.5784572",
"0.57587135",
"0.57574475",
"0.5748529",
"0.5746399",
"0.5745629",
"0.57390594",
"0.5735598",
"0.5731475",
"0.57297075",
"0.57292354",
"0.5725865",
"0.57257307",
"0.5698584",
"0.56873655",
"0.5687024",
"0.56844705",
"0.5673824",
"0.5670059",
"0.5665767",
"0.5664888",
"0.5655683",
"0.5649955",
"0.564502",
"0.5639226",
"0.56390005",
"0.5633079",
"0.56317127",
"0.5629241",
"0.5622305",
"0.56214726",
"0.56151974",
"0.5612005",
"0.56103283",
"0.56083745",
"0.5605209",
"0.56001717",
"0.55939317",
"0.5590437",
"0.5582043",
"0.558091",
"0.5576276",
"0.5575547",
"0.55744845",
"0.5572478",
"0.55714446"
]
| 0.0 | -1 |
/ JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] | @Override // X.AbstractC12851yS
public final void accept(Throwable th) throws Exception {
Throwable th2 = th;
AbstractC12851yS<? super AnonymousClass215<T>> r2 = this.A00;
AnonymousClass219.A01(th2, "error is null");
r2.accept(new AnonymousClass215(EnumC139220y.error(th2)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Type[] getArgumentTypes() {\n/* 236 */ return Type.getArgumentTypes(this.desc);\n/* */ }",
"@Test\n public void getTypeArguments() {\n List<String> target=new ArrayList<String>() {{\n add(\"thimble\");\n }};\n\n Type[] arguments= TypeDetective.sniffTypeParameters(target.getClass(), ArrayList.class);\n assertEquals(1, arguments.length);\n assertEquals(String.class,arguments[0]);\n }",
"Object[] getArguments();",
"Object[] getArguments();",
"protected Type[] getJoinPointArgumentTypes() {\n return new Type[]{Type.getType(m_calleeMemberDesc)};\n }",
"@Override\n protected PacketArgs.ArgumentType[] getArgumentTypes() {\n return new PacketArgs.ArgumentType[] { PacketArgs.ArgumentType.String };\n }",
"@Override\n public int getNumberArguments() {\n return 1;\n }",
"@Override\n\tpublic void javaMethodBaseWithTwoParams(long longParam, double doubleParam) {\n\t\t\n\t}",
"@Override\n public Object[] getArguments() {\n return null;\n }",
"@Override\n public int getArgLength() {\n return 4;\n }",
"public abstract Object getTypedParams(Object params);",
"private void init() {\n\t\t// pick to pieces method signature description\n\t\tthis.argTypes = Type.getArgumentTypes(this.desc);\n\t\tthis.newArgTypes = new LinkedList<Type>();\n\t\tfor (Type t : this.argTypes) {\n\t\t\tthis.newArgTypes.add(t);\n\t\t\tif(t.getSort() == Type.OBJECT && !TaintTrackerConfig.isString(t))\n\t\t\t\tcontinue;\n//\t\t\tdetermine proper taint for each argument and append it to newArgTypes\n\t\t\tif (t.getSort() == Type.ARRAY) {\n\t\t\t\tif (t.getElementType().getSort() != Type.OBJECT || TaintTrackerConfig.isString(t.getElementType())) {\n\t\t\t\t\tif (t.getDimensions() > 1) {\n\t\t\t\t\t\tthis.newArgTypes.add(Type.getType(TaintTrackerConfig.TAINT_DESC));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.newArgTypes.add(Type.getType(TaintTrackerConfig.TAINT_DESC_ARR));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.newArgTypes.add(Type.getType(TaintTrackerConfig.TAINT_DESC));\n\t\t\t}\n\t\t}\n\t\tthis.newReturnType = Type.getReturnType(desc);\n\t\tif (this.newReturnType.getSort() != Type.VOID && this.newReturnType.getSort() != Type.OBJECT) {\n\t\t\tTaintWrapper<?,?> returnType = TaintTrackerConfig.wrapReturnType(Type.getReturnType(desc));\n\t\t\tif(returnType != null)\n\t\t\t\tthis.newReturnType = Type.getType(returnType.getClass());\n\t\t}\n\t\telse if( (this.newReturnType.getSort() == Type.OBJECT && TaintTrackerConfig.isString(this.newReturnType))\n\t\t|| (this.newReturnType.getSort() == Type.ARRAY && TaintTrackerConfig.isString(this.newReturnType.getElementType())) ){\n\t\t\tTaintWrapper<?,?> returnType = TaintTrackerConfig.wrapReturnType(Type.getReturnType(desc));\n\t\t\tif(returnType != null)\n\t\t\t\tthis.newReturnType = Type.getType(returnType.getClass());\n\t\t}\n\t\t\n\t\tType[] newArgs = new Type[newArgTypes.size()];\n\t\tnewArgTypes.toArray(newArgs);\n\t\tthis.newDesc = Type.getMethodDescriptor(newReturnType, newArgs);\n\t}",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FArgument src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"@Override\n\tpublic Class[] getMethodParameterTypes() {\n\t\treturn new Class[]{byte[].class, int.class,byte[].class,\n\t\t byte[].class, int.class, byte[].class,\n\t\t int.class, byte[].class, byte[].class};\n\t}",
"protected List<ObjectInformation> getTypeArgumentObjectInformation(ObjectInformation objectInformation)\n throws FillingException {\n\n List<ObjectInformation> typeArgumentObjectInformationList = new ArrayList<>();\n\n List<Type> actualTypeArguments = GenericsUtils.getActualTypeArguments(objectInformation.getField());\n\n for (Type type : actualTypeArguments) {\n typeArgumentObjectInformationList.add(createObjectInformationForType(type, objectInformation));\n }\n\n return typeArgumentObjectInformationList;\n }",
"protected abstract Feature<T,?> convertArgument(Class<?> parameterType, Feature<T,?> originalArgument);",
"public static void method(Object obj){\n\t System.out.println(\"method with param type - Object\");\n\t }",
"static void checkArgTypes(\r\n\t\tString funcName, Argument[] args, JParameter[] params) {\r\n\t\tif(args.length != params.length){\r\n\t\t\tthrow new IllegalArgumentsException(funcName, \"Wrong number of arguments\");\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0;i<args.length;i++){\r\n\t\t\tJValue val = args[i].getValue();\r\n\t\t\tJParameter jp = params[i];\r\n\t\t\tif(jp.isUntyped()){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tJType typ = jp.getType();\r\n\t\t\tif(RefValue.isGenericNull(val)){\r\n\t\t\t\tJTypeKind kind = typ.getKind();\r\n\t\t\t\tif (kind == JTypeKind.CLASS || kind == JTypeKind.PLATFORM){\r\n\t\t\t\t\t// If it is a generic null, replace it with a typed null to comply with function declaration.\r\n\t\t\t\t\tRefValue rv = RefValue.makeNullRefValue(\r\n\t\t\t\t\t\tval.getMemoryArea(), kind == JTypeKind.CLASS ? (ICompoundType)typ : JObjectType.getInstance());\r\n\t\t\t\t\targs[i].setValue(rv);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcheckConvertibility(val, typ);\r\n\t\t}\r\n\t}",
"public Object[] getArguments() { return args;}",
"private String getSuperMethodCallParameters(ExecutableElement sourceMethod) {\n return sourceMethod\n .getParameters()\n .stream()\n .map(parameter -> parameter.getSimpleName().toString())\n .collect(Collectors.joining(\", \"));\n }",
"private void checkForPrimitiveParameters(Method execMethod, Logger logger) {\n final Class<?>[] paramTypes = execMethod.getParameterTypes();\n for (final Class<?> paramType : paramTypes) {\n if (paramType.isPrimitive()) {\n logger.config(\"The method \" + execMethod\n + \" contains a primitive parameter \" + paramType + \".\");\n logger\n .config(\"It is recommended to use it's wrapper class. If no value could be read from the request, now you would got the default value. If you use the wrapper class, you would get null.\");\n break;\n }\n }\n }",
"public getType_args(getType_args other) {\n }",
"@Override\n public final int parseArguments(Parameters params) {\n return 1;\n }",
"private static AbstractType<?>[] argumentsType(@Nullable StringType algorithmArgumentType)\n {\n return algorithmArgumentType == null\n ? DEFAULT_ARGUMENTS\n : new AbstractType<?>[]{ algorithmArgumentType };\n }",
"private Object[] getArguments (String className, Object field)\n\t{\n\t\treturn ((field == null) ? new Object[]{className} : \n\t\t\tnew Object[]{className, field});\n\t}",
"private static void a(Object param0, Class<?> param1) {\n }",
"public void b(Object... objArr) {\n }",
"@org.junit.Test(timeout = 10000)\n public void annotatedArgumentOfParameterizedType_cf919() {\n java.lang.String expected = (\"java.util.List<@\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String>\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class).annotated(NEVER_NULL);\n com.squareup.javapoet.ClassName list = com.squareup.javapoet.ClassName.get(java.util.List.class);\n java.lang.String actual = com.squareup.javapoet.ParameterizedTypeName.get(list, type).toString();\n // StatementAdderOnAssert create null value\n java.lang.Object vc_434 = (java.lang.Object)null;\n // AssertGenerator add assertion\n org.junit.Assert.assertNull(vc_434);\n // AssertGenerator replace invocation\n boolean o_annotatedArgumentOfParameterizedType_cf919__12 = // StatementAdderMethod cloned existing statement\n type.equals(vc_434);\n // AssertGenerator add assertion\n org.junit.Assert.assertFalse(o_annotatedArgumentOfParameterizedType_cf919__12);\n org.junit.Assert.assertEquals(expected, actual);\n }",
"boolean isMoreSpecific (MethodType type) throws OverloadingAmbiguous {\r\n boolean status = false;\r\n\r\n try {\r\n for (int i = 0, size = arguments.size (); i < size; i++) {\r\n\tIdentifier this_arg = (Identifier) arguments.elementAt (i);\r\n\tIdentifier target_arg = (Identifier) type.arguments.elementAt (i);\r\n\r\n\tint type_diff = this_arg.type.compare (target_arg.type);\r\n\tif (type_diff == 0)\r\n\t continue;\r\n\telse if (type_diff > 0) {\r\n\t if (status == true) throw new OverloadingAmbiguous ();\r\n\t} else {\r\n\t if (i != 0) throw new OverloadingAmbiguous ();\r\n\t status = true;\r\n\t}\r\n }\r\n } catch (OverloadingAmbiguous ex) {\r\n throw ex;\r\n } catch (TypeMismatch ex) {\r\n throw new OverloadingAmbiguous ();\r\n }\r\n\r\n return status;\r\n }",
"protected void validateArguments( Object[] args ) throws ActionExecutionException {\n\n Annotation[][] annotations = method.getParameterAnnotations();\n for (int i = 0; i < annotations.length; i++) {\n\n Annotation[] paramAnnotations = annotations[i];\n\n for (Annotation paramAnnotation : paramAnnotations) {\n if (paramAnnotation instanceof Parameter) {\n Parameter paramDescriptionAnnotation = (Parameter) paramAnnotation;\n ValidationType validationType = paramDescriptionAnnotation.validation();\n\n String[] validationArgs;\n\n // if we are checking for valid constants, then the\n // args array should contain\n // the name of the array holding the valid constants\n if (validationType == ValidationType.STRING_CONSTANT\n || validationType == ValidationType.NUMBER_CONSTANT) {\n try {\n String arrayName = paramDescriptionAnnotation.args()[0];\n\n // get the field and set access level if\n // necessary\n Field arrayField = method.getDeclaringClass().getDeclaredField(arrayName);\n if (!arrayField.isAccessible()) {\n arrayField.setAccessible(true);\n }\n Object arrayValidConstants = arrayField.get(null);\n\n // convert the object array to string array\n String[] arrayValidConstatnsStr = new String[Array.getLength(arrayValidConstants)];\n for (int j = 0; j < Array.getLength(arrayValidConstants); j++) {\n arrayValidConstatnsStr[j] = Array.get(arrayValidConstants, j).toString();\n }\n\n validationArgs = arrayValidConstatnsStr;\n\n } catch (IndexOutOfBoundsException iobe) {\n // this is a fatal error\n throw new ActionExecutionException(\"You need to specify the name of the array with valid constants in the 'args' field of the Parameter annotation\");\n } catch (Exception e) {\n // this is a fatal error\n throw new ActionExecutionException(\"Could not get array with valid constants - action annotations are incorrect\");\n }\n } else {\n validationArgs = paramDescriptionAnnotation.args();\n }\n\n List<BaseType> typeValidators = createBaseTypes(paramDescriptionAnnotation.validation(),\n paramDescriptionAnnotation.name(),\n args[i], validationArgs);\n //perform validation\n for (BaseType baseType : typeValidators) {\n if (baseType != null) {\n try {\n baseType.validate();\n } catch (TypeException e) {\n throw new InvalidInputArgumentsException(\"Validation failed while validating argument \"\n + paramDescriptionAnnotation.name()\n + e.getMessage());\n }\n } else {\n log.warn(\"Could not perform validation on argument \"\n + paramDescriptionAnnotation.name());\n }\n }\n }\n }\n }\n }",
"Type getMethodParameterType() throws IllegalArgumentException;",
"private void method_460(String var1, int var2, String var3, int var4) {\r\n super(var1, var2);\r\n }",
"public void mo1774a(Object obj) {\n }",
"StackManipulation special(TypeDescription invocationTarget);",
"@Override\n\tprotected byte[] getArgByte() {\n\t\treturn paramsJson.getBytes();\n\t}",
"public ITypeInfo[] getParameters();",
"@Override\n public Class<?>[] getParameterTypes() {\n return null;\n }",
"protected abstract boolean canConvert(Class<?> parameterType, Class<?> originalArgumentType);",
"private void computeArgsTaint() {\n\t\tthis.isStatic = (Opcodes.ACC_STATIC & this.getAccess()) != 0;\n\n\t\tType[] args = this.getArgTypes();\n\n\t\t// Compute the index of the last argument\n\t\tthis.argLastIndex = this.isStatic ? 0 : 1;\n\t\tfor (Type t : args) {\n\t\t\tthis.argLastIndex += t.getSize();\n\t\t}\n\n\t\t// Remap method argument position\n\t\tthis.newArgsOffset = 0;\n\t\tthis.args2NewArgsMapping = new int[this.argLastIndex];\n\t\tint argCounter = this.isStatic ? 0 : 1;\n\t\t\n\t\t// newArgsOffset supports only 32-bit taint labels\n\t\tfor (int i = 0; i < args.length; i++) {\n//\t\t\tmaps original to new argument position\n\t\t\tthis.args2NewArgsMapping[argCounter] = argCounter + this.newArgsOffset;\n\t\t\tif (this.args2NewArgsMapping[argCounter] < 0)\t\n\t\t\t\tthis.args2NewArgsMapping[argCounter] = 0;\n\t\t\t\n//\t\t\tmap new argument position to its corresponding taint\n\t\t\tthis.newArgs2TaintMapping.put(this.args2NewArgsMapping[argCounter], this.args2NewArgsMapping[argCounter] + args[i].getSize());\n\t\t\targCounter += args[i].getSize();\n\t\t\t\n\t\t\t// every non-object array has a separated taint-label-array that\n\t\t\t// represents the taint value of each element\n\t\t\tif (args[i].getSort() == Type.ARRAY) {\n\t\t\t\tif (args[i].getElementType().getSort() != Type.OBJECT && args[i].getDimensions() == 1) {\n\t\t\t\t\tthis.newArgsOffset++;\n\t\t\t\t}\n\t\t\t\telse if (args[i].getElementType().getSort() == Type.OBJECT && TaintTrackerConfig.isString(args[i].getElementType())){\n\t\t\t\t\tthis.newArgsOffset++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// every primitive-typed parameter has an own taint-label\n\t\t\telse if (args[i].getSort() != Type.OBJECT || TaintTrackerConfig.isString(args[i])) {\n\t\t\t\tthis.newArgsOffset++;\n\t\t\t}\n\t\t}\n\t}",
"List method_111(class_922 var1, int var2, int var3, int var4);",
"StackManipulation virtual(TypeDescription invocationTarget);",
"public abstract CallAdapter<?, ?> mo38628a(Type type, Annotation[] annotationArr, C13430i iVar);",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"public void argumentTypes (final A_Type... argTypes)\n\t{\n\t\tassert localTypes.size() == 0\n\t\t\t: \"Must declare argument types before allocating locals\";\n\t\tCollections.addAll(argumentTypes, argTypes);\n\t}",
"@org.junit.Test(timeout = 10000)\n public void annotatedArgumentOfParameterizedType_cf920() {\n java.lang.String expected = (\"java.util.List<@\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String>\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class).annotated(NEVER_NULL);\n com.squareup.javapoet.ClassName list = com.squareup.javapoet.ClassName.get(java.util.List.class);\n java.lang.String actual = com.squareup.javapoet.ParameterizedTypeName.get(list, type).toString();\n // StatementAdderOnAssert create random local variable\n java.lang.Object vc_435 = new java.lang.Object();\n // AssertGenerator replace invocation\n boolean o_annotatedArgumentOfParameterizedType_cf920__12 = // StatementAdderMethod cloned existing statement\n type.equals(vc_435);\n // AssertGenerator add assertion\n org.junit.Assert.assertFalse(o_annotatedArgumentOfParameterizedType_cf920__12);\n org.junit.Assert.assertEquals(expected, actual);\n }",
"private static void extractGenericsArguments() throws NoSuchMethodException\r\n {\n Method getInternalListMethod = GenericsClass.class.getMethod( \"getInternalList\" );\r\n\r\n // we get the return type\r\n Type getInternalListMethodGenericReturnType = getInternalListMethod.getGenericReturnType();\r\n\r\n // we can check if the return type is parameterized (using ParameterizedType)\r\n if( getInternalListMethodGenericReturnType instanceof ParameterizedType )\r\n {\r\n ParameterizedType parameterizedType = (ParameterizedType)getInternalListMethodGenericReturnType;\r\n // we get the type of the arguments for the parameterized type\r\n Type[] typeArguments = parameterizedType.getActualTypeArguments();\r\n for( Type typeArgument : typeArguments )\r\n {\r\n // we can work with that now\r\n Class<?> typeClass = (Class<?>)typeArgument;\r\n System.out.println( \"typeArgument = \" + typeArgument );\r\n System.out.println( \"typeClass = \" + typeClass );\r\n }\r\n }\r\n }",
"protected final com.p111d.p112a.p121c.p134k.C7119d m3865a(com.p111d.p112a.p121c.aa r14, com.p111d.p112a.p121c.p128f.C1451n r15, com.p111d.p112a.p121c.C5354j r16, com.p111d.p112a.p121c.C1545o<?> r17, com.p111d.p112a.p121c.p131i.C1478f r18, com.p111d.p112a.p121c.p131i.C1478f r19, com.p111d.p112a.p121c.p128f.C5328e r20, boolean r21) {\n /*\n r13 = this;\n r0 = r13;\n r5 = r16;\n r1 = r19;\n r11 = r20;\n r2 = r0.f4676d;\n r3 = r0.f4673a;\n r2 = r2.refineSerializationType(r3, r11, r5);\n r3 = 1;\n if (r2 == r5) goto L_0x0058;\n L_0x0012:\n r4 = r2.m11531e();\n r6 = r16.m11531e();\n r7 = r4.isAssignableFrom(r6);\n if (r7 != 0) goto L_0x0056;\n L_0x0020:\n r7 = r6.isAssignableFrom(r4);\n if (r7 != 0) goto L_0x0056;\n L_0x0026:\n r1 = new java.lang.IllegalArgumentException;\n r2 = new java.lang.StringBuilder;\n r3 = \"Illegal concrete-type annotation for method '\";\n r2.<init>(r3);\n r3 = r20.mo1360b();\n r2.append(r3);\n r3 = \"': class \";\n r2.append(r3);\n r3 = r4.getName();\n r2.append(r3);\n r3 = \" not a super-type of (declared) class \";\n r2.append(r3);\n r3 = r6.getName();\n r2.append(r3);\n r2 = r2.toString();\n r1.<init>(r2);\n throw r1;\n L_0x0056:\n r4 = r3;\n goto L_0x005b;\n L_0x0058:\n r4 = r21;\n r2 = r5;\n L_0x005b:\n r6 = r0.f4676d;\n r6 = r6.findSerializationTyping(r11);\n r7 = 0;\n if (r6 == 0) goto L_0x006f;\n L_0x0064:\n r8 = com.p111d.p112a.p121c.p122a.C1397f.C1396b.DEFAULT_TYPING;\n if (r6 == r8) goto L_0x006f;\n L_0x0068:\n r4 = com.p111d.p112a.p121c.p122a.C1397f.C1396b.STATIC;\n if (r6 != r4) goto L_0x006e;\n L_0x006c:\n r4 = r3;\n goto L_0x006f;\n L_0x006e:\n r4 = r7;\n L_0x006f:\n r6 = 0;\n if (r4 == 0) goto L_0x0077;\n L_0x0072:\n r2 = r2.mo3385d();\n goto L_0x0078;\n L_0x0077:\n r2 = r6;\n L_0x0078:\n if (r1 == 0) goto L_0x00bc;\n L_0x007a:\n if (r2 != 0) goto L_0x007d;\n L_0x007c:\n r2 = r5;\n L_0x007d:\n r4 = r2.mo3394u();\n if (r4 != 0) goto L_0x00b6;\n L_0x0083:\n r1 = new java.lang.IllegalStateException;\n r3 = new java.lang.StringBuilder;\n r4 = \"Problem trying to create BeanPropertyWriter for property '\";\n r3.<init>(r4);\n r4 = r15.mo1398a();\n r3.append(r4);\n r4 = \"' (of type \";\n r3.append(r4);\n r4 = r0.f4674b;\n r4 = r4.m3615a();\n r3.append(r4);\n r4 = \"); serialization type \";\n r3.append(r4);\n r3.append(r2);\n r2 = \" has no content\";\n r3.append(r2);\n r2 = r3.toString();\n r1.<init>(r2);\n throw r1;\n L_0x00b6:\n r1 = r2.mo3383b(r1);\n r8 = r1;\n goto L_0x00bd;\n L_0x00bc:\n r8 = r2;\n L_0x00bd:\n r1 = r0.f4675c;\n r2 = r15.mo1423y();\n r1 = r1.m3138a(r2);\n r1 = r1.m3139b();\n r2 = com.p111d.p112a.p113a.C1329q.C1327a.USE_DEFAULTS;\n if (r1 != r2) goto L_0x00d1;\n L_0x00cf:\n r1 = com.p111d.p112a.p113a.C1329q.C1327a.ALWAYS;\n L_0x00d1:\n r2 = com.p111d.p112a.p121c.p134k.C1501m.C15001.f4671a;\n r1 = r1.ordinal();\n r1 = r2[r1];\n switch(r1) {\n case 1: goto L_0x00ef;\n case 2: goto L_0x00e5;\n case 3: goto L_0x00df;\n case 4: goto L_0x00dd;\n default: goto L_0x00dc;\n };\n L_0x00dc:\n goto L_0x0127;\n L_0x00dd:\n r7 = r3;\n goto L_0x0127;\n L_0x00df:\n r1 = com.p111d.p112a.p121c.p134k.C7119d.f20265c;\n L_0x00e1:\n r10 = r1;\n r9 = r3;\n goto L_0x013d;\n L_0x00e5:\n r1 = r16.mo3560a();\n if (r1 == 0) goto L_0x00ec;\n L_0x00eb:\n goto L_0x00df;\n L_0x00ec:\n r9 = r3;\n r10 = r6;\n goto L_0x013d;\n L_0x00ef:\n if (r8 != 0) goto L_0x00f3;\n L_0x00f1:\n r1 = r5;\n goto L_0x00f4;\n L_0x00f3:\n r1 = r8;\n L_0x00f4:\n r2 = r0.f4675c;\n r2 = r2.m3139b();\n r4 = com.p111d.p112a.p113a.C1329q.C1327a.NON_DEFAULT;\n if (r2 != r4) goto L_0x0107;\n L_0x00fe:\n r2 = r15.mo1398a();\n r1 = r0.m3864a(r2, r11, r1);\n goto L_0x010b;\n L_0x0107:\n r1 = com.p111d.p112a.p121c.p134k.C1501m.m3863a(r1);\n L_0x010b:\n if (r1 != 0) goto L_0x010e;\n L_0x010d:\n goto L_0x00e1;\n L_0x010e:\n r2 = r1.getClass();\n r2 = r2.isArray();\n if (r2 == 0) goto L_0x0139;\n L_0x0118:\n r2 = java.lang.reflect.Array.getLength(r1);\n r3 = r1.getClass();\n r4 = new com.d.a.c.m.b$1;\n r4.<init>(r3, r2, r1);\n r10 = r4;\n goto L_0x013c;\n L_0x0127:\n r1 = r16.mo3391n();\n if (r1 == 0) goto L_0x013b;\n L_0x012d:\n r1 = r0.f4673a;\n r2 = com.p111d.p112a.p121c.C5387z.WRITE_EMPTY_JSON_ARRAYS;\n r1 = r1.m18737a(r2);\n if (r1 != 0) goto L_0x013b;\n L_0x0137:\n r1 = com.p111d.p112a.p121c.p134k.C7119d.f20265c;\n L_0x0139:\n r10 = r1;\n goto L_0x013c;\n L_0x013b:\n r10 = r6;\n L_0x013c:\n r9 = r7;\n L_0x013d:\n r12 = new com.d.a.c.k.d;\n r1 = r0.f4674b;\n r4 = r1.mo1376f();\n r1 = r12;\n r2 = r15;\n r3 = r11;\n r6 = r17;\n r7 = r18;\n r1.<init>(r2, r3, r4, r5, r6, r7, r8, r9, r10);\n r1 = r0.f4676d;\n r1 = r1.findNullSerializer(r11);\n if (r1 == 0) goto L_0x015f;\n L_0x0157:\n r2 = r14;\n r1 = r2.mo2929c(r1);\n r12.mo3537b(r1);\n L_0x015f:\n r1 = r0.f4676d;\n r1 = r1.findUnwrappingNameTransformer(r11);\n if (r1 == 0) goto L_0x016d;\n L_0x0167:\n r2 = new com.d.a.c.k.a.r;\n r2.<init>(r12, r1);\n r12 = r2;\n L_0x016d:\n return r12;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.d.a.c.k.m.a(com.d.a.c.aa, com.d.a.c.f.n, com.d.a.c.j, com.d.a.c.o, com.d.a.c.i.f, com.d.a.c.i.f, com.d.a.c.f.e, boolean):com.d.a.c.k.d\");\n }",
"@org.junit.Test(timeout = 10000)\n public void annotatedArgumentOfParameterizedType_cf927() {\n java.lang.String expected = (\"java.util.List<@\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String>\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class).annotated(NEVER_NULL);\n com.squareup.javapoet.ClassName list = com.squareup.javapoet.ClassName.get(java.util.List.class);\n java.lang.String actual = com.squareup.javapoet.ParameterizedTypeName.get(list, type).toString();\n // AssertGenerator replace invocation\n boolean o_annotatedArgumentOfParameterizedType_cf927__10 = // StatementAdderMethod cloned existing statement\n type.isBoxedPrimitive();\n // AssertGenerator add assertion\n org.junit.Assert.assertFalse(o_annotatedArgumentOfParameterizedType_cf927__10);\n org.junit.Assert.assertEquals(expected, actual);\n }",
"public void method_197(class_1549 var1, long var2) {}",
"public abstract String paramsToString();",
"public abstract void mo1184a(Object obj);",
"public void setArguments(Object[] method)\n {\n __m_Arguments = method;\n }",
"private static Arguments toArguments(Object item) {\n if (item instanceof Arguments) {\n return (Arguments) item;\n }\n // Pass all multidimensional arrays \"as is\", in contrast to Object[].\n // See https://github.com/junit-team/junit5/issues/1665\n if (ReflectionUtils.isMultidimensionalArray(item)) {\n return arguments(item);\n }\n // Special treatment for one-dimensional reference arrays.\n // See https://github.com/junit-team/junit5/issues/1665\n if (item instanceof Object[]) {\n return arguments((Object[]) item);\n }\n // Pass everything else \"as is\".\n return arguments(item);\n }",
"public void testOneOrMoreParameters() {\n int nrParameters = methodToTest.getParameterTypes().length;\n Class[] params = methodToTest.getParameterTypes();\n Object[] foo = new Object[nrParameters];\n \n // set up all parameters. Some methods are invoked with\n // primitives or collections, so we need to create them\n // accordingly\n for (int i = 0; i < nrParameters; i++) {\n try {\n if (params[i].isPrimitive()) {\n String primitiveName = params[i]\n .getName();\n if (primitiveName.equals(\"int\")) {\n foo[i] = Integer.valueOf(0);\n }\n if (primitiveName.equals(\"boolean\")) {\n foo[i] = Boolean.TRUE;\n }\n if (primitiveName.equals(\"short\")) {\n foo[i] = new Short(\"0\");\n }\n } else if (params[i].getName().equals(\"java.util.Collection\")) {\n foo[i] = new ArrayList();\n } else {\n /*\n * this call could easily fall if there is e.g. no public\n * default constructor. If it fails tweak the if/else tree\n * above to accommodate the parameter or check if we need to\n * test the particular method at all.\n */\n foo[i] = params[i].newInstance();\n }\n } catch (InstantiationException e) {\n fail(\"Cannot create an instance of : \"\n + params[i].getName()\n + \", required for \"\n + methodToTest.getName()\n + \". Check if \"\n + \"test needs reworking.\");\n } catch (IllegalAccessException il) {\n fail(\"Illegal Access to : \"\n + params[i].getName());\n }\n }\n \n try {\n methodToTest.invoke(facade, foo);\n fail(methodToTest.getName()\n + \" does not deliver an IllegalArgumentException\");\n } catch (InvocationTargetException e) {\n if (e.getTargetException() instanceof IllegalArgumentException \n || e.getTargetException() instanceof ClassCastException\n || e.getTargetException() instanceof NotImplementedException) {\n return;\n }\n fail(\"Test failed for \" + methodToTest.toString()\n + \" because of: \"\n + e.getTargetException());\n } catch (NotImplementedException e) {\n // If method not supported ignore failure\n } catch (Exception e) {\n fail(\"Test failed for \" + methodToTest.toString()\n + \" because of: \" + e.toString());\n }\n }",
"private static void mapArgumentsToJava(Object[] args) {\n if (null != args) {\n for (int a = 0; a < args.length; a++) {\n args[a] = mapValueToJava(args[a]);\n }\n }\n }",
"public void bindArguments() {\n\n\t\tif (this.arguments != null) {\n\t\t\t// by default arguments in abstract/native methods are considered to be used (no complaint is expected)\n\t\t\tif (this.binding == null) {\n\t\t\t\tfor (int i = 0, length = this.arguments.length; i < length; i++) {\n\t\t\t\t\tthis.arguments[i].bind(this.scope, null, true);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tboolean used = this.binding.isAbstract() || this.binding.isNative();\n\t\t\tfor (int i = 0, length = this.arguments.length; i < length; i++) {\n\t\t\t\tArgument argument = this.arguments[i];\n\t\t\t\targument.bind(this.scope, this.binding.parameters[i], used);\n\t\t\t\tif (argument.annotations != null) {\n\t\t\t\t\tthis.binding.tagBits |= TagBits.HasParameterAnnotations;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"void mo12651e(String str, String str2, Object... objArr);",
"@Override\n\tpublic void debug(String message, Object... params) {\n\n\t}",
"@Override\n\tpublic Object call(Object[] invokedArgs) {\n\t\treturn returnType.cast(informer.get(fieldName));\n\t}",
"void mo12652i(String str, String str2, Object... objArr);",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FEnumerator src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"public AmbiguousMethodException() {\n super();\n }",
"public static void main(String[] args) {\n\t\tOverloadingType1 ot1 = new OverloadingType1();\n\t\tshort a=3, b=6;\n\t\tot1.add(2, 3);\n\t\tot1.add(a, b);\n\t\tot1.add(a);\n\t\t\n\t\t\n\t}",
"@Override\n public void analyze(Analyzer analyzer) throws VerifierException {\n VarTypes[] paramTypes = this.paramList.getParamsTypes(analyzer);\n if (!analyzer.has(this.callee, paramTypes)) {\n StringJoiner joiner = new StringJoiner(\", \");\n for (VarTypes type : paramTypes) {\n joiner.add(type.getName());\n }\n String signature = String.format(\"%s(%s)\", this.callee, joiner.toString());\n throw new InvalidMethodException(signature);\n }\n }",
"void mo67921a(Object obj);",
"@Override\n public void visitCallExpression(PsiCallExpression expression) {\n super.visitCallExpression(expression);\n //Get the types of all of the arguments, if one matches our checked classes, then we FLAG the CODE!\n\n PsiExpressionList list = expression.getArgumentList();\n PsiExpression[] type = list.getExpressions();\n\n/*\n if (isCheckedType(expression.getType())) //Check the call\n holder.registerProblem(expression,\n METHOD_CALL_EXPRESSION , myQuickFix);\n*/\n\n for (int i = 0; i < type.length; i++) { //Check the call arguments\n if (isCheckedType(type[i].getType()))\n holder.registerProblem(type[i],\n METHOD_CALL_ARGUMENT + \". Argument '\" + type[i].getText() + \"' is of unvalidated type '\" + type[i].getType().getPresentableText() + \"'\", callFix);\n }\n\n }",
"@Override\n\t\tpublic Object[] getParameters() {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tpublic void javaMethodBaseWithNSStringArg(xNSString string) {\n\t\t\n\t}",
"public abstract String mo83558a(Object obj);",
"@Override\n\t\tpublic Object getTypedParams(Object params) {\n\t\t\treturn null;\n\t\t}",
"@Override\n\t\tpublic Object getTypedParams(Object params) {\n\t\t\treturn null;\n\t\t}",
"private static Object[] parametersForVarargs(Class<?>[] parameterTypes, Object[] parameters) {\n int fixedLen = parameterTypes.length - 1;\n Class<?> componentType = parameterTypes[fixedLen].getComponentType();\n assert componentType != null;\n if (componentType.isPrimitive()) {\n componentType = ClassUtils.primitiveToWrapper(componentType);\n }\n int arrayLength = parameters.length - fixedLen;\n\n if (arrayLength >= 0) {\n if (arrayLength == 1 && parameterTypes[fixedLen].isInstance(parameters[fixedLen])) {\n // not a varargs call\n return parameters;\n } else if ((arrayLength > 0 && (componentType.isInstance(parameters[fixedLen]) || parameters[fixedLen] == null)) ||\n arrayLength == 0) {\n Object array = DefaultTypeTransformation.castToVargsArray(parameters, fixedLen, parameterTypes[fixedLen]);\n Object[] parameters2 = new Object[fixedLen + 1];\n System.arraycopy(parameters, 0, parameters2, 0, fixedLen);\n parameters2[fixedLen] = array;\n\n return parameters2;\n }\n }\n return parameters;\n }",
"@Override\r\n\t\t\tpublic void debug(String arg) {\n\t\t\t\t\r\n\t\t\t}",
"void m21805a(Object obj);",
"public abstract interface QueryArgs {\n\n /** Return the catalog associated with this object */\n public Catalog getCatalog();\n\n /** Set the value for the ith parameter */\n public void setParamValue(int i, Object value);\n\n /** Set the value for the parameter with the given label */\n public void setParamValue(String label, Object value);\n\n /** Set the min and max values for the parameter with the given label */\n public void setParamValueRange(String label, Object minValue, Object maxValue);\n\n /** Set the int value for the parameter with the given label */\n public void setParamValue(String label, int value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValue(String label, double value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValueRange(String label, double minValue, double maxValue);\n\n /** Set the array of parameter values directly. */\n public void setParamValues(Object[] values);\n\n /** Get the value of the ith parameter */\n public Object getParamValue(int i);\n\n /** Get the value of the named parameter\n *\n * @param label the parameter name or id\n * @return the value of the parameter, or null if not specified\n */\n public Object getParamValue(String label);\n\n /**\n * Get the value of the named parameter as an integer.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public int getParamValueAsInt(String label, int defaultValue);\n\n /**\n * Get the value of the named parameter as a double.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public double getParamValueAsDouble(String label, double defaultValue);\n\n /**\n * Get the value of the named parameter as a String.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public String getParamValueAsString(String label, String defaultValue);\n\n\n /**\n * Return the object id being searched for, or null if none was defined.\n */\n public String getId();\n\n /**\n * Set the object id to search for.\n */\n public void setId(String id);\n\n\n /**\n * Return an object describing the query region (center position and\n * radius range), or null if none was defined.\n */\n public CoordinateRadius getRegion();\n\n /**\n * Set the query region (center position and radius range) for\n * the search.\n */\n public void setRegion(CoordinateRadius region);\n\n\n /**\n * Return an array of SearchCondition objects indicating the\n * values or range of values to search for.\n */\n public SearchCondition[] getConditions();\n\n /** Returns the max number of rows to be returned from a table query */\n public int getMaxRows();\n\n /** Set the max number of rows to be returned from a table query */\n public void setMaxRows(int maxRows);\n\n\n /** Returns the query type (an optional string, which may be interpreted by some catalogs) */\n public String getQueryType();\n\n /** Set the query type (an optional string, which may be interpreted by some catalogs) */\n public void setQueryType(String queryType);\n\n /**\n * Returns a copy of this object\n */\n public QueryArgs copy();\n\n /**\n * Optional: If not null, use this object for displaying the progress of the background query\n */\n public StatusLogger getStatusLogger();\n}",
"@Test\n\tpublic void testChangeMethodParameters() {\n\t\tDeclarationListDelta delta = createClassDelta(\n\t\t\t\t\"int someMethod(String x) { return 0;} \",\n\t\t\t\t\"int someMethod(int x) { return 0;}\");\n\n\t\tassertEquals(1, delta.getAddedDeclarations().size());\n\t\tassertEquals(0, delta.getChangedDeclarations().size());\n\t\tassertEquals(1, delta.getRemovedDeclarations().size());\n\n\t\tString removedMethod = methodSignature(delta.getRemovedDeclarations()\n\t\t\t\t.get(0));\n\t\tassertEquals(\"int someMethod(String)\", removedMethod);\n\n\t\tString addedMethod = methodSignature(delta.getAddedDeclarations()\n\t\t\t\t.get(0));\n\t\tassertEquals(\"int someMethod(int)\", addedMethod);\n\t}",
"public interface C45946d {\n @C6457h\n /* renamed from: a */\n C12466b<TypedInput> mo111267a(@C6450ac String str, @C6461l List<C12461b> list);\n\n @C6468s\n /* renamed from: a */\n C12466b<TypedInput> mo111268a(@C6450ac String str, @C6461l List<C12461b> list, @C6451b TypedByteArray typedByteArray);\n}",
"@Override\n \tprotected boolean checkDelegateMethod(Method input) {\n \t\tif (!domain.checkElementType(target, input.getGenericReturnType())) {\n \t\t\treturn false;\n \t\t}\n \n \t\tClass<?>[] delegateParams = input.getParameterTypes();\n \n \t\t// must have first argument of type of the setter container\n \t\tif (!(delegateParams.length == 1 && domain.checkClassifierType(\n \t\t\t\ttarget.getEContainingClass(), delegateParams[0]))) {\n \t\t\treturn false;\n \t\t}\n \n \t\treturn true;\n \t}",
"private static Object[] cleanUrlArgs(Object... args) {\n for (int i = 0; i < args.length; i++) {\n Object arg = args[i];\n if(arg.getClass() == long.class || arg.getClass() == int.class) {\n args[i] = Long.toString((long) arg);\n }\n else if(arg.getClass() == Long.class\n || arg.getClass() == Integer.class) {\n args[i] = arg.toString();\n }\n }\n return args;\n }",
"void m21806b(Object obj);",
"public String argTypes() {\n return \"I\";//NOI18N\n }",
"public final java.util.List<p298d.p299a.p300a.p301a.p303y0.p314d.p315a.p322j0.C6439z> mo23417P(java.lang.reflect.Type[] r13, java.lang.annotation.Annotation[][] r14, boolean r15) {\n /*\n r12 = this;\n java.lang.String r0 = \"parameterTypes\"\n p298d.p344x.p346c.C6888i.m12438e(r13, r0)\n java.lang.String r0 = \"parameterAnnotations\"\n p298d.p344x.p346c.C6888i.m12438e(r14, r0)\n java.util.ArrayList r0 = new java.util.ArrayList\n int r1 = r13.length\n r0.<init>(r1)\n java.lang.reflect.Member r1 = r12.mo23408O()\n java.lang.String r2 = \"member\"\n p298d.p344x.p346c.C6888i.m12438e(r1, r2)\n d.a.a.a.y0.b.j1.b.a$a r3 = p298d.p299a.p300a.p301a.p303y0.p304b.p309j1.p311b.C6170a.f12188a\n r4 = 0\n r5 = 0\n if (r3 != 0) goto L_0x004f\n p298d.p344x.p346c.C6888i.m12438e(r1, r2)\n java.lang.Class r2 = r1.getClass()\n java.lang.String r3 = \"getParameters\"\n java.lang.Class[] r6 = new java.lang.Class[r5] // Catch:{ NoSuchMethodException -> 0x0047 }\n java.lang.reflect.Method r3 = r2.getMethod(r3, r6) // Catch:{ NoSuchMethodException -> 0x0047 }\n java.lang.ClassLoader r2 = p298d.p299a.p300a.p301a.p303y0.p304b.p309j1.p311b.C6173b.m11076e(r2)\n java.lang.String r6 = \"java.lang.reflect.Parameter\"\n java.lang.Class r2 = r2.loadClass(r6)\n d.a.a.a.y0.b.j1.b.a$a r6 = new d.a.a.a.y0.b.j1.b.a$a\n java.lang.Class[] r7 = new java.lang.Class[r5]\n java.lang.String r8 = \"getName\"\n java.lang.reflect.Method r2 = r2.getMethod(r8, r7)\n r6.<init>(r3, r2)\n r3 = r6\n goto L_0x004d\n L_0x0047:\n d.a.a.a.y0.b.j1.b.a$a r2 = new d.a.a.a.y0.b.j1.b.a$a\n r2.<init>(r4, r4)\n r3 = r2\n L_0x004d:\n p298d.p299a.p300a.p301a.p303y0.p304b.p309j1.p311b.C6170a.f12188a = r3\n L_0x004f:\n java.lang.reflect.Method r2 = r3.f12189a\n if (r2 != 0) goto L_0x0054\n goto L_0x0058\n L_0x0054:\n java.lang.reflect.Method r3 = r3.f12190b\n if (r3 != 0) goto L_0x005a\n L_0x0058:\n r2 = r4\n goto L_0x0086\n L_0x005a:\n java.lang.Object[] r6 = new java.lang.Object[r5]\n java.lang.Object r1 = r2.invoke(r1, r6)\n java.lang.String r2 = \"null cannot be cast to non-null type kotlin.Array<*>\"\n java.util.Objects.requireNonNull(r1, r2)\n java.lang.Object[] r1 = (java.lang.Object[]) r1\n java.util.ArrayList r2 = new java.util.ArrayList\n int r6 = r1.length\n r2.<init>(r6)\n int r6 = r1.length\n r7 = r5\n L_0x006f:\n if (r7 >= r6) goto L_0x0086\n r8 = r1[r7]\n java.lang.Object[] r9 = new java.lang.Object[r5]\n java.lang.Object r8 = r3.invoke(r8, r9)\n java.lang.String r9 = \"null cannot be cast to non-null type kotlin.String\"\n java.util.Objects.requireNonNull(r8, r9)\n java.lang.String r8 = (java.lang.String) r8\n r2.add(r8)\n int r7 = r7 + 1\n goto L_0x006f\n L_0x0086:\n if (r2 != 0) goto L_0x008a\n r1 = r4\n goto L_0x0092\n L_0x008a:\n int r1 = r2.size()\n java.lang.Integer r1 = java.lang.Integer.valueOf(r1)\n L_0x0092:\n if (r1 != 0) goto L_0x0096\n r1 = r5\n goto L_0x009c\n L_0x0096:\n int r1 = r1.intValue()\n int r3 = r13.length\n int r1 = r1 - r3\n L_0x009c:\n int r3 = r13.length\n int r3 = r3 + -1\n if (r3 < 0) goto L_0x0152\n r6 = r5\n L_0x00a2:\n int r7 = r6 + 1\n r8 = r13[r6]\n java.lang.String r9 = \"type\"\n p298d.p344x.p346c.C6888i.m12438e(r8, r9)\n boolean r9 = r8 instanceof java.lang.Class\n if (r9 == 0) goto L_0x00be\n r10 = r8\n java.lang.Class r10 = (java.lang.Class) r10\n boolean r11 = r10.isPrimitive()\n if (r11 == 0) goto L_0x00be\n d.a.a.a.y0.b.j1.b.c0 r8 = new d.a.a.a.y0.b.j1.b.c0\n r8.<init>(r10)\n goto L_0x00e6\n L_0x00be:\n boolean r10 = r8 instanceof java.lang.reflect.GenericArrayType\n if (r10 != 0) goto L_0x00e0\n if (r9 == 0) goto L_0x00ce\n r9 = r8\n java.lang.Class r9 = (java.lang.Class) r9\n boolean r9 = r9.isArray()\n if (r9 == 0) goto L_0x00ce\n goto L_0x00e0\n L_0x00ce:\n boolean r9 = r8 instanceof java.lang.reflect.WildcardType\n if (r9 == 0) goto L_0x00da\n d.a.a.a.y0.b.j1.b.g0 r9 = new d.a.a.a.y0.b.j1.b.g0\n java.lang.reflect.WildcardType r8 = (java.lang.reflect.WildcardType) r8\n r9.<init>(r8)\n goto L_0x00e5\n L_0x00da:\n d.a.a.a.y0.b.j1.b.s r9 = new d.a.a.a.y0.b.j1.b.s\n r9.<init>(r8)\n goto L_0x00e5\n L_0x00e0:\n d.a.a.a.y0.b.j1.b.h r9 = new d.a.a.a.y0.b.j1.b.h\n r9.<init>(r8)\n L_0x00e5:\n r8 = r9\n L_0x00e6:\n if (r2 != 0) goto L_0x00ea\n r9 = r4\n goto L_0x00f4\n L_0x00ea:\n int r9 = r6 + r1\n java.lang.Object r9 = p298d.p334t.C6790h.m12365s(r2, r9)\n java.lang.String r9 = (java.lang.String) r9\n if (r9 == 0) goto L_0x010e\n L_0x00f4:\n if (r15 == 0) goto L_0x00fe\n int r10 = p005b.p291q.p292a.C5266a.m9790D1(r13)\n if (r6 != r10) goto L_0x00fe\n r10 = 1\n goto L_0x00ff\n L_0x00fe:\n r10 = r5\n L_0x00ff:\n d.a.a.a.y0.b.j1.b.f0 r11 = new d.a.a.a.y0.b.j1.b.f0\n r6 = r14[r6]\n r11.<init>(r8, r6, r9, r10)\n r0.add(r11)\n if (r7 <= r3) goto L_0x010c\n goto L_0x0152\n L_0x010c:\n r6 = r7\n goto L_0x00a2\n L_0x010e:\n java.lang.StringBuilder r13 = new java.lang.StringBuilder\n r13.<init>()\n java.lang.String r14 = \"No parameter with index \"\n r13.append(r14)\n r13.append(r6)\n r14 = 43\n r13.append(r14)\n r13.append(r1)\n java.lang.String r14 = \" (name=\"\n r13.append(r14)\n d.a.a.a.y0.f.d r14 = r12.getName()\n r13.append(r14)\n java.lang.String r14 = \" type=\"\n r13.append(r14)\n r13.append(r8)\n java.lang.String r14 = \") in \"\n r13.append(r14)\n r13.append(r2)\n java.lang.String r14 = \"@ReflectJavaMember\"\n r13.append(r14)\n java.lang.String r13 = r13.toString()\n java.lang.IllegalStateException r14 = new java.lang.IllegalStateException\n java.lang.String r13 = r13.toString()\n r14.<init>(r13)\n throw r14\n L_0x0152:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p298d.p299a.p300a.p301a.p303y0.p304b.p309j1.p311b.C6204y.mo23417P(java.lang.reflect.Type[], java.lang.annotation.Annotation[][], boolean):java.util.List\");\n }",
"public Object[] getArgumentArray() {\n return null;\n }",
"protected void a(int paramInt1, int paramInt2, boolean paramBoolean, yz paramyz) {}",
"@Override\r\n public Object getJsObjectInfo(Object[] jsObject, String method, Object[] args) {\r\n {\r\n return null;\r\n }\r\n }"
]
| [
"0.6327313",
"0.62586063",
"0.61457986",
"0.61457986",
"0.61427337",
"0.60445845",
"0.6036601",
"0.6033903",
"0.58961624",
"0.5843375",
"0.5833887",
"0.5816439",
"0.57905793",
"0.57429945",
"0.5739542",
"0.57239294",
"0.57194895",
"0.5691225",
"0.5681844",
"0.5680264",
"0.5658851",
"0.56477624",
"0.56362563",
"0.5628306",
"0.562811",
"0.56264216",
"0.562127",
"0.56060725",
"0.5535011",
"0.55311847",
"0.5524091",
"0.55149275",
"0.5512123",
"0.5508656",
"0.5500639",
"0.54940176",
"0.54902315",
"0.5487756",
"0.5477762",
"0.5466595",
"0.5459925",
"0.54577214",
"0.54490197",
"0.54490197",
"0.54490197",
"0.54490197",
"0.54490197",
"0.54490197",
"0.54490197",
"0.54490197",
"0.54490197",
"0.54490197",
"0.54490197",
"0.54490197",
"0.54490197",
"0.54490197",
"0.54490197",
"0.54490197",
"0.54490197",
"0.5443959",
"0.54420984",
"0.5428362",
"0.5427903",
"0.5420749",
"0.54173446",
"0.5415329",
"0.54137903",
"0.5407875",
"0.5395759",
"0.53922725",
"0.53752893",
"0.537128",
"0.536214",
"0.5341006",
"0.53317386",
"0.5330845",
"0.5327664",
"0.5323615",
"0.5311828",
"0.53089374",
"0.52957267",
"0.5291788",
"0.529173",
"0.52849007",
"0.52830476",
"0.5281191",
"0.5281191",
"0.527784",
"0.5277471",
"0.52649707",
"0.52543",
"0.52490336",
"0.52487093",
"0.52257085",
"0.522136",
"0.52155703",
"0.5215499",
"0.52131754",
"0.52126396",
"0.520963",
"0.5203555"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void doUpdatePerm(String roleId, String addIds, String delIds) throws Exception {
Role role=(Role) repertory.findById(Role.class, roleId);
if(role==null){
throw new Exception("角色未找到");
}
String[] addIdsArray=addIds.split(StringVeriable.STR_SPLIT);
/**删除权限的操作*/
String[] delIdsArray=delIds.split(StringVeriable.STR_SPLIT);
/**增加权限的操作*/
for(String addId:addIdsArray){
if(StringUtil.isEmpty(addId)){
continue;
}
Permission perm=(Permission) repertory.getEntityByHql(" from Permission where perCode='"+addId+"' and perType='"+PermType.TYPE_MENU+"'");
//权限已经存在,直接建立关系
if(perm!=null){
String insertSql="insert into ROLE_PERM(roleId,perId) values('"+role.getRoleId()+"','"+perm.getPerId()+"')";
repertory.executeSql(insertSql);
}else{
perm=new Permission();
perm.setPerCode(addId);
perm.setPerType(PermType.TYPE_MENU);
repertory.save(perm);
//先提交到数据库存在进行并联
repertory.flush();
String insertSql="insert into ROLE_PERM(roleId,perId) values('"+role.getRoleId()+"','"+perm.getPerId()+"')";
repertory.executeSql(insertSql);
}
}
for(String delId:delIdsArray){
if(StringUtil.isEmpty(delId)){
continue;
}
Permission perm=(Permission) repertory.getEntityByHql(" from Permission where perCode='"+delId+"' and perType='"+PermType.TYPE_MENU+"'");
if(perm!=null){
//解除关系
String delSql="delete from ROLE_PERM where perId='"+perm.getPerId()+"' and roleId='"+role.getRoleId()+"'";
repertory.executeSql(delSql);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
Metoda pozwala ustawic wlasciwosc okreslajaca dozwolny ksztalt statkow. | public void setProsteLinie(boolean bWartosc)
{
bProsteLinie = bWartosc;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}",
"public String getStato() {\n\t\t\treturn stato;\n\t\t}",
"public String getStat() {\r\n\t\treturn stat;\r\n\t}",
"public Integer getStat() {\r\n return stat;\r\n }",
"public Integer getStat() {\n return stat;\n }",
"public Integer getStat() {\n return stat;\n }",
"public String getVeriStat()\n\t{\n\t\treturn veriStat;\n\t}",
"public void status() {\n System.out.println(\"Nome: \" + this.getNome());\n System.out.println(\"Data de Nascimento: \" + this.getDataNasc());\n System.out.println(\"Peso: \" + this.getPeso());\n System.out.println(\"Altura: \" + this.getAltura());\n }",
"public String GetStatoNaveS() {\n if (this.stato == statonave.INDENNE) {\r\n return \"indenne\";\r\n }\r\n if (this.stato == statonave.COLPITA) {\r\n return \"colpita\";\r\n }\r\n if (this.stato == statonave.AFFONDATA) {\r\n return \"affondata\";\r\n } else {\r\n return \"non c'è alcuna nave!\";\r\n }\r\n }",
"public void setStato(String stato) {\n\t\t\tthis.stato = stato;\n\t\t}",
"private void getStatus() {\n\t\t\n\t}",
"private void ruotaNuovoStatoPaziente() {\r\n\t\tif(nuovoStatoPaziente==StatoPaziente.WAITING_WHITE)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_YELLOW;\r\n\t\telse if(nuovoStatoPaziente==StatoPaziente.WAITING_YELLOW)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_RED;\r\n\t\telse if(nuovoStatoPaziente==StatoPaziente.WAITING_RED)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_WHITE;\r\n\t\t\r\n\t}",
"public void setStat(String stat) {\r\n\t\tthis.stat = stat;\r\n\t}",
"@DISPID(6) //= 0x6. The runtime will prefer the VTID if present\r\n @VTID(13)\r\n short stat();",
"public void setStat(Integer stat) {\r\n this.stat = stat;\r\n }",
"@Override\n\t\tpublic int getStatus() {\n\t\t\treturn 0;\n\t\t}",
"java.lang.String getStatus();",
"java.lang.String getStatus();",
"java.lang.String getStatus();",
"java.lang.String getStatus();",
"String getDataStatus();",
"public void setStat(Integer stat) {\n this.stat = stat;\n }",
"public void setStat(Integer stat) {\n this.stat = stat;\n }",
"public static int getLicznikTur() { return LicznikTur; }",
"@Override\r\n public boolean ubahStatus(int masukan) {\r\n if (masukan == 1) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"private String vylozZvieraZVozidla() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz index zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Zivocich ziv = zoo.vylozZivocicha(pozicia-1);\r\n if (ziv == null) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n }\r\n zoo.pridajZivocicha(ziv);\r\n return \"Zviera \" + ziv\r\n + \"\\n\\tbolo vylozene z prepravneho vozidla\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"public int liczbaelnastosie() {\n\t\treturn 0;\n\t}",
"public void zmienStatusZapytania(StatusZapytania status) {\n\t\tthis.status = status;\n\t}",
"public String meinStatus() {\n try {\n System.out.println(\"--------------------STATUS--------------------\");\n System.out.println(\"Spielfigur: \" + spielfigur);\n System.out.println(\"Kontostand: \" + kontostand);\n System.out.println(\"Aktuell befindest du dich auf: \" + this.aktuellesFeldName.getFeldname());\n\n System.out.println(\"Folgende Felder sind in deinem Besitz :\");\n System.out.println(\"----------------------------------------\");\n for (Spielfelder s : felderInBesitz) {\n\n System.out.println(\"Feldname: \" + s.getFeldname());\n System.out.println(\"Feldummer: \" + s.getFeldnummer());\n\n if (s instanceof Straße) {\n Straße bf = (Straße) s;\n System.out.println(\"Farbe: \" + bf.getFarbe());\n System.out.println(\"Häuser: \" + bf.getAnzahlHaeuser());\n System.out.println(\"Hotels: \" + bf.getAnzahlHotels());\n\n }\n System.out.println(\"----------------------------------------\");\n }\n System.out.println(\"--------------------STATUS ENDE--------------------\");\n System.out.println(\"Gebe JA ein um letzte Aktion durchzuführen\");\n return br.readLine();\n } catch (IOException ex) {\n Logger.getLogger(Spieler.class.getName()).log(Level.SEVERE, null, ex);\n }\n return \"\";\n }",
"private String nalozZvieraNaVozidlo() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz cislo zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Prepravitelny z = (Prepravitelny) zoo.getZvierataZOO(pozicia - 1);\r\n zoo.nalozZivocicha(z);\r\n zoo.odstranZivocicha(pozicia - 1);\r\n return \"Zviera \" + z + \"\\n\\tbolo nalozene na prepravne vozidlo\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nemozno prepravit\\n\\t\";\r\n } catch (NullPointerException exNP) {\r\n return \"Zviera c. \" + pozicia + \" nie je v ZOO\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"@Override\r\n public String vratiVrednostiZaUpdate() {\n \r\n return String.format(\"naziv='%s', trener='%s', menadzer='%s', sponzor='%s', igre='%s', zaradjenNovac=%f, idRegiona=%d, idLokacije=%d\", \r\n this.getNaziv(), this.getTrener(), this.getMenadzer(), this.getSponzor(), this.getIgre(), this.getZaradjenNovac(), this.getRegion().getIdRegiona(),this.getLokacije().getIdLokacije() );\r\n }",
"public String getStatus() {\n if (this.getSize()==0)\n return \"Error\";\n else\n return \"Ok\";\n }",
"@Override\r\n\tpublic String toString()\r\n\t{\r\n\t\treturn \"Macchina a stati finiti di nome \"+nome+\", nello stato \"+corrente.getNome()+\".\";\r\n\t}",
"private void poczatkowe_zmienne()\n {\n konfiguracja.loadProperties();\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(\"predkosc_wroga\"));\n czas_watku=Integer.parseInt(konfiguracja.properties.getProperty(\"czas_watku\"));\n punkty_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(\"punkty_poziomu\"));\n zmienne_poziomu(poziom);\n }",
"String getStatus();",
"String getStatus();",
"String getStatus();",
"String getStatus();",
"String getStatus();",
"@Test\n public void createStatisticsF03_TC2_valid() {\n try {\n Statistica statistica = appService.getStatistica();\n assertTrue(true);\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"Literatura\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"Literatura\") == 1);\n } catch (NotAbleToCreateStatisticsException e) {\n assertTrue(false);\n e.printStackTrace();\n }\n\n }",
"private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}",
"public Status zzc(Status status) {\n return status;\n }",
"@Override\n public int getSalida() {\n return 0;\n }",
"@Override // prekrytie danej metody predka\r\n public String toString() {\r\n return super.toString()\r\n + \" vaha: \" + String.format(\"%.1f kg,\", dajVahu())\r\n + \" farba: \" + dajFarbu() + \".\";\r\n }",
"@Override\n public int status() {\n if (currentLoad <= maxLoad && currentLoad >= 0.6 * maxLoad) return GOOD;\n if (currentLoad < 0.6 * maxLoad && currentLoad >= 0.1 * maxLoad) return CHECK;\n else return BAD;\n }",
"@Override\r\n\tpublic String getOstatu_mota() {\n\t\treturn super.getOstatu_mota();\r\n\t}",
"public int getDossierStatus();",
"Map<String, Double> getStatus();",
"private void sonucYazdir() {\n\t\talinanPuan = (int)(((float)alinanPuan / (float)toplamPuan) * 100);\n\t\tSystem.out.println(\"\\nSınav Bitti..!\\n\" + soruSayisi + \" sorudan \" + dogruSayaci + \" tanesine\"\n\t\t\t\t\t\t+ \" doğru cevap verdiniz.\\nPuan: \" + alinanPuan + \"/\" + toplamPuan);\n\t}",
"public String getStatName() {\n return statName;\n }",
"public String impostaRateoDopoAggiornamento() {\n\t\treturn SUCCESS;\t\n\t}",
"@Override\n\tpublic void statusVomMenschen() {\n\t\tSystem.out.println(\"Sie wurden getroffen nun können Sie nicht mehr so schnell laufen!\");\n\t}",
"public String getStatus() throws VlException\n\t{\n\t\treturn null; \n\t}",
"public int getStat() {\n return statUse.getNumerator();\n }",
"public int getZgrada() {\n return zgrada;\n }",
"float getMonatl_kosten();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"public IzvajalecZdravstvenihStoritev() {\n\t}",
"@Override\n\tpublic int getStatus() {\n\t\treturn _dictData.getStatus();\n\t}",
"private void zmienne_poziomu(int poziom)\n {\n liczba_zyc =Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc\"));\n liczba_naboi=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_naboi\"));\n liczba_zyc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc_wroga\"));\n liczba_pilek=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_pilek\"));\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_predkosc_wroga\"));\n bonusy_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_bonusy_poziomu\"));\n rozmiar_pilki=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_rozmiar_pilki\"));\n zmiana_ruchu_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_zmiana_ruchu_wroga\"));\n czas_gry=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_czas_gry\"));\n }",
"@Override\n\tpublic int getStatus();",
"@Override\n\tpublic int getStatus();",
"com.polytech.spik.protocol.SpikMessages.Status getStatus();",
"com.polytech.spik.protocol.SpikMessages.Status getStatus();",
"int getCouponStat();",
"public String getStatus() { return status; }",
"public int getStatus();",
"public int getStatus();",
"public int getStatus();",
"@Override\n public String toString() {\n return super.toString() + \"\\nSố trang sách: \"+amountPage\n +\"\\nTình trang sách: \"+status+\"\\nSố lượng mượn: \"+amountBorrow;\n }",
"String status();",
"String status();",
"@Override\n\tpublic void getStatus() {\n\t\t\n\t}",
"public StatoOrdine getStatoOrdine() {\r\n\t\tStatoOrdine eStato;\r\n\t\ttry {\r\n\t\t\teStato = StatoOrdine.valueOf(stato);\r\n\t\t} catch (Exception e) {\r\n\t\t\teStato = StatoOrdine.NONE;\r\n\t\t}\r\n\t\treturn eStato;\r\n\t}",
"public String formatStat() {\n return statUse.formatNumerator();\n }",
"public int getStatus ()\n {\n return status;\n }",
"public int getStatus ()\n {\n return status;\n }",
"@Override\n\tpublic String StatistiqueNbrRisuqe(){\n float m= accountRepository.NbrStatus(\"a risque\");\n float s=accountRepository.NbrStatus(\"Stable\");\n float res =( m / s)*100;\n return res+\"%\";\n\n\t}",
"@Override\r\n\tpublic int getOstatu_id() {\n\t\treturn super.getOstatu_id();\r\n\t}",
"public short getStatus()\r\n {\r\n return statusObj.getValue();\r\n }",
"public String toString()\n {\n return statName + \": \" + statValue + \"\\n\";\n }",
"public void status(){\n lblStats.setText(\"\"+level+\"L\");\n }",
"public Date getDataInizioValiditaStato() {\n\t\treturn dataInizioValiditaStato;\n\t}",
"public String zwrocAdresSzablonu() {\r\n\t\treturn adresSzablonu;\r\n\t}",
"public int getPunktyZaZejscie() {\n return punktyZaZejscie;\n }",
"private static int checkStatus(String param) throws IOException {\n\t\tURL url = new URL(Utils.getURL() + \"/status?who=\" + param + \"&login=\" + login + \"&password=\" + password);\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tString resp;\n\t\ttry (InputStream is = conn.getInputStream()) {\n\t\t\tGson gson = new GsonBuilder().create();\n\t\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\t\t\tbyte[] buff = new byte[10240];\n\t\t\tint r;\n\t\t\tdo {\n\t\t\t\tr = is.read(buff);\n\t\t\t\tif (r > 0) bos.write(buff, 0, r);\n\t\t\t} while (r != -1);\n\t\t\tresp = new String(bos.toByteArray(), StandardCharsets.UTF_8);\n\t\t\tMap<String, Boolean> onlineMap = gson.fromJson(resp, TreeMap.class);\n\t\t\tUtils.printOnlineStats(onlineMap);\n\t\t}\n\t\treturn conn.getResponseCode();\n\t}",
"public void pobierzukladprzegladRZiSBO() {\r\n if (uklad.getUklad() == null) {\r\n uklad = ukladBRDAO.findukladBRPodatnikRokPodstawowy(wpisView.getPodatnikObiekt(), wpisView.getRokWpisuSt());\r\n }\r\n List<PozycjaRZiSBilans> pozycje = UkladBRBean.pobierzpozycje(pozycjaRZiSDAO, pozycjaBilansDAO, uklad, \"\", \"r\");\r\n UkladBRBean.czyscPozycje(pozycje);\r\n rootProjektRZiS.getChildren().clear();\r\n List<StronaWiersza> zapisy = StronaWierszaBean.pobraniezapisowwynikoweBO(stronaWierszaDAO, wpisView);\r\n try {\r\n PozycjaRZiSFKBean.ustawRoota(rootProjektRZiS, pozycje, zapisy);\r\n level = PozycjaRZiSFKBean.ustawLevel(rootProjektRZiS, pozycje);\r\n Msg.msg(\"i\", \"Pobrano układ \");\r\n } catch (Exception e) {\r\n E.e(e);\r\n rootProjektRZiS.getChildren().clear();\r\n Msg.msg(\"e\", e.getLocalizedMessage());\r\n }\r\n }",
"public abstract String dohvatiKontakt();",
"public double getSstat() {\n\t\treturn sStatM * speedBase;\n\t}",
"public int getVonalAzonosito()\r\n\t{\r\n\t\treturn vonalAzonosito;\r\n\t}",
"public String getStatus()\n \t{\n \t\treturn m_strStatus;\n \t}"
]
| [
"0.6641981",
"0.6163271",
"0.59421927",
"0.5918036",
"0.58718103",
"0.58718103",
"0.58551985",
"0.57488114",
"0.57358205",
"0.5701543",
"0.5661285",
"0.55862707",
"0.5574915",
"0.5557423",
"0.5538624",
"0.5536838",
"0.5534357",
"0.5534357",
"0.5534357",
"0.5534357",
"0.5521619",
"0.5507564",
"0.5507564",
"0.5483598",
"0.54634535",
"0.5462371",
"0.5458114",
"0.54372656",
"0.543508",
"0.5433638",
"0.54280955",
"0.54258263",
"0.5417635",
"0.53726935",
"0.53258866",
"0.53258866",
"0.53258866",
"0.53258866",
"0.53258866",
"0.53085643",
"0.5306096",
"0.52982605",
"0.52859724",
"0.52853626",
"0.52767015",
"0.5259214",
"0.5255947",
"0.52547705",
"0.5252183",
"0.52517563",
"0.5237475",
"0.523727",
"0.5224428",
"0.52226394",
"0.52186733",
"0.5216593",
"0.5213964",
"0.5213964",
"0.5213964",
"0.5213964",
"0.5213964",
"0.5213964",
"0.5213964",
"0.5213964",
"0.5213964",
"0.5213964",
"0.5213964",
"0.521339",
"0.5204561",
"0.52001655",
"0.5199565",
"0.5199565",
"0.51862043",
"0.51862043",
"0.51835597",
"0.5182336",
"0.51809585",
"0.51809585",
"0.51809585",
"0.5168591",
"0.5167163",
"0.5167163",
"0.51657456",
"0.5162245",
"0.51549035",
"0.5132351",
"0.5132351",
"0.51283646",
"0.51265335",
"0.5121968",
"0.5103888",
"0.5101914",
"0.5101074",
"0.50976926",
"0.5095579",
"0.50948495",
"0.5092102",
"0.5088385",
"0.50857705",
"0.5074107",
"0.50724095"
]
| 0.0 | -1 |
Najprostrza mozliwa implementacja wyboru pola do ostrzelania. Metoda wyszukuje wszystkie pola, na ktore mozna oddac strzal i losowo wybiera jedno z nich. Informacje na temat wspolrzednych oddanego strzalu sa przekazywane do metody strzal() kontenera statkow przekazanego w parametrze i tam jest zrealizowana pelna obsluga strzalu. | protected boolean strzalLosowy(StatekIterator oStatkiPrzeciwnika)
{
try
{
Pozycja oWylosowanePole = losujPole(oStatkiPrzeciwnika.getPlansza());
boolean bTrafienie = oStatkiPrzeciwnika.strzal(oWylosowanePole.getX(), oWylosowanePole.getY());
if (bTrafienie == true)
{
//zapisanie celnego strzalu w tablicy trafien
Pozycja oTrafienie = new Pozycja(2);
oTrafienie.setX(oWylosowanePole.getX());
oTrafienie.setY(oWylosowanePole.getY());
oUzyteczneTrafienia.add(oTrafienie);
}
return bTrafienie;
}
catch (ParametrException e)
{
throw new ProgramistaException(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public String vratiVrednostiZaUpdate() {\n \r\n return String.format(\"naziv='%s', trener='%s', menadzer='%s', sponzor='%s', igre='%s', zaradjenNovac=%f, idRegiona=%d, idLokacije=%d\", \r\n this.getNaziv(), this.getTrener(), this.getMenadzer(), this.getSponzor(), this.getIgre(), this.getZaradjenNovac(), this.getRegion().getIdRegiona(),this.getLokacije().getIdLokacije() );\r\n }",
"public abstract String dohvatiKontakt();",
"public void pobierzukladprzegladRZiSBO() {\r\n if (uklad.getUklad() == null) {\r\n uklad = ukladBRDAO.findukladBRPodatnikRokPodstawowy(wpisView.getPodatnikObiekt(), wpisView.getRokWpisuSt());\r\n }\r\n List<PozycjaRZiSBilans> pozycje = UkladBRBean.pobierzpozycje(pozycjaRZiSDAO, pozycjaBilansDAO, uklad, \"\", \"r\");\r\n UkladBRBean.czyscPozycje(pozycje);\r\n rootProjektRZiS.getChildren().clear();\r\n List<StronaWiersza> zapisy = StronaWierszaBean.pobraniezapisowwynikoweBO(stronaWierszaDAO, wpisView);\r\n try {\r\n PozycjaRZiSFKBean.ustawRoota(rootProjektRZiS, pozycje, zapisy);\r\n level = PozycjaRZiSFKBean.ustawLevel(rootProjektRZiS, pozycje);\r\n Msg.msg(\"i\", \"Pobrano układ \");\r\n } catch (Exception e) {\r\n E.e(e);\r\n rootProjektRZiS.getChildren().clear();\r\n Msg.msg(\"e\", e.getLocalizedMessage());\r\n }\r\n }",
"protected boolean strzalWielokrotny(StatekIterator oStatkiPrzeciwnika, int iIloscPowtorzen)\n\t\t{\n\t\ttry\n\t\t\t{\n\t\t\tPozycja oWylosowanePole = null;\n\t\t\tPlansza oPlansza = oStatkiPrzeciwnika.getPlansza();\n\t\t\tfor (int i = 1; i <= iIloscPowtorzen; ++i)\n\t\t\t\t{\n\t\t\t\toWylosowanePole = losujPole(oPlansza);\n\t\t\t\tif (oPlansza.getPole(oWylosowanePole.getX(), oWylosowanePole.getY()) == PlanszaTypPola.PLANSZA_STATEK || i == iIloscPowtorzen)\n\t\t\t\t\t{\n\t\t\t\t\tboolean bStrzal;\n\t\t\t\t\tbStrzal = oStatkiPrzeciwnika.strzal(oWylosowanePole.getX(), oWylosowanePole.getY());\n\t\t\t\t\tif (bStrzal == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t//zapisanie celnego strzalu w tablicy trafien\n\t\t\t\t\t\tPozycja oTrafienie = new Pozycja(2);\n\t\t\t\t\t\toTrafienie.setX( oWylosowanePole.getX() );\n\t\t\t\t\t\toTrafienie.setY( oWylosowanePole.getY() );\n\t\t\t\t\t\toUzyteczneTrafienia.add(oTrafienie);\n\t\t\t\t\t\t}\n\t\t\t\t\treturn bStrzal;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tcatch (ParametrException e)\n\t\t\t{\n\t\t\tthrow new ProgramistaException(e);\n\t\t\t}\n\t\t//petla musi zwrocic strzal. skoro doszlo tutaj - wywal wyjatek\n\t\tthrow new ProgramistaException();\n\t\t}",
"private String vylozZvieraZVozidla() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz index zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Zivocich ziv = zoo.vylozZivocicha(pozicia-1);\r\n if (ziv == null) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n }\r\n zoo.pridajZivocicha(ziv);\r\n return \"Zviera \" + ziv\r\n + \"\\n\\tbolo vylozene z prepravneho vozidla\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"private String enviarSolicitud(VSolicitudesDTO regSol, int idNav, File anexo, int helpDesk, String elUsuario) {\n/* 224 */ if (regSol == null) {\n/* 225 */ return \"ErrorInterno\";\n/* */ }\n/* */ \n/* 228 */ ServiciosDAO serf = new ServiciosDAO();\n/* 229 */ ServiciosDTO servicio = serf.cargarRegistro(regSol.getCodigoServicio());\n/* 230 */ serf.close();\n/* */ \n/* 232 */ SisUsuariosDAO pers = new SisUsuariosDAO();\n/* 233 */ SisUsuariosDTO persona = pers.cargarRegistro(regSol.getEmpleadoProveedor());\n/* */ \n/* 235 */ if (!persona.getEstado().equals(\"A\")) {\n/* 236 */ return \"ProveedorInactivo\";\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 242 */ CaracteristicasDAO rsCaracteristica = new CaracteristicasDAO();\n/* 243 */ int faltantes = rsCaracteristica.pendientes(regSol.getNumero(), servicio.getCodigo(), \"C\");\n/* 244 */ CaracteristicasDTO car = rsCaracteristica.cargarValorTiempo(regSol.getNumero(), servicio.getCodigo());\n/* 245 */ rsCaracteristica.close();\n/* */ \n/* 247 */ if (faltantes > 0) {\n/* 248 */ return \"CamposObligatorios\";\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 253 */ if (car != null) {\n/* 254 */ regSol.setDuracion(car.getDuracion());\n/* 255 */ regSol.setUnidadMedida(car.getUnidadMedida());\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 261 */ String fechaVigencia = Utilidades2.fechaVigencia(regSol.getUnidadMedida());\n/* */ \n/* */ \n/* 264 */ String fechaterminacion = Utilidades2.fechaTerminacion(fechaVigencia, regSol.getDuracion(), regSol.getUnidadMedida());\n/* */ \n/* */ \n/* */ \n/* 268 */ String observacion = \"\";\n/* */ \n/* 270 */ EstadoDAO efa = new EstadoDAO();\n/* 271 */ efa.cargarTodosTipo(\"PRV\");\n/* 272 */ EstadoDTO esta = efa.next();\n/* 273 */ efa.close();\n/* */ \n/* 275 */ boolean enviarMensaje = (helpDesk == 0);\n/* */ \n/* */ \n/* 278 */ Varios oVarios = new Varios();\n/* 279 */ if (anexo == null) {\n/* 280 */ oVarios.enviarSolicitud(idNav, regSol.getCodigoEstado(), esta.getCodigo(), observacion, regSol, enviarMensaje, fechaVigencia, fechaterminacion, 0, regSol.getDuracion(), regSol.getUnidadMedida(), elUsuario);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 295 */ oVarios.enviarSolicitud(idNav, regSol.getCodigoEstado(), esta.getCodigo(), observacion, anexo, regSol, enviarMensaje, fechaVigencia, fechaterminacion, 0, regSol.getDuracion(), regSol.getUnidadMedida(), elUsuario);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 313 */ VSolicitudesDAO sf = new VSolicitudesDAO();\n/* */ \n/* 315 */ regSol = sf.getSolicitud(regSol.getNumero());\n/* 316 */ while (regSol.getSolicitudPadre() != -1) {\n/* 317 */ VSolicitudesDTO regSolPadre = sf.getSolicitud(regSol.getSolicitudPadre());\n/* */ \n/* */ \n/* 320 */ int diasServicio = Utilidades2.diasDelServicio(regSolPadre.getDuracion(), regSolPadre.getUnidadMedida());\n/* */ \n/* 322 */ long diferencia = -1L * Utilidades2.diferenciaEnDias(regSol.getFechaVigencia(), regSolPadre.getFechaVigencia());\n/* */ \n/* 324 */ String nuevaFecha = Utilidades2.fechaMasDias(regSol.getFechaEstimadaTerminacion(), (int)(diasServicio - diferencia));\n/* */ \n/* 326 */ if (Utilidades2.compararFechas(regSolPadre.getFechaEstimadaTerminacion(), nuevaFecha) < 0) {\n/* 327 */ String s = \"fecha_estimada_terminacion=\" + Utilidades.formatoFecha2(Utilidades.darFormatoFecha(nuevaFecha)) + \",\";\n/* 328 */ s = s + \"fecha_base_escalamientos=\" + Utilidades.formatoFecha2(nuevaFecha) + \",\";\n/* 329 */ s = s + \"fecha_modificacion=\" + Utilidades.formatoFecha(Utilidades.ahora()) + \",\";\n/* 330 */ s = s + \"usuario_modificacion='\" + elUsuario + \"'\";\n/* 331 */ sf.actualizarCampos(regSolPadre.getNumero(), s);\n/* */ } \n/* 333 */ regSol = sf.getSolicitud(regSolPadre.getNumero());\n/* */ } \n/* */ \n/* 336 */ sf.close();\n/* */ \n/* 338 */ return null;\n/* */ }",
"public String toString(){\r\n\t\treturn \"KORISNIK:\"+korisnik+\" PORUKA:\"+poruka;\r\n\t}",
"public String toString(){\r\n\treturn \"KORISNIK:\"+korisnik+\" PORUKA:\"+poruka;\r\n\t}",
"public abstract String getBeschreibung();",
"public String toStringSta_() {\n\t\treturn \"Station: \"+ name+ \", Adresse: \" + address + \", CB: \" + ((banking) ? \"oui\" : \"non\" ) + \", bonus: \" + ((bonus) ? \"oui\" : \"non\" )\n\t\t\t\t+ \", Etat: \" + ((status) ? \"OK\" : \"Fermé\" );\n\t}",
"public String zwrocAdresSzablonu() {\r\n\t\treturn adresSzablonu;\r\n\t}",
"@Override\n\tpublic String hablar() {\n\t\treturn \"Hola, soy un Buitre y sť volar\";\n\t}",
"@Override//sobrescribir metodo\n public String getDescripcion(){\n return hamburguesa.getDescripcion()+\" + lechuga\";//retorna descripcion del oobj hamburguesa y le agrega +lechuga\n }",
"private Zivocich vytvorZivocicha() {\r\n final String[] zFarba = {\"cervena\", \"zelena\", \"modra\", \"zlta\", \"zlto-zelena\"};\r\n Zivocich zviera = null;\r\n double kolkoVazi = 0.0;\r\n\r\n //-- Vygenerujeme zviera\r\n int vygenerovane = 1 + generator.nextInt(4); //cislo <1,4>\r\n\r\n switch (vygenerovane) {\r\n case 1: //blcha \r\n double kolkoDoskoci=3 * generator.nextDouble() ; //cislo <0;2.99>\r\n double kolkoVyskoci=3 * generator.nextDouble() ; //cislo <0;2.99>\r\n zviera=new Blcha(6,kolkoDoskoci,kolkoVyskoci);\r\n break;\r\n case 2: //simpanz\r\n kolkoVazi=3 + (97 * generator.nextDouble()); //cislo <3;99.9>\r\n boolean cviceny;\r\n cviceny=generator.nextBoolean(); \r\n zviera=new Simpanz(kolkoVazi,cviceny);\r\n break;\r\n case 3: //papagaj\r\n kolkoVazi = 0.1 + (5*generator.nextDouble()); // cislo <0.1; 6>\r\n String farba = zFarba[generator.nextInt(5)]; // farba zo zoznamu\r\n zviera = new Papagaj(\"Ara\", 2, kolkoVazi, farba); \r\n break;\r\n case 4: //slon\r\n kolkoVazi=20 + (480*generator.nextDouble()); //cislo <20;500> \r\n int pocet=generator.nextInt(50); //pocet zubov bude <0,49>\r\n zviera=new Slon(kolkoVazi,pocet);\r\n break;\r\n } //------------------------------------------------------------- switch --\r\n return zviera;\r\n }",
"public Raportet(String roli) {\n this.roli = roli;\n\n initComponents();\n validorolin();\n\n//mbushi kombot me shenime nga DB \n try {\n lidhja = new LidhjaMeDb();\n mbushekombon(lidhja.aktivitetet(), \"aktiviteti\", kmbaktiviteti);\n mbushekombon(lidhja.komunat(), \"komuna\", kmbkomunat);\n mbushekombon(lidhja.pergjigjjet(), \"pergjigjja\", kmbpergjigjja);\n \n LidhjaMeDb.mbyllelidhjen();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"private String nalozZvieraNaVozidlo() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz cislo zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Prepravitelny z = (Prepravitelny) zoo.getZvierataZOO(pozicia - 1);\r\n zoo.nalozZivocicha(z);\r\n zoo.odstranZivocicha(pozicia - 1);\r\n return \"Zviera \" + z + \"\\n\\tbolo nalozene na prepravne vozidlo\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nemozno prepravit\\n\\t\";\r\n } catch (NullPointerException exNP) {\r\n return \"Zviera c. \" + pozicia + \" nie je v ZOO\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"public void obliczSzanseWykolejenia(Tramwaj tramwaj, Pogoda pogoda, Motorniczy motorniczy, Przystanek przystanek){\r\n RegulyWykolejen regulyWykolejen= new RegulyWykolejen();\r\n this.szansaWykolejenia = pogoda.getRyzyko() + przystanek.getStanTechnicznyPrzystanku() + tramwaj.getStanTechTramwaju() + regulyWykolejen.regulaWiek(motorniczy.getWiek()) + regulyWykolejen.regulaDoswiadczenie(motorniczy.getDoswiadczenie());\r\n }",
"public void setObservacion(java.lang.String param){\n \n this.localObservacion=param;\n \n\n }",
"@Override // prekrytie danej metody predka\r\n public String toString() {\r\n return super.toString()\r\n + \" vaha: \" + String.format(\"%.1f kg,\", dajVahu())\r\n + \" farba: \" + dajFarbu() + \".\";\r\n }",
"@Test\n public void testSpremiKonfiguraciju_String() throws Exception {\n System.out.println(\"spremiKonfiguraciju\");\n KonfiguracijaTxt instance = new KonfiguracijaTxt(datKonf.getName());\n instance.spremiKonfiguraciju(datKonf.getName());\n assertTrue(datKonf.exists());\n }",
"@Test\n public void testInicioSesion_String_String() throws Exception {\n System.out.println(\"inicioSesion\");\n String nm = \"Dan\";\n String contra = \"danr\";\n CSesion instance = new CSesion();\n DataUsuario result = instance.inicioSesion(nm, contra);\n Usuario user = instance.getUsuario();\n DataUsuario infoP = instance.verInfoPerfil();\n\n Integer cant = 2;\n Integer num = 2;\n instance.agregaLinea(cant, num);\n\n DataOrdenCompra carrito = instance.verCarrito();\n instance.generarOrden();\n\n boolean puedeComent = instance.puedeComentar(2); // lo compro asi que puede\n instance.comentar(2, \"Yo lo compré\");\n\n //instance.responder(2, \"Si\", 1);\n }",
"public IzvajalecZdravstvenihStoritev() {\n\t}",
"public String validarResponsableYaAsignado (DTOResponsable dtoe) throws MareException { \n UtilidadesLog.info(\"DAOZON.validarResponsableYaAsignado(DTOResponsable dtoe): Entrada\");\n StringBuffer consulta = new StringBuffer();\n Vector parametros = new Vector();\n RecordSet rs = new RecordSet();\n \n String asignado = null;\n String unidadAdministrativa = null;\n Long marca = null;\n Long canal = null;\n Long pais = null;\n\n //Recuperamos el pais, marca y canal de la Unidad Administrativa \n BelcorpService bs = UtilidadesEJB.getBelcorpService();\n\n /*if (dtoe.getIndUA().intValue() == 1) { \n consulta.append(\" SELECT pais_oid_pais PAIS, marc_oid_marc MARCA, cana_oid_cana canal \");\n consulta.append(\" FROM zon_sub_geren_venta \");\n consulta.append(\" WHERE oid_subg_vent = ? \");\n unidadAdministrativa = \"Subgerencia\";\n }*/\n if (dtoe.getIndUA().intValue() == 2){\n consulta.append(\" SELECT pais_oid_pais PAIS, marc_oid_marc MARCA, cana_oid_cana canal \");\n consulta.append(\" FROM zon_regio \");\n consulta.append(\" WHERE oid_regi = ? \");\n unidadAdministrativa = \"Region\";\n }\n if (dtoe.getIndUA().intValue() == 3){\n consulta.append(\" SELECT pais_oid_pais PAIS, marc_oid_marc MARCA, cana_oid_cana canal \");\n consulta.append(\" FROM zon_zona \");\n consulta.append(\" WHERE oid_zona = ? \");\n unidadAdministrativa = \"Zona\";\n }\n /*if (dtoe.getIndUA().intValue() == 4){\n consulta.append(\" SELECT zon.pais_oid_pais PAIS, zon.marc_oid_marc MARCA, zon.cana_oid_cana canal \");\n consulta.append(\" FROM zon_zona zon, zon_secci sec \");\n consulta.append(\" WHERE sec.zzon_oid_zona = zon.oid_zona \"); \n consulta.append(\" AND sec.oid_secc = ? \");\n unidadAdministrativa = \"Seccion\"; \n }*/\n parametros.add(dtoe.getOidUA());\n \n try {\n rs = bs.dbService.executePreparedQuery(consulta.toString(), parametros);\n UtilidadesLog.debug(\"rs: \" + rs);\n } catch (Exception e) {\n codigoError = CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(codigoError));\n }\n\n if (rs.esVacio()) {\n UtilidadesLog.debug(\"****DAOZON.validarResponsableYaAsignado: No existe Unidad Administrativa \");\t\t\t\t\n String sCodigoError = CodigosError.ERROR_DE_PETICION_DE_DATOS_NO_EXISTENTE;\n throw new MareException(new Exception(), UtilidadesError.armarCodigoError(sCodigoError));\n } else {\n pais = new Long(((BigDecimal)rs.getValueAt(0,\"PAIS\")).longValue());\n marca = new Long(((BigDecimal)rs.getValueAt(0,\"MARCA\")).longValue());\n canal = new Long(((BigDecimal)rs.getValueAt(0,\"CANAL\")).longValue());\n }\n\n //Buscamos si el cliente es responsable en otra unidad administrativa\n //para el pais, marca y canal de la unidad administrativa a asignar\n parametros = new Vector(); \n consulta = new StringBuffer();\n /*consulta.append(\" SELECT 'SubGerencia: ' || zon_sub_geren_venta.des_subg_vent DESCUNIDADADMIN \");\n consulta.append(\" FROM zon_sub_geren_venta, mae_clien \");\n consulta.append(\" WHERE mae_clien.oid_clie = zon_sub_geren_venta.clie_oid_clie \"); \n consulta.append(\" AND mae_clien.oid_clie = ? \");\n parametros.add(dtoe.getOidResponsable());\n consulta.append(\" AND zon_sub_geren_venta.pais_oid_pais = ? \");\n parametros.add(pais);\n consulta.append(\" AND zon_sub_geren_venta.marc_oid_marc = ? \");\n parametros.add(marca);\n consulta.append(\" AND zon_sub_geren_venta.cana_oid_cana = ? \");\n parametros.add(canal);\n consulta.append(\" AND zon_sub_geren_venta.ind_borr = 0 \");\n\n consulta.append(\" UNION \");*/\n \n consulta.append(\" SELECT 'Region: ' || zon_regio.des_regi DESCUNIDADADMIN \");\n consulta.append(\" FROM mae_clien, zon_sub_geren_venta, zon_regio \");\n consulta.append(\" WHERE mae_clien.oid_clie = zon_regio.clie_oid_clie \");\n consulta.append(\" AND mae_clien.oid_clie = ? \");\n parametros.add(dtoe.getOidResponsable());\n consulta.append(\" AND zon_regio.zsgv_oid_subg_vent = zon_sub_geren_venta.oid_subg_vent \");\n consulta.append(\" AND zon_sub_geren_venta.pais_oid_pais = ? \");\n parametros.add(pais);\n consulta.append(\" AND zon_sub_geren_venta.marc_oid_marc = ? \");\n parametros.add(marca);\n consulta.append(\" AND zon_sub_geren_venta.cana_oid_cana = ? \");\n parametros.add(canal);\n consulta.append(\" AND zon_sub_geren_venta.ind_borr = 0 \");\n consulta.append(\" AND zon_regio.ind_borr = 0 \");\n \n consulta.append(\" UNION \");\n \n consulta.append(\" SELECT 'Zona: ' || zon_zona.des_zona DESCUNIDADADMIN \");\n consulta.append(\" FROM zon_sub_geren_venta, zon_regio, zon_zona, mae_clien \");\n consulta.append(\" WHERE zon_zona.clie_oid_clie = mae_clien.oid_clie \");\n consulta.append(\" AND mae_clien.oid_clie = ? \");\n parametros.add(dtoe.getOidResponsable());\n consulta.append(\" AND zon_sub_geren_venta.pais_oid_pais = ? \");\n parametros.add(pais);\n consulta.append(\" AND zon_sub_geren_venta.marc_oid_marc = ? \");\n parametros.add(marca);\n consulta.append(\" AND zon_sub_geren_venta.cana_oid_cana = ? \");\n parametros.add(canal);\n consulta.append(\" AND zon_regio.zsgv_oid_subg_vent = zon_sub_geren_venta.oid_subg_vent \");\n consulta.append(\" AND zon_zona.zorg_oid_regi = zon_regio.oid_regi \");\n consulta.append(\" AND zon_zona.ind_borr = 0 \");\n consulta.append(\" AND zon_sub_geren_venta.ind_borr = 0 \");\n consulta.append(\" AND zon_regio.ind_borr = 0 \");\n \n /*consulta.append(\" UNION \");\n \n consulta.append(\" SELECT 'Seccion: ' || zon_secci.des_secci DESCUNIDADADMIN \");\n consulta.append(\" FROM zon_sub_geren_venta, zon_regio, \");\n consulta.append(\" zon_zona, zon_secci, mae_clien \");\n consulta.append(\" WHERE zon_secci.clie_oid_clie = mae_clien.oid_clie \");\n consulta.append(\" AND mae_clien.oid_clie = ? \");\n parametros.add(dtoe.getOidResponsable());\n consulta.append(\" AND zon_sub_geren_venta.pais_oid_pais = ? \");\n parametros.add(pais);\n consulta.append(\" AND zon_sub_geren_venta.marc_oid_marc = ? \");\n parametros.add(marca);\n consulta.append(\" AND zon_sub_geren_venta.cana_oid_cana = ? \");\n parametros.add(canal);\n consulta.append(\" AND zon_regio.zsgv_oid_subg_vent = zon_sub_geren_venta.oid_subg_vent \");\n consulta.append(\" AND zon_zona.zorg_oid_regi = zon_regio.oid_regi \");\n consulta.append(\" AND zon_secci.zzon_oid_zona = zon_zona.oid_zona \"); \n consulta.append(\" AND zon_secci.ind_borr = 0 \");\n consulta.append(\" AND zon_zona.ind_borr = 0 \");\n consulta.append(\" AND zon_sub_geren_venta.ind_borr = 0 \");\n consulta.append(\" AND zon_regio.ind_borr = 0 \");*/\n\n try {\n rs = bs.dbService.executePreparedQuery(consulta.toString(), parametros);\n UtilidadesLog.debug(\"rs: \" + rs);\n } catch (Exception e) {\n codigoError = CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(codigoError));\n }\n\n if (rs.esVacio()) {\n UtilidadesLog.debug(\"****DAOZON.validarResponsableYaAsignado: No hay datos \");\t\t\t\t\n }\n else {\n UtilidadesLog.debug(\"****DAOZON.validarResponsableYaAsignado: se encontro al menos un cliente \");\t\t\t\t\n asignado = rs.getValueAt(0,\"DESCUNIDADADMIN\").toString();\n }\n \n UtilidadesLog.info(\"DAOZON.validarResponsableYaAsignado(DTOResponsable dtoe): Salida\"); \n \n return asignado;\n }",
"public void AwansSpoleczny() {\n\t\tSystem.out.println(\"AwansSpoleczny\");\n\t\tif(Plansza.getNiewolnikNaPLanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getNiewolnikNaPLanszy() instanceof Niewolnicy) {\n\t\t\tPlansza.setNiewolnikNaPlanszy(new Mieszczanie(Plansza.getNiewolnikNaPLanszy()));\n\t\t}\n\t\t\t\n\t\tif(Plansza.getRzemieslnikNaPlanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getRzemieslnikNaPlanszy() instanceof Rzemieslnicy) {\n\t\t\tPlansza.setRzemieslnikNaPlanszy(new Handlarze(Plansza.getRzemieslnikNaPlanszy()));\n\t\t}\n\t\t\t\n\t\tif(Plansza.getArystokrataNaPlanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getArystokrataNaPlanszy() instanceof Arystokracja) {\n\t\t\tPlansza.setArystokrataNaPlanszy(new Szlachta(Plansza.getArystokrataNaPlanszy()));\n\t\t}\n\t}",
"public static List<StronaWiersza> pobierzStronaWierszazBazy(StronaWiersza stronaWiersza, String wnma, StronaWierszaDAO stronaWierszaDAO, TransakcjaDAO transakcjaDAO) {\r\n List<StronaWiersza> listaStronaWierszazBazy =new ArrayList<>();\r\n// stare = pobiera tylko w walucie dokumentu rozliczeniowego \r\n// listaNowychRozrachunkow = stronaWierszaDAO.findStronaByKontoWnMaWaluta(stronaWiersza.getKonto(), stronaWiersza.getWiersz().getTabelanbp().getWaluta().getSymbolwaluty(), stronaWiersza.getWnma());\r\n// nowe pobiera wszystkie waluty \r\n listaStronaWierszazBazy = stronaWierszaDAO.findStronaByKontoWnMa(stronaWiersza.getKonto(), wnma);\r\n //stronaWierszaDAO.refresh(listaStronaWierszazBazy);\r\n if (listaStronaWierszazBazy != null && !listaStronaWierszazBazy.isEmpty()) {\r\n try {\r\n DateFormat formatter;\r\n formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n String datarozrachunku = null;\r\n if (stronaWiersza.getWiersz().getDataWalutyWiersza() != null) {\r\n datarozrachunku = stronaWiersza.getWiersz().getDokfk().getRok()+\"-\"+stronaWiersza.getWiersz().getDokfk().getMiesiac()+\"-\"+stronaWiersza.getWiersz().getDataWalutyWiersza();\r\n } else {\r\n datarozrachunku = stronaWiersza.getWiersz().getDokfk().getDatadokumentu();\r\n }\r\n Date dataR = formatter.parse(datarozrachunku);\r\n Iterator it = listaStronaWierszazBazy.iterator();\r\n while(it.hasNext()) {\r\n StronaWiersza stronaWierszaZbazy = (StronaWiersza) it.next();\r\n List<Transakcja> zachowaneTransakcje = transakcjaDAO.findByNowaTransakcja(stronaWierszaZbazy);\r\n for (Iterator<Transakcja> itx = stronaWierszaZbazy.getPlatnosci().iterator(); itx.hasNext();) {\r\n Transakcja transakcjazbazy = (Transakcja) itx.next();\r\n if (zachowaneTransakcje == null || zachowaneTransakcje.size() == 0) {\r\n itx.remove();\r\n } else if (!zachowaneTransakcje.contains(transakcjazbazy)) {\r\n itx.remove();\r\n }\r\n }\r\n for (Transakcja ta : zachowaneTransakcje) {\r\n if (!stronaWierszaZbazy.getPlatnosci().contains(ta)) {\r\n stronaWierszaZbazy.getPlatnosci().add(ta);\r\n }\r\n }\r\n if (Z.z(stronaWierszaZbazy.getPozostalo()) <= 0.0) {\r\n it.remove();\r\n } else {\r\n String dataplatnosci;\r\n if (stronaWierszaZbazy.getWiersz().getDataWalutyWiersza() != null) {\r\n dataplatnosci = stronaWierszaZbazy.getWiersz().getDokfk().getRok()+\"-\"+stronaWierszaZbazy.getWiersz().getDokfk().getMiesiac()+\"-\"+stronaWierszaZbazy.getWiersz().getDataWalutyWiersza();\r\n } else {\r\n dataplatnosci = stronaWierszaZbazy.getWiersz().getDokfk().getDatadokumentu();\r\n }\r\n Date dataP = formatter.parse(dataplatnosci);\r\n if (dataP.compareTo(dataR) > 0) {\r\n it.remove();\r\n }\r\n }\r\n }\r\n } catch (ParseException ex) {\r\n E.e(ex);\r\n }\r\n }\r\n List<StronaWiersza> stronywierszaBO = stronaWierszaDAO.findStronaByKontoWnMaBO(stronaWiersza.getKonto(), stronaWiersza.getWnma());\r\n if (stronywierszaBO != null && !stronywierszaBO.isEmpty()) {\r\n Iterator it = stronywierszaBO.iterator();\r\n while(it.hasNext()) {\r\n StronaWiersza p = (StronaWiersza) it.next();\r\n if (Z.z(p.getPozostalo()) <= 0.0) {\r\n it.remove();\r\n }\r\n }\r\n listaStronaWierszazBazy.addAll(stronywierszaBO);\r\n }\r\n if (listaStronaWierszazBazy == null) {\r\n return (new ArrayList<>());\r\n }\r\n return listaStronaWierszazBazy;\r\n //pobrano wiersze - a teraz z nich robie rozrachunki\r\n }",
"public static void zapisPliku(String nazwaPlikuZapis) throws IOException{\n FileWriter plikZapisz = null;\n try {\n // tworzy nowy plik jeżeli nie istnieje, w przeciwnym przypadku\n // usuwa zawartość pliku i nadpisuje od początku\n plikZapisz = new FileWriter(nazwaPlikuZapis);\n //zapis łańcucha\n plikZapisz.write(tekstDoZapisu);\n //zapis po znaku\n for (char znak = 'a'; znak <='z'; znak++){\n plikZapisz.write(znak);\n plikZapisz.write('\\n');\n }\n }finally {\n if (plikZapisz != null){\n plikZapisz.close();\n }\n }\n }",
"public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}",
"public String toStringSta() {\n\t\treturn \"Adresse: \" + address + ((banking) ? \"CB\" : \"\" ) + ((bonus) ? \"Bonus\" : \"\" ) + ((status) ? \"\" : \"Station fermé\" );\n\t}",
"@Override\n\tpublic String dohvatiKontakt() {\n\t\treturn \"Naziv tvrtke: \" + naziv + \", mail: \" + getEmail() + \", tel: \" + getTelefon() + \", web: \" + web;\n\t}",
"public void savePrioritaet(String bezeichnung) throws Exception;",
"@Override\npublic String toString() {// PARA MOSTRAR LOS DATOS DE ESTA CLASE\n// TODO Auto-generated method stub\nreturn MuestraCualquiera();\n}",
"public String meinStatus() {\n try {\n System.out.println(\"--------------------STATUS--------------------\");\n System.out.println(\"Spielfigur: \" + spielfigur);\n System.out.println(\"Kontostand: \" + kontostand);\n System.out.println(\"Aktuell befindest du dich auf: \" + this.aktuellesFeldName.getFeldname());\n\n System.out.println(\"Folgende Felder sind in deinem Besitz :\");\n System.out.println(\"----------------------------------------\");\n for (Spielfelder s : felderInBesitz) {\n\n System.out.println(\"Feldname: \" + s.getFeldname());\n System.out.println(\"Feldummer: \" + s.getFeldnummer());\n\n if (s instanceof Straße) {\n Straße bf = (Straße) s;\n System.out.println(\"Farbe: \" + bf.getFarbe());\n System.out.println(\"Häuser: \" + bf.getAnzahlHaeuser());\n System.out.println(\"Hotels: \" + bf.getAnzahlHotels());\n\n }\n System.out.println(\"----------------------------------------\");\n }\n System.out.println(\"--------------------STATUS ENDE--------------------\");\n System.out.println(\"Gebe JA ein um letzte Aktion durchzuführen\");\n return br.readLine();\n } catch (IOException ex) {\n Logger.getLogger(Spieler.class.getName()).log(Level.SEVERE, null, ex);\n }\n return \"\";\n }",
"public void setOrigen(java.lang.String param){\n \n this.localOrigen=param;\n \n\n }",
"@Override\n\t/*Método para usarse en el momento de ver las reservas de un determinado usuaario en el panel del mismo*/\n\tpublic String verReservas(String nombreusuario) {\n\t\tGson json= new Gson(); \n\t\tDBConnection con = new DBConnection();\n\t\tString sql =\"Select * from alquileres alq, peliculas p where alq.pelicula=p.id and alq.usuario LIKE '\"+nombreusuario+\"' order by p.titulo\"; //Seleccion de los alquileres relacionados con el usuario \n\t\ttry {\n\t\t\t\n\t\t\tArrayList<Alquiler> datos= new ArrayList<Alquiler>(); //ArrayList que va a almacenar los alquileres del usuario\n\t\t\t\n\t\t\tStatement st = con.getConnection().createStatement();\n\t\t\tResultSet rs = st.executeQuery(sql);\n\t\t\t\n\t\t\t//Se cogen los datos necesarios \n\t\t\twhile(rs.next()) {\n\t\t\t\tString idpelicula=rs.getString(\"id\");\n\t\t\t\tint numero_alquiler=rs.getInt(\"numero_alquiler\");\n\t\t\t\tString fecha=rs.getString(\"fecha_alquiler\");\n\t\t\t\tString titulo= rs.getString(\"titulo\"); \n\t\t\t\tString genero= rs.getString(\"genero\"); \n\t\t\t\tString cadenaestreno=rs.getString(\"estreno\");\n\t\t\t\tString estreno=\"\"; \n\t\t\t\t\n\t\t\t\t//comprobación y asignación del atributo estreno:\n\t\t\t\t/*Como en la base de datos se guarda como una cadena de texto, cuando se devuelve\n\t\t\t\t * hay que comprobar su valor y dependiendo del que sea pasarlo a una cadena para pasarla a la clase \n\t\t\t\t * Alquiler*/\n\t\t\t\t\n\t\t\t\tif(cadenaestreno.equals(\"true\")) {\n\t\t\t\t\testreno=\"Si\";\n\t\t\t\t}else if(cadenaestreno.equals(\"false\")) {\n\t\t\t\t\testreno=\"No\";\n\t\t\t\t}\n\t\t\t\tAlquiler alquiler=new Alquiler(numero_alquiler,idpelicula,fecha,titulo,genero,estreno); //uso esta clase para poder enviar los datos\n\t\t\t\tdatos.add(alquiler); //añado el alquiler a los datos que se van a devolver\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\tst.close();\n\t\treturn json.toJson(datos); //devuelvo la lista de los datos en JSON \n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\treturn e.getMessage();\n\t\t}finally {\n\t\t\tcon.desconectar();\n\t\t}\n\t}",
"public String balar() {\r\n return this.SONIDO;\r\n }",
"@Override\n\tpublic int compareTo(Osoba _arg0) {\n\t\treturn (new String(nazwisko_ + imie_).compareToIgnoreCase(new String( _arg0.nazwisko_ + _arg0.imie_)));\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn this.getsTenkhoanquy() + \" : \" + this.fSotienconlai\n\t\t\t\t+ this.sLoaitiente;\n\t}",
"public void Zabojstwa() {\n\t\tSystem.out.println(\"Zabojstwa\");\n\t\tfor(int i=0;i<Plansza.getNiebezpieczenstwoNaPlanszy().size();i++) {\n\t\t\tfor(GenerujNiebezpieczenstwo niebez : Plansza.getNiebezpieczenstwoNaPlanszy()) {\n\n\t\t\t\tif(niebez.getZabojca() instanceof DzikieZwierzeta) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getUbrania() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getNiewolnikNaPLanszy().getJedzenie() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setUbrania(Plansza.getNiewolnikNaPLanszy().getUbrania() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setJedzenie(Plansza.getNiewolnikNaPLanszy().getJedzenie() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setLicznikNiebezpieczenstw(Plansza.getNiewolnikNaPLanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Bandyci) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getMaterialy() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getRzemieslnikNaPlanszy().getNarzedzia() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tif(GeneratorRandom.RandomOd0(101) <= ZapisOdczyt.getRzemieslnicySzansa()) {\n\t\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setMaterialy(Plansza.getRzemieslnikNaPlanszy().getMaterialy() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setNarzedzia(Plansza.getRzemieslnikNaPlanszy().getNarzedzia() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getRzemieslnikNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Zlodzieje) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getTowary() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getArystokrataNaPlanszy().getZloto() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setTowary(Plansza.getArystokrataNaPlanszy().getTowary() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setZloto(Plansza.getArystokrataNaPlanszy().getZloto() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getArystokrataNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }",
"public String getStato() {\n\t\t\treturn stato;\n\t\t}",
"protected boolean strzalSasiadujacy(StatekIterator oStatkiPrzeciwnika)\n\t\t{\n\t\t//przygotowanie kontenera przechowujacego do 4 sasiednich pol, ktore nadaja sie do kolejnego strzalu\n\t\tArrayList<Pozycja> oSasiedniePola = new ArrayList<Pozycja>(4);\n\t\t//petla wyszukujaca we wczesniejszych trafieniach pola do oddania kolejnego strzalu\n\t\twhile (oUzyteczneTrafienia.size() > 0)\n\t\t\t{\n\t\t\t//wylosowanie pola do przetestowania\n\t\t\tint iLosowanePole = oRand.nextInt(oUzyteczneTrafienia.size());\n\t\t\tPozycja oWybranePole = oUzyteczneTrafienia.get(iLosowanePole);\n\t\t\t\n\t\t\ttry\n\t\t\t\t{\n\t\t\t\t//wczytanie wspolrzednych 4 sasiadow i sprawdzenie, czy sa to pola puste, lub zawierajace statek\n\t\t\t\tfor (int i = -1; i <= 1; ++i)\n\t\t\t\t\tfor (int j = -1; j <= 1; ++j)\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\toWybranePole.getX() + i >= 0 && oWybranePole.getX() + i < oStatkiPrzeciwnika.getPlansza().getSzerokosc()\n\t\t\t\t\t\t\t&& oWybranePole.getY() + j >= 0 && oWybranePole.getY() + j < oStatkiPrzeciwnika.getPlansza().getWysokosc()\n\t\t\t\t\t\t\t&& (i + j == -1 || i + j == 1)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (oStatkiPrzeciwnika.getPlansza().getPole(oWybranePole.getX() + i, oWybranePole.getY() + j) == PlanszaTypPola.PLANSZA_POLE_PUSTE\n\t\t\t\t\t\t\t\t|| oStatkiPrzeciwnika.getPlansza().getPole(oWybranePole.getX() + i, oWybranePole.getY() + j) == PlanszaTypPola.PLANSZA_STATEK\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tPozycja oPrawidlowe = new Pozycja(2);\n\t\t\t\t\t\t\t\toPrawidlowe.setX(oWybranePole.getX() + i);\n\t\t\t\t\t\t\t\toPrawidlowe.setY(oWybranePole.getY() + j);\n\t\t\t\t\t\t\t\toSasiedniePola.add(oPrawidlowe);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (bProsteLinie == true)\n\t\t\t\t\t{\n\t\t\t\t\tboolean bPionowy = false;\n\t\t\t\t\tboolean bPoziomy = false;\n\t\t\t\t\tfor (int i = -1; i <= 1; ++i)\n\t\t\t\t\t\tfor (int j = -1; j <= 1; ++j)\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\toWybranePole.getX() + i >= 0 && oWybranePole.getX() + i < oStatkiPrzeciwnika.getPlansza().getSzerokosc()\n\t\t\t\t\t\t\t\t&& oWybranePole.getY() + j >= 0 && oWybranePole.getY() + j < oStatkiPrzeciwnika.getPlansza().getWysokosc()\n\t\t\t\t\t\t\t\t&& (i + j == -1 || i + j == 1)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (oStatkiPrzeciwnika.getPlansza().getPole(oWybranePole.getX() + i, oWybranePole.getY() + j) == PlanszaTypPola.PLANSZA_STRZAL_CELNY)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (i == 0)\n\t\t\t\t\t\t\t\t\t\tbPionowy = true;\n\t\t\t\t\t\t\t\t\tif (j == 0)\n\t\t\t\t\t\t\t\t\t\tbPoziomy = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\tif (bPionowy == true && bPoziomy == true)\n\t\t\t\t\t\tthrow new ProgramistaException();\n\t\t\t\t\tif (bPionowy == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfor (int i = oSasiedniePola.size() - 1; i >= 0; --i)\n\t\t\t\t\t\t\tif (oSasiedniePola.get(i).getX() != oWybranePole.getX())\n\t\t\t\t\t\t\t\toSasiedniePola.remove(i);\n\t\t\t\t\t\t}\n\t\t\t\t\tif (bPoziomy == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfor (int i = oSasiedniePola.size() - 1; i >= 0; --i)\n\t\t\t\t\t\t\tif (oSasiedniePola.get(i).getY() != oWybranePole.getY())\n\t\t\t\t\t\t\t\toSasiedniePola.remove(i);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (oSasiedniePola.size() > 0)\n\t\t\t\t\t{\n\t\t\t\t\t//sa pola prawidlowe do oddania kolejnego strzalu\n\t\t\t\t\tint iWylosowanySasiad = oRand.nextInt(oSasiedniePola.size());\n\t\t\t\t\t//oddanie strzalu na wspolrzedne weybranego pola\n\t\t\t\t\tboolean bStrzal;\n\t\t\t\t\tbStrzal = oStatkiPrzeciwnika.strzal(oSasiedniePola.get(iWylosowanySasiad).getX(), oSasiedniePola.get(iWylosowanySasiad).getY());\n\t\t\t\t\tif (bStrzal == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t//zapisanie celnego strzalu w tablicy trafien\n\t\t\t\t\t\tPozycja oTrafienie = new Pozycja(2);\n\t\t\t\t\t\toTrafienie.setX( oSasiedniePola.get(iWylosowanySasiad).getX() );\n\t\t\t\t\t\toTrafienie.setY( oSasiedniePola.get(iWylosowanySasiad).getY() );\n\t\t\t\t\t\toUzyteczneTrafienia.add(oTrafienie);\n\t\t\t\t\t\t}\n\t\t\t\t\treturn bStrzal;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t//brak prawidlowych pol. usuniecie trafienia z listy i przejscie do kolejnej iteracji petli wyszukujacej\n\t\t\t\t\toUzyteczneTrafienia.remove(iLosowanePole);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tcatch (ParametrException e)\n\t\t\t\t{\n\t\t\t\tthrow new ProgramistaException(e);\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\treturn strzalLosowy(oStatkiPrzeciwnika);\n\t\t}",
"public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}",
"@Override\r\n\tprotected String requestText() {\n\t\tGuardarSustentoRequest guardarSustentoRequest = new GuardarSustentoRequest();\r\n\t\tguardarSustentoRequest.setCodigoActvidad(codigoActvidad);\r\n\t\tguardarSustentoRequest.setCodigoCliente(codigoCliente);\r\n\t\tguardarSustentoRequest.setCodigoPLan(codigoPLan);\r\n\t\tguardarSustentoRequest.setDescripcionActividad(descripcionActividad);\r\n\t\tguardarSustentoRequest.setFechaVisita(fechaVisita);\r\n\t\tguardarSustentoRequest.setTipoActividad(tipoActividad);\r\n\t\tguardarSustentoRequest.setUsuario(usuario);\r\n\t\tString request = JSONHelper.serializar(guardarSustentoRequest);\r\n\t\treturn request;\r\n\t}",
"public boolean Wygrana() {\n\t\tSystem.out.println(\"Wygrana\");\n\t\tif(SprawdzanieWygranej.WygranaNiewolnikow()) {\n\t\t\tZapisOdczyt.setWygranaKlasa(Plansza.getNiewolnikNaPLanszy());\n\t\t\tZapisOdczyt.setWygranaKlasaPopulacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t\n\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getPopulacja() >= Plansza.getArystokrataNaPlanszy().getPopulacja()) {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getRzemieslnikNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getArystokrataNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getArystokrataNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getRzemieslnikNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\tif(SprawdzanieWygranej.WygranaRzemieslnikow()) {\n\t\t\tZapisOdczyt.setWygranaKlasa(Plansza.getRzemieslnikNaPlanszy());\n\t\t\tZapisOdczyt.setWygranaKlasaPopulacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t\n\t\t\tif(Plansza.getNiewolnikNaPLanszy().getPopulacja() >= Plansza.getArystokrataNaPlanszy().getPopulacja()) {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getNiewolnikNaPLanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getArystokrataNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getArystokrataNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getNiewolnikNaPLanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\tif(SprawdzanieWygranej.WygranaArystokracji()) {\n\t\t\tZapisOdczyt.setWygranaKlasa(Plansza.getArystokrataNaPlanszy());\n\t\t\tZapisOdczyt.setWygranaKlasaPopulacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t\n\t\t\tif(Plansza.getNiewolnikNaPLanszy().getPopulacja() >= Plansza.getRzemieslnikNaPlanszy().getPopulacja()) {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getNiewolnikNaPLanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getRzemieslnikNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getRzemieslnikNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getNiewolnikNaPLanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public void PoblarINFO(String llamado) {//C.P.M Aqui llega como argumento llamado\r\n try {\r\n rs = modelo.Obteninfo();//C.P.M Mandamos a poblar la informacion de negocio\r\n if (llamado.equals(\"\")) {//C.P.M si el llamado llega vacio es que viene de la interface\r\n while (rs.next()) {//C.P.M recorremos el resultado para obtener los datos\r\n vista.jTNombreempresa.setText(rs.getString(1));//C.P.M los datos los enviamos a la vista de la interface\r\n vista.jTDireccion.setText(rs.getString(2));\r\n vista.jTTelefono.setText(rs.getString(3));\r\n vista.jTRFC.setText(rs.getString(4));\r\n }\r\n }\r\n if (llamado.equals(\"factura\")) {//C.P.M de lo contrario es llamado de factura y los valores se van a la vista de vactura \r\n while (rs.next()) {//C.P.M recorremos el resultado \r\n vistafactura.jTNombreempresa.setText(rs.getString(1));//C.P.M enviamos los datos a la vista de factura\r\n vistafactura.jTDireccion.setText(rs.getString(2));\r\n vistafactura.jTTelefono.setText(rs.getString(3));\r\n vistafactura.jTRFC.setText(rs.getString(4));\r\n }\r\n }\r\n } catch (SQLException ex) {//C.P.M Notificamos a el usuario si ocurre algun error\r\n JOptionPane.showMessageDialog(null,\"Ocurio un error al intentar consultar la informacion del negocio\");\r\n }\r\n }",
"public void setStato(String stato) {\n\t\t\tthis.stato = stato;\n\t\t}",
"public void podstawZapiszDaneWielePlikow() throws IOException {\r\n\t\tBufferedWriter bw = null; // tutaj zaSztywno\r\n\t\tString[] wektorDanych;\r\n\t\tString nazwaPlikuWynikowego = null;\r\n\t\tint licznik = 0;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\t++licznik;\r\n\t\t\tnazwaPlikuWynikowego = \"./wynik/wynik\" + Integer.toString(licznik)\r\n\t\t\t\t\t+ \".\" + rozszerzenieSzablonu;\r\n\t\t\tbw = new BufferedWriter(new FileWriter(nazwaPlikuWynikowego));\r\n\t\t\tfor (String[] s : calaZawartoscRozsep) {\r\n\t\t\t\tfor (String wyraz : s) {\r\n\t\t\t\t\tif (wyraz.equals(interpretujWyraz(wyraz)))\r\n\t\t\t\t\t\tfor (int i = 0; i < zmienne.length; ++i) {\r\n\t\t\t\t\t\t\tif (wyraz.equals(zmienne[i])) {\r\n\t\t\t\t\t\t\t\twyraz = wektorDanych[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twyraz = interpretujWyraz(wyraz);\r\n\r\n\t\t\t\t\tbw.write(wyraz);\r\n\t\t\t\t}\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.close();\r\n\t\t}\r\n\t}",
"public String toString(){\r\n\t\t\t\t\treturn \"перший в черзі і шлях вільний\";\r\n\t\t\t\t}",
"public void setBloqueado(java.lang.String param){\n \n this.localBloqueado=param;\n \n\n }",
"@Override\n public String toString(){\n return \" Vuelo \"+this.getTipo()+\" \" +this.getIdentificador() +\"\\t \"+ this.getDestino()+ \"\\t salida prevista en \" + timeToHour(this.getTiemposal())+\" y su combustible es de \"+this.getCombustible()+\" litros.( \"+ String.format(\"%.2f\", this.getCombustible()/this.getTankfuel()*100) + \"%).\"; \n }",
"@Override\r\n\tpublic String toString()\r\n\t{\r\n\t\treturn \"Macchina a stati finiti di nome \"+nome+\", nello stato \"+corrente.getNome()+\".\";\r\n\t}",
"@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }",
"@Override\n\t/*Método que se va a utilizar cuando el usuario inicie sesión, para ver si los datos son o no correctos*/\n\tpublic String comprobarinicio(String nombreusuario, String clave) {\n\t\tDBConnection con = new DBConnection();\n\t\tString sql=\"Select * from usuarios where nombreusuario='\"+nombreusuario+\"'and clave='\"+clave+\"'\"; //búsqueda del usuario en la BD\n\t\tBoolean encontrado=false; //Booleano que indicará si el usuario está o no en la BD\n\t\ttry {\n\t\t\tStatement st = con.getConnection().createStatement(); \n\t\t\tResultSet rs = st.executeQuery(sql);\n\t\t\t/*De lo que devuelve la consulta, se va a coger el nombre de usuario y la clave (aunque no haya datos en ellos lo devuelve pero vacio)*/\n\t\t\twhile(rs.next()) {\n\t\t\tString nombre_usu= rs.getString(\"nombreusuario\");\n\t\t\tString pass= rs.getString(\"clave\");\n\t\t\t/*En caso de que los datos coincidan con los que se han pasado como parámetros desde el inicio de sesión, significará que los datos son correctos\n\t\t\t * y la variable encontrado cambia su valor para dejar constancia de que el usuario es correcto*/\n\t\t\tif(nombre_usu.equals(nombreusuario) && pass.equals(clave)) {\n\t\t\t\tencontrado=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tst.close();\n\t\t\t//En caso del valor de encontrado, se devolverá ok (si se encuentra) o not ok (\"si no se encuentra\")\n\t\t\tif(encontrado) {\n\t\t\t\treturn \"ok\";\n\t\t\t}else {\n\t\t\t\treturn \"not ok\";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n return(e.getMessage());\n\t\t}finally {\n\t\t\tcon.desconectar();\n\t\t}\n\t\t\n\t\t\n\t}",
"private void mostrarEstadoObjetosUsados() {\n Beneficiario beneficiario = null;\n FichaSocial fichaSocial = null;\n SolicitudBeneficio solicitudBeneficio = null;\n AspectoHabitacional aspectoHabitacional = null;\n AspectoEconomico aspectoEconomico = null;\n\n // CAMBIAR: Obtener datos del Request y asignarlos a los textField\n if (this.getRequestBean1().getObjetoABM() != null) {\n fichaSocial = (FichaSocial) this.getRequestBean1().getObjetoABM();\n aspectoHabitacional = (AspectoHabitacional) fichaSocial.getAspectoHabitacional();\n aspectoEconomico = (AspectoEconomico) fichaSocial.getAspectoEconomico();\n this.getElementoPila().getObjetos().set(0, fichaSocial);\n this.getElementoPila().getObjetos().set(1, aspectoHabitacional);\n this.getElementoPila().getObjetos().set(2, aspectoEconomico);\n }\n\n int ind = 0;\n fichaSocial = (FichaSocial) this.obtenerObjetoDelElementoPila(ind++, FichaSocial.class);\n aspectoHabitacional = (AspectoHabitacional) this.obtenerObjetoDelElementoPila(ind++, AspectoHabitacional.class);\n aspectoEconomico = (AspectoEconomico) this.obtenerObjetoDelElementoPila(ind++, AspectoEconomico.class);\n\n\n this.getTfCodigo().setText(fichaSocial.getNumero());\n this.getTfFecha().setText(Conversor.getStringDeFechaCorta(fichaSocial.getFecha()));\n ////\n //Beneficiarios:\n if (fichaSocial.getTitular() != null) {\n this.getTfTitular().setText(fichaSocial.toString());\n }\n\n this.setListaDelCommunication(new ArrayList(fichaSocial.getGrupoFamiliar()));\n this.getObjectListDataProvider().setList(new ArrayList(fichaSocial.getGrupoFamiliar()));\n\n //Aspecto habitacional:\n if (aspectoHabitacional.getNumeroPersonas() != null) {\n this.getTfNroPersonas().setText(aspectoHabitacional.getNumeroPersonas().toString());\n }\n this.getTfVivienda().setText(aspectoHabitacional.getVivienda());\n this.getTfTenencia().setText(aspectoHabitacional.getTenencia());\n this.getTfNroCamas().setText(aspectoHabitacional.getNumeroCamas());\n this.getTfNroAmbientes().setText(aspectoHabitacional.getNumeroAmbientes());\n this.getCbBanioCompleto().setValue(new Boolean(aspectoHabitacional.isBanioCompleto()));\n this.getCbBanioInterno().setValue(new Boolean(aspectoHabitacional.isBanioInterno()));\n this.getCbAgua().setValue(new Boolean(aspectoHabitacional.isAgua()));\n this.getCbLuz().setValue(new Boolean(aspectoHabitacional.isLuz()));\n this.getCbCloaca().setValue(new Boolean(aspectoHabitacional.isCloaca()));\n this.getCbGasNatural().setValue(new Boolean(aspectoHabitacional.isGasNatural()));\n\n //Aspecto Economico:\n this.getTfNroCasas().setText(aspectoEconomico.getNumeroCasas());\n this.getTfNroTerrenos().setText(aspectoEconomico.getNumeroTerrenos());\n this.getTfNroCampos().setText(aspectoEconomico.getNumeroCampos());\n this.getTfVehiculo().setText(aspectoEconomico.getVehiculo());\n this.getTfIndustria().setText(aspectoEconomico.getIndustria());\n this.getTfActividadLaboral().setText(aspectoEconomico.getActividadLaboral());\n this.getTfComercio().setText(aspectoEconomico.getComercio());\n\n //Solicitud Beneficio\n this.setListaDelCommunication2(new ArrayList(fichaSocial.getListaSolicitudBeneficio()));\n this.getObjectListDataProvider2().setList(new ArrayList(fichaSocial.getListaSolicitudBeneficio()));\n }",
"public String ToStr(){\n\t\tswitch(getTkn()){\n\t\tcase Kali:\n\t\t\treturn \"*\";\n\t\tcase Bagi:\n\t\t\treturn \"/\";\n\t\tcase Div:\n\t\t\treturn \"div\";\n\t\tcase Tambah:\n\t\t\treturn \"+\";\n\t\tcase Kurang:\n\t\t\treturn \"-\";\n\t\tcase Kurungbuka:\n\t\t\treturn \"(\";\n\t\tcase Kurungtutup:\n\t\t\treturn \")\";\n\t\tcase Mod:\n\t\t\treturn \"mod\";\n\t\tcase And:\n\t\t\treturn \"and\";\n\t\tcase Or:\n\t\t\treturn \"or\";\n\t\tcase Xor:\n\t\t\treturn \"xor\";\n\t\tcase Not:\n\t\t\treturn \"!\";\n\t\tcase Bilangan:\n\t\t\tString s = new String();\n\t\t\tswitch (getTipeBilangan()){\n\t\t\tcase _bool:\n\t\t\t\tif (getBilanganBool())\n\t\t\t\t\treturn \"true\";\n\t\t\t\telse\treturn \"false\";\n\t\t\tcase _int:\n\t\t\t\ts+=(getBilanganInt());\n\t\t\t\tbreak;\n\t\t\tcase _float:\n\t\t\t\ts+=(getBilanganFloat());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn s;\n\t\t}\n\t\treturn null;\n\t}",
"public void sendeSpielerWeg(String spieler);",
"Aluno(String dataNascimento) {\n this.dataNascimento = dataNascimento;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"Station: \"+ name+ \", Adresse: \" + address + \", Wiki: Velos: \" + UVelosDispos + \", Places: \"\n\t\t\t\t+ UPlacesDispos + \", CB: \" + ((banking) ? \"oui\" : \"non\" ) + \", bonus: \" + ((bonus) ? \"oui\" : \"non\" )\n\t\t\t\t+ \", Etat: \" + ((status) ? \"OK\" : \"Fermé\" ) +\", Places libres: \" + available_bike_stands\n\t\t\t\t+ \", Velos disponibles: \" + available_bikes;\n\t}",
"@Override\n public String toString() {\n return super.toString() + \"\\nSố trang sách: \"+amountPage\n +\"\\nTình trang sách: \"+status+\"\\nSố lượng mượn: \"+amountBorrow;\n }",
"public void mostrarDatos(Object obj) throws Exception {\r\n\t\tHis_parto his_parto = (His_parto) obj;\r\n\t\ttry {\r\n\t\t\ttbxCodigo_historia.setValue(his_parto.getCodigo_historia());\r\n\t\t\tdtbxFecha_inicial.setValue(his_parto.getFecha_inicial());\r\n\r\n\t\t\tPaciente paciente = new Paciente();\r\n\t\t\tpaciente.setCodigo_empresa(his_parto.getCodigo_empresa());\r\n\t\t\tpaciente.setCodigo_sucursal(his_parto.getCodigo_sucursal());\r\n\t\t\tpaciente.setNro_identificacion(his_parto.getIdentificacion());\r\n\t\t\tpaciente = getServiceLocator().getPacienteService().consultar(\r\n\t\t\t\t\tpaciente);\r\n\r\n\t\t\tElemento elemento = new Elemento();\r\n\t\t\telemento.setCodigo(paciente.getSexo());\r\n\t\t\telemento.setTipo(\"sexo\");\r\n\t\t\telemento = getServiceLocator().getElementoService().consultar(\r\n\t\t\t\t\telemento);\r\n\r\n\t\t\ttbxIdentificacion.setValue(his_parto.getIdentificacion());\r\n\t\t\ttbxNomPaciente.setValue((paciente != null ? paciente.getNombre1()\r\n\t\t\t\t\t+ \" \" + paciente.getApellido1() : \"\"));\r\n\t\t\ttbxTipoIdentificacion.setValue((paciente != null ? paciente\r\n\t\t\t\t\t.getTipo_identificacion() : \"\"));\r\n\t\t\ttbxEdad.setValue(Util.getEdad(new java.text.SimpleDateFormat(\r\n\t\t\t\t\t\"dd/MM/yyyy\").format(paciente.getFecha_nacimiento()),\r\n\t\t\t\t\tpaciente.getUnidad_medidad(), false));\r\n\t\t\ttbxSexo.setValue((elemento != null ? elemento.getDescripcion() : \"\"));\r\n\t\t\tdbxNacimiento.setValue(paciente.getFecha_nacimiento());\r\n\t\t\ttbxDireccion.setValue(paciente.getDireccion());\r\n\r\n\t\t\tAdministradora administradora = new Administradora();\r\n\t\t\tadministradora.setCodigo(paciente.getCodigo_administradora());\r\n\t\t\tadministradora = getServiceLocator().getAdministradoraService()\r\n\t\t\t\t\t.consultar(administradora);\r\n\r\n\t\t\ttbxCodigo_eps.setValue(administradora != null ? administradora\r\n\t\t\t\t\t.getCodigo() : \"\");\r\n\t\t\ttbxNombre_eps.setValue(administradora != null ? administradora\r\n\t\t\t\t\t.getNombre() : \"\");\r\n\r\n\t\t\tContratos contratos = new Contratos();\r\n\t\t\tcontratos.setCodigo_empresa(his_parto.getCodigo_empresa());\r\n\t\t\tcontratos.setCodigo_sucursal(his_parto.getCodigo_sucursal());\r\n\t\t\tcontratos.setCodigo_administradora(paciente.getCodigo_administradora());\r\n//\t\t\tcontratos.setId_plan(paciente.getId_plan());\r\n\t\t\tcontratos = getServiceLocator().getContratosService().consultar(contratos);\r\n\r\n\t\t\ttbxCodigo_contrato.setValue(contratos != null ? contratos.getId_plan()\r\n\t\t\t\t\t: \"\");\r\n\t\t\ttbxContrato.setValue(contratos != null ? contratos.getNombre() : \"\");\r\n\r\n\t\t\tfor (int i = 0; i < lbxCodigo_dpto.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxCodigo_dpto.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(paciente.getCodigo_dpto())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxCodigo_dpto.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlistarMunicipios(lbxCodigo_municipio, lbxCodigo_dpto);\r\n\r\n\t\t\ttbxConyugue.setValue(his_parto.getConyugue());\r\n\t\t\ttbxId_conyugue.setValue(his_parto.getId_conyugue());\r\n\t\t\ttbxEdad_conyugue.setValue(his_parto.getEdad_conyugue());\r\n\r\n\t\t\tNivel_educativo nivel_educativo = new Nivel_educativo();\r\n\t\t\tnivel_educativo.setId(his_parto.getEscolaridad_conyugue());\r\n\t\t\tnivel_educativo = getServiceLocator().getNivel_educativoService()\r\n\t\t\t\t\t.consultar(nivel_educativo);\r\n\t\t\ttbxEscolaridad_nombre\r\n\t\t\t\t\t.setValue(nivel_educativo != null ? nivel_educativo\r\n\t\t\t\t\t\t\t.getNombre() : \"\");\r\n\t\t\ttbxEscolaridad_conyugue\r\n\t\t\t\t\t.setValue(nivel_educativo != null ? nivel_educativo.getId()\r\n\t\t\t\t\t\t\t: \"\");\r\n\r\n\t\t\ttbxMotivo.setValue(his_parto.getMotivo());\r\n\t\t\ttbxEnfermedad_actual.setValue(his_parto.getEnfermedad_actual());\r\n\t\t\ttbxAntecedentes_familiares.setValue(his_parto\r\n\t\t\t\t\t.getAntecedentes_familiares());\r\n\t\t\tRadio radio = (Radio) rdbPreeclampsia.getFellow(\"Preeclampsia\"\r\n\t\t\t\t\t+ his_parto.getPreeclampsia());\r\n\t\t\tradio.setChecked(true);\r\n\t\t\tRadio radio1 = (Radio) rdbHipertension.getFellow(\"Hipertension\"\r\n\t\t\t\t\t+ his_parto.getHipertension());\r\n\t\t\tradio1.setChecked(true);\r\n\t\t\tRadio radio2 = (Radio) rdbEclampsia.getFellow(\"Eclampsia\"\r\n\t\t\t\t\t+ his_parto.getEclampsia());\r\n\t\t\tradio2.setChecked(true);\r\n\t\t\tRadio radio3 = (Radio) rdbH1.getFellow(\"H1\" + his_parto.getH1());\r\n\t\t\tradio3.setChecked(true);\r\n\t\t\tRadio radio4 = (Radio) rdbH2.getFellow(\"H2\" + his_parto.getH2());\r\n\t\t\tradio4.setChecked(true);\r\n\t\t\tRadio radio5 = (Radio) rdbPostimadurez.getFellow(\"Postimadurez\"\r\n\t\t\t\t\t+ his_parto.getPostimadurez());\r\n\t\t\tradio5.setChecked(true);\r\n\t\t\tRadio radio6 = (Radio) rdbRot_pre.getFellow(\"Rot_pre\"\r\n\t\t\t\t\t+ his_parto.getRot_pre());\r\n\t\t\tradio6.setChecked(true);\r\n\t\t\tRadio radio7 = (Radio) rdbPolihidramnios.getFellow(\"Polihidramnios\"\r\n\t\t\t\t\t+ his_parto.getPolihidramnios());\r\n\t\t\tradio7.setChecked(true);\r\n\t\t\tRadio radio8 = (Radio) rdbRcui.getFellow(\"Rcui\"\r\n\t\t\t\t\t+ his_parto.getRcui());\r\n\t\t\tradio8.setChecked(true);\r\n\t\t\tRadio radio9 = (Radio) rdbPelvis.getFellow(\"Pelvis\"\r\n\t\t\t\t\t+ his_parto.getPelvis());\r\n\t\t\tradio9.setChecked(true);\r\n\t\t\tRadio radio10 = (Radio) rdbFeto_macrosonico\r\n\t\t\t\t\t.getFellow(\"Feto_macrosonico\"\r\n\t\t\t\t\t\t\t+ his_parto.getFeto_macrosonico());\r\n\t\t\tradio10.setChecked(true);\r\n\t\t\tRadio radio11 = (Radio) rdbIsoinmunizacion\r\n\t\t\t\t\t.getFellow(\"Isoinmunizacion\"\r\n\t\t\t\t\t\t\t+ his_parto.getIsoinmunizacion());\r\n\t\t\tradio11.setChecked(true);\r\n\t\t\tRadio radio12 = (Radio) rdbAo.getFellow(\"Ao\" + his_parto.getAo());\r\n\t\t\tradio12.setChecked(true);\r\n\t\t\tRadio radio13 = (Radio) rdbCirc_cordon.getFellow(\"Circ_cordon\"\r\n\t\t\t\t\t+ his_parto.getCirc_cordon());\r\n\t\t\tradio13.setChecked(true);\r\n\t\t\tRadio radio14 = (Radio) rdbPostparto.getFellow(\"Postparto\"\r\n\t\t\t\t\t+ his_parto.getPostparto());\r\n\t\t\tradio14.setChecked(true);\r\n\t\t\tRadio radio15 = (Radio) rdbDiabetes.getFellow(\"Diabetes\"\r\n\t\t\t\t\t+ his_parto.getDiabetes());\r\n\t\t\tradio15.setChecked(true);\r\n\t\t\tRadio radio16 = (Radio) rdbCardiopatia.getFellow(\"Cardiopatia\"\r\n\t\t\t\t\t+ his_parto.getCardiopatia());\r\n\t\t\tradio16.setChecked(true);\r\n\t\t\tRadio radio17 = (Radio) rdbAnemias.getFellow(\"Anemias\"\r\n\t\t\t\t\t+ his_parto.getAnemias());\r\n\t\t\tradio17.setChecked(true);\r\n\t\t\tRadio radio18 = (Radio) rdbEnf_autoinmunes\r\n\t\t\t\t\t.getFellow(\"Enf_autoinmunes\"\r\n\t\t\t\t\t\t\t+ his_parto.getEnf_autoinmunes());\r\n\t\t\tradio18.setChecked(true);\r\n\t\t\tRadio radio19 = (Radio) rdbEnf_renales.getFellow(\"Enf_renales\"\r\n\t\t\t\t\t+ his_parto.getEnf_renales());\r\n\t\t\tradio19.setChecked(true);\r\n\t\t\tRadio radio20 = (Radio) rdbInf_urinaria.getFellow(\"Inf_urinaria\"\r\n\t\t\t\t\t+ his_parto.getInf_urinaria());\r\n\t\t\tradio20.setChecked(true);\r\n\t\t\tRadio radio21 = (Radio) rdbEpilepsia.getFellow(\"Epilepsia\"\r\n\t\t\t\t\t+ his_parto.getEpilepsia());\r\n\t\t\tradio21.setChecked(true);\r\n\t\t\tRadio radio22 = (Radio) rdbTbc\r\n\t\t\t\t\t.getFellow(\"Tbc\" + his_parto.getTbc());\r\n\t\t\tradio22.setChecked(true);\r\n\t\t\tRadio radio23 = (Radio) rdbMiomas.getFellow(\"Miomas\"\r\n\t\t\t\t\t+ his_parto.getMiomas());\r\n\t\t\tradio23.setChecked(true);\r\n\t\t\tRadio radio24 = (Radio) rdbHb.getFellow(\"Hb\" + his_parto.getHb());\r\n\t\t\tradio24.setChecked(true);\r\n\t\t\tRadio radio25 = (Radio) rdbFumadora.getFellow(\"Fumadora\"\r\n\t\t\t\t\t+ his_parto.getFumadora());\r\n\t\t\tradio25.setChecked(true);\r\n\t\t\tRadio radio26 = (Radio) rdbInf_puerperal.getFellow(\"Inf_puerperal\"\r\n\t\t\t\t\t+ his_parto.getInf_puerperal());\r\n\t\t\tradio26.setChecked(true);\r\n\t\t\tRadio radio27 = (Radio) rdbInfertilidad.getFellow(\"Infertilidad\"\r\n\t\t\t\t\t+ his_parto.getInfertilidad());\r\n\t\t\tradio27.setChecked(true);\r\n\t\t\ttbxMenarquia.setValue(his_parto.getMenarquia());\r\n\t\t\ttbxCiclos.setValue(his_parto.getCiclos());\r\n\t\t\ttbxVida_marital.setValue(his_parto.getVida_marital());\r\n\t\t\ttbxVida_obstetrica.setValue(his_parto.getVida_obstetrica());\r\n\t\t\tfor (int i = 0; i < lbxNo_gestaciones.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxNo_gestaciones.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getNo_gestaciones())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxNo_gestaciones.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxParto.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxParto.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString().equals(his_parto.getParto())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxParto.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxAborto.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxAborto.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getAborto())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxAborto.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxCesarias.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxCesarias.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getCesarias())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxCesarias.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdtbxFecha_um.setValue(his_parto.getFecha_um());\r\n\t\t\ttbxUm.setValue(his_parto.getUm());\r\n\t\t\ttbxFep.setValue(his_parto.getFep());\r\n\t\t\tfor (int i = 0; i < lbxGemerales.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxGemerales.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getGemerales())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxGemerales.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxMalformados.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxMalformados.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getMalformados())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxMalformados.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxNacidos_vivos.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxNacidos_vivos.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getNacidos_vivos())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxNacidos_vivos.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxNacidos_muertos.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxNacidos_muertos.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getNacidos_muertos())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxNacidos_muertos.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxPreterminos.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxPreterminos.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getPreterminos())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxPreterminos.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tchbMedico.setChecked(his_parto.getMedico());\r\n\t\t\tchbEnfermera.setChecked(his_parto.getEnfermera());\r\n\t\t\tchbAuxiliar.setChecked(his_parto.getAuxiliar());\r\n\t\t\tchbPartera.setChecked(his_parto.getPartera());\r\n\t\t\tchbOtros.setChecked(his_parto.getOtros());\r\n\t\t\tRadio radio28 = (Radio) rdbControlado.getFellow(\"Controlado\"\r\n\t\t\t\t\t+ his_parto.getControlado());\r\n\t\t\tradio28.setChecked(true);\r\n\t\t\tRadio radio29 = (Radio) rdbLugar_consulta\r\n\t\t\t\t\t.getFellow(\"Lugar_consulta\" + his_parto.getLugar_consulta());\r\n\t\t\tradio29.setChecked(true);\r\n\t\t\tfor (int i = 0; i < lbxNo_consultas.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxNo_consultas.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getNo_consultas())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxNo_consultas.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tchbEspecialistas.setChecked(his_parto.getEspecialistas());\r\n\t\t\tchbGeneral.setChecked(his_parto.getGeneral());\r\n\t\t\tchbPartera_consulta.setChecked(his_parto.getPartera_consulta());\r\n\t\t\tRadio radio30 = (Radio) rdbSangrado_vaginal\r\n\t\t\t\t\t.getFellow(\"Sangrado_vaginal\"\r\n\t\t\t\t\t\t\t+ his_parto.getSangrado_vaginal());\r\n\t\t\tradio30.setChecked(true);\r\n\t\t\tRadio radio31 = (Radio) rdbCefalias.getFellow(\"Cefalias\"\r\n\t\t\t\t\t+ his_parto.getCefalias());\r\n\t\t\tradio31.setChecked(true);\r\n\t\t\tRadio radio32 = (Radio) rdbEdema.getFellow(\"Edema\"\r\n\t\t\t\t\t+ his_parto.getEdema());\r\n\t\t\tradio32.setChecked(true);\r\n\t\t\tRadio radio33 = (Radio) rdbEpigastralgia.getFellow(\"Epigastralgia\"\r\n\t\t\t\t\t+ his_parto.getEpigastralgia());\r\n\t\t\tradio33.setChecked(true);\r\n\t\t\tRadio radio34 = (Radio) rdbVomitos.getFellow(\"Vomitos\"\r\n\t\t\t\t\t+ his_parto.getVomitos());\r\n\t\t\tradio34.setChecked(true);\r\n\t\t\tRadio radio35 = (Radio) rdbTinutus.getFellow(\"Tinutus\"\r\n\t\t\t\t\t+ his_parto.getTinutus());\r\n\t\t\tradio35.setChecked(true);\r\n\t\t\tRadio radio36 = (Radio) rdbEscotomas.getFellow(\"Escotomas\"\r\n\t\t\t\t\t+ his_parto.getEscotomas());\r\n\t\t\tradio36.setChecked(true);\r\n\t\t\tRadio radio37 = (Radio) rdbInfeccion_urinaria\r\n\t\t\t\t\t.getFellow(\"Infeccion_urinaria\"\r\n\t\t\t\t\t\t\t+ his_parto.getInfeccion_urinaria());\r\n\t\t\tradio37.setChecked(true);\r\n\t\t\tRadio radio38 = (Radio) rdbInfeccion_vaginal\r\n\t\t\t\t\t.getFellow(\"Infeccion_vaginal\"\r\n\t\t\t\t\t\t\t+ his_parto.getInfeccion_vaginal());\r\n\t\t\tradio38.setChecked(true);\r\n\t\t\ttbxOtros_embarazo.setValue(his_parto.getOtros_embarazo());\r\n\t\t\ttbxCardiaca.setValue(his_parto.getCardiaca());\r\n\t\t\ttbxRespiratoria.setValue(his_parto.getRespiratoria());\r\n\t\t\ttbxPeso.setValue(his_parto.getPeso());\r\n\t\t\ttbxTalla.setValue(his_parto.getTalla());\r\n\t\t\ttbxTempo.setValue(his_parto.getTempo());\r\n\t\t\ttbxPresion.setValue(his_parto.getPresion());\r\n\t\t\ttbxPresion2.setValue(his_parto.getPresion2());\r\n\t\t\ttbxInd_masa.setValue(his_parto.getInd_masa());\r\n\t\t\ttbxSus_masa.setValue(his_parto.getSus_masa());\r\n\t\t\ttbxCabeza_cuello.setValue(his_parto.getCabeza_cuello());\r\n\t\t\ttbxCardiovascular.setValue(his_parto.getCardiovascular());\r\n\t\t\ttbxMamas.setValue(his_parto.getMamas());\r\n\t\t\ttbxPulmones.setValue(his_parto.getPulmones());\r\n\t\t\ttbxAbdomen.setValue(his_parto.getAbdomen());\r\n\t\t\ttbxUterina.setValue(his_parto.getUterina());\r\n\t\t\ttbxSituacion.setValue(his_parto.getSituacion());\r\n\t\t\ttbxPresentacion.setValue(his_parto.getPresentacion());\r\n\t\t\ttbxV_presentacion.setValue(his_parto.getV_presentacion());\r\n\t\t\ttbxPosicion.setValue(his_parto.getPosicion());\r\n\t\t\ttbxV_posicion.setValue(his_parto.getV_posicion());\r\n\t\t\ttbxC_uterina.setValue(his_parto.getC_uterina());\r\n\t\t\ttbxTono.setValue(his_parto.getTono());\r\n\t\t\ttbxFcf.setValue(his_parto.getFcf());\r\n\t\t\ttbxGenitales.setValue(his_parto.getGenitales());\r\n\t\t\ttbxDilatacion.setValue(his_parto.getDilatacion());\r\n\t\t\ttbxBorramiento.setValue(his_parto.getBorramiento());\r\n\t\t\ttbxEstacion.setValue(his_parto.getEstacion());\r\n\t\t\ttbxMembranas.setValue(his_parto.getMembranas());\r\n\t\t\ttbxExtremidades.setValue(his_parto.getExtremidades());\r\n\t\t\ttbxSnc.setValue(his_parto.getSnc());\r\n\t\t\ttbxObservacion.setValue(his_parto.getObservacion());\r\n\t\t\tfor (int i = 0; i < lbxFinalidad_cons.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxFinalidad_cons.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getFinalidad_cons())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxFinalidad_cons.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tseleccionarProgramaPyp();\r\n\r\n\t\t\tfor (int i = 0; i < lbxCausas_externas.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxCausas_externas.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getCausas_externas())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxCausas_externas.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxCodigo_consulta_pyp.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxCodigo_consulta_pyp.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getCodigo_consulta_pyp())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxCodigo_consulta_pyp.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < lbxTipo_disnostico.getItemCount(); i++) {\r\n\t\t\t\tListitem listitem = lbxTipo_disnostico.getItemAtIndex(i);\r\n\t\t\t\tif (listitem.getValue().toString()\r\n\t\t\t\t\t\t.equals(his_parto.getTipo_disnostico())) {\r\n\t\t\t\t\tlistitem.setSelected(true);\r\n\t\t\t\t\ti = lbxTipo_disnostico.getItemCount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tCie cie = new Cie();\r\n\t\t\tcie.setCodigo(his_parto.getTipo_principal());\r\n\t\t\t//log.info(\"antes: \" + cie);\r\n\t\t\tcie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n\t\t\t//log.info(\"despues: \" + cie);\r\n\t\t\ttbxTipo_principal.setValue(his_parto.getTipo_principal());\r\n\t\t\ttbxNomDx.setValue((cie != null ? cie.getNombre() : \"\"));\r\n\r\n\t\t\t/* relacionado 1 */\r\n\t\t\tcie = new Cie();\r\n\t\t\tcie.setCodigo(his_parto.getTipo_relacionado_1());\r\n\t\t\t//log.info(\"antes: \" + cie);\r\n\t\t\tcie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n\t\t\t//log.info(\"despues: \" + cie);\r\n\r\n\t\t\ttbxTipo_relacionado_1.setValue(his_parto.getTipo_relacionado_1());\r\n\t\t\ttbxNomDxRelacionado_1\r\n\t\t\t\t\t.setValue((cie != null ? cie.getNombre() : \"\"));\r\n\r\n\t\t\t/* relacionado 2 */\r\n\t\t\tcie = new Cie();\r\n\t\t\tcie.setCodigo(his_parto.getTipo_relacionado_2());\r\n\t\t\t//log.info(\"antes: \" + cie);\r\n\t\t\tcie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n\t\t\t//log.info(\"despues: \" + cie);\r\n\r\n\t\t\ttbxTipo_relacionado_2.setValue(his_parto.getTipo_relacionado_2());\r\n\t\t\ttbxNomDxRelacionado_2\r\n\t\t\t\t\t.setValue((cie != null ? cie.getNombre() : \"\"));\r\n\r\n\t\t\t/* relacionado 3 */\r\n\t\t\tcie = new Cie();\r\n\t\t\tcie.setCodigo(his_parto.getTipo_relacionado_3());\r\n\t\t\t//log.info(\"antes: \" + cie);\r\n\t\t\tcie = getServiceLocator().getServicio(GeneralExtraService.class).consultar(cie);\r\n\t\t\t//log.info(\"despues: \" + cie);\r\n\r\n\t\t\ttbxTipo_relacionado_3.setValue(his_parto.getTipo_relacionado_3());\r\n\t\t\ttbxNomDxRelacionado_3\r\n\t\t\t\t\t.setValue((cie != null ? cie.getNombre() : \"\"));\r\n\r\n\t\t\ttbxTratamiento.setValue(his_parto.getTratamiento());\r\n\r\n\t\t\t// Mostramos la vista //\r\n\t\t\ttbxAccion.setText(\"modificar\");\r\n\t\t\taccionForm(true, tbxAccion.getText());\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(\"Este dato no se puede editar\", \"Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\t}",
"@Override\r\n public String toString() {\r\n// ritorna una stringa\r\n return \"pollo\";\r\n }",
"@Override\n public String toString() {\n return \"Id del Libro: \"+id+\" Nombre del Libro: \"+nombre+\" Disponibilidad: \"+disponibilidad;\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tprotected String requestText() {\n\t\tGuardarVtaCeroMotivoRequest guardarVtaCeroMotivoRequest = new GuardarVtaCeroMotivoRequest();\r\n\t\tguardarVtaCeroMotivoRequest.setAnio(Anio);\r\n\t\tguardarVtaCeroMotivoRequest.setCodCliente(codCliente);\r\n\t\tguardarVtaCeroMotivoRequest.setCodDeposito(codDeposito);\r\n\t\tguardarVtaCeroMotivoRequest.setMes(Mes);\r\n\t\tguardarVtaCeroMotivoRequest.setMotivo(Motivo);\r\n\t\tguardarVtaCeroMotivoRequest.setObservacion(observacion);\r\n\t\tguardarVtaCeroMotivoRequest.setSemana(Semana);\r\n\t\tguardarVtaCeroMotivoRequest.setUsuario(Usuario);\r\n\t\tString request = JSONHelper.serializar(guardarVtaCeroMotivoRequest);\r\n\t\treturn request;\r\n\t}",
"public void testGetUtilisateurString() {\n System.out.println(\"getUtilisateurString\");\n String pnomUtilisateur = \"\";\n Utilisateur expResult = null;\n Utilisateur result = Utilisateur.getUtilisateurString(pnomUtilisateur);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Override\r\n\t\tpublic GeometrijskiLik stvoriIzStringa(String parametri) {\r\n\r\n\t\t\tString[] parametriNiz = parametri.split(\"\\\\s+\");\r\n\t\t\tif (parametriNiz.length != 4) {\r\n\t\t\t\tthrow new IllegalArgumentException(\"Netocan broj argumenata.\");\r\n\t\t\t}\r\n\t\t\tint[] parametriBrojevi = new int[4];\r\n\t\t\tfor (int i = 0; i < parametriNiz.length; i++) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tparametriBrojevi[i] = Integer.parseInt(parametriNiz[i]);\r\n\t\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\t\t\"Nisu dani integer brojevi.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn new Elipsa(parametriBrojevi[0], parametriBrojevi[1],\r\n\t\t\t\t\tparametriBrojevi[2], parametriBrojevi[3]);\r\n\t\t}",
"public String guardar()\r\n/* 69: */ {\r\n/* 70: */ try\r\n/* 71: */ {\r\n/* 72: 85 */ this.motivoLlamadoAtencion.setIdOrganizacion(AppUtil.getOrganizacion().getIdOrganizacion());\r\n/* 73: 86 */ this.motivoLlamadoAtencion.setIdSucursal(AppUtil.getSucursal().getIdSucursal());\r\n/* 74: 87 */ this.servicioMotivoLlamadoAtencion.guardar(this.motivoLlamadoAtencion);\r\n/* 75: 88 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 76: 89 */ setEditado(false);\r\n/* 77: 90 */ limpiar();\r\n/* 78: */ }\r\n/* 79: */ catch (Exception e)\r\n/* 80: */ {\r\n/* 81: 92 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 82: 93 */ LOG.error(\"ERROR AL GUARDAR DATOS\", e);\r\n/* 83: */ }\r\n/* 84: 95 */ return \"\";\r\n/* 85: */ }",
"@Override\r\n\tprotected String requestText() {\n\t\tActualizarCompromisoRequest actualizarCompromisoRequest = new ActualizarCompromisoRequest();\r\n\t\tactualizarCompromisoRequest.listaInventarioCompromiso = this.listaInventarioCompromiso;\r\n\t\tactualizarCompromisoRequest.listaPosicionCompromiso = this.listaPosicionCompromiso;\r\n\t\tactualizarCompromisoRequest.listaPresentacionCompromiso = this.listaPresentacionCompromiso;\r\n\t\tactualizarCompromisoRequest.updateInformacionAdicionalTO = this.updateInformacionAdicionalTO;\r\n\t\tactualizarCompromisoRequest.codigoCabecera = this.codigoCabecera;\r\n\t\tString request = JSONHelper.serializar(actualizarCompromisoRequest);\r\n\t\treturn request;\r\n\t}",
"public String borra() { \n clienteDAO.borra(c.getId());\n return \"listado\";\n }",
"@Override\n public String toString(){\n return Nombre + \", \" + Clave + \", de \" + horario + \", \" + Maestro;\n }",
"public void setContrasena(String contrasena) {this.contrasena = contrasena;}",
"public void urciStupneVrcholu(){\n\t\tfor(int i = 0;i < vrchP.length; i++){\n\t\t\tstupenVrcholu(vrchP[i].klic);\n\t\t}\n\t}",
"public String validarAsociacion(String nombre, String dpi, String codigo_cuenta, String codigo_cliente) {\n String mensaje = \"\";\n DM_Cliente dmcli = new DM_Cliente();\n DM_Solicitud dmsol = new DM_Solicitud();\n try {\n Cliente cliente = dmcli.validarCliente(nombre, dpi);\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta WHERE Codigo = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cuenta);\n if (cliente != null) {\n rs = PrSt.executeQuery();\n if (rs.next()) {\n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n Solicitud solicitud = new Solicitud();\n solicitud.setEmisor(codigo_cliente);\n solicitud.setReceptor(cliente.getCodigo());\n solicitud.setCodigo_cuenta(codigo_cuenta);\n solicitud.setEstado(\"Pendiente\");\n solicitud.setFecha(fecha);\n mensaje = dmsol.agregarSolicitud(solicitud);\n } else {\n mensaje = \"La cuenta no existe\";\n }\n } else {\n mensaje = \"El dueño de la cuenta no existe\";\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return mensaje;\n }",
"public interface IStatutDossierService {\n\n\t/**\n\t * Méthode permettant de modifier les statuts d'un dossier\n\t *\n\t * @param statutDossierDTO\n\t * les statuts du dossier à enregistrer\n\t */\n\tvoid modifierStatutDossier(StatutDossierDTO statutDossierDTO);\n\n\t/**\n\t * Méthode permettant de rechercher les statuts d'un dossier\n\t *\n\t * @param renoiRHMatricule\n\t * matricule renoiRH\n\t * @param payLot\n\t * lot PAY\n\t */\n\tOptional<StatutDossierDTO> rechercherStatutDossier(String renoiRHMatricule, String payLot);\n\n}",
"public java.lang.String getObservacion(){\n return localObservacion;\n }",
"public String guardarJustificacion() {\n try {\n if (justificacionHelper.getEsNuevo()) {\n LOG.info(\"ENTRO POR Q ES NUEVO\");\n Justificacion justificacion = justificacionHelper.getJustificacionVO().getJustificacion();\n justificacion.setTipoMovimientoRegla(justificacionHelper.getJustificacionVO().getReglaMensaje().\n getTipoMovimientoRegla());\n justificacion.setMovimiento(\n justificacionHelper.getJustificacionVO().getReglaMensaje().getMovimiento());\n if (justificacionHelper.getArchivoCargado() != null) {\n LOG.info(UtilCadena.concatenar(\"Archivo a guardar \", justificacionHelper.getArchivoCargado()));\n administracionServicio.guardarJustificacion(\n justificacionHelper.getArchivoCargado().getContents(),\n justificacionHelper.getArchivoCargado().getFileName(),\n justificacionHelper.getArchivoCargado().getContentType(),\n justificacionHelper.getArchivoCargado().getSize(),\n obtenerUsuarioConectado().getServidor().getNumeroIdentificacion(), justificacion);\n mostrarMensajeEnPantalla(REGISTRO_GUARDADO, FacesMessage.SEVERITY_INFO);\n justificacionHelper.setArchivoCargado(null);\n justificacionHelper.setEsNuevo(Boolean.FALSE);\n } else {\n mostrarMensajeEnPantalla(MENSAJE_ARCHIVO_REQUERIDO, FacesMessage.SEVERITY_ERROR);\n }\n } else {\n LOG.info(\"ENTRO POR Q ES EDICION\");\n Justificacion justificacion = justificacionHelper.getJustificacionVO().getJustificacion();\n justificacion.setTipoMovimientoRegla(justificacionHelper.getJustificacionVO().getReglaMensaje().\n getTipoMovimientoRegla());\n justificacion.setMovimiento(\n justificacionHelper.getJustificacionVO().getReglaMensaje().getMovimiento());\n\n LOG.info(\"Archivo de justificacion a editar \" + justificacion.getArchivo());\n if (justificacionHelper.getArchivoCargado() != null) {\n administracionServicio.actualizarJustificacion(\n justificacionHelper.getArchivoCargado().getContents(),\n justificacionHelper.getArchivoCargado().getFileName(),\n justificacionHelper.getArchivoCargado().getContentType(),\n justificacionHelper.getArchivoCargado().getSize(),\n obtenerUsuarioConectado().getServidor().getNumeroIdentificacion(), justificacion);\n } else {\n administracionServicio.actualizarJustificacion(\n null, \"\", \"\", 0L, obtenerUsuarioConectado().getServidor().getNumeroIdentificacion(),\n justificacion);\n }\n justificacionHelper.setArchivoCargado(null);\n mostrarMensajeEnPantalla(REGISTRO_GUARDADO, FacesMessage.SEVERITY_INFO);\n }\n //mostrarMensajeEnPantalla(REGISTRO_GUARDADO, FacesMessage.SEVERITY_INFO);\n } catch (Exception e) {\n mostrarMensajeEnPantalla(ERROR_REGISTRO_GUARDADO, FacesMessage.SEVERITY_ERROR);\n LOG.log(Level.INFO, \"Error al guardar la Justificacion {0}\", e);\n }\n return null;\n }",
"@DirectMethod\r\n\tpublic String agregarNodosArbolIn(boolean bNvoHijo,//que si es nuevo hijo si dice false es padre\r\n\t\t\t\t\t\t\t\t\tString sRuta,//trae la clave de donde viene de la empresa raiz ala que se le metera el hijo\r\n\t\t\t\t\t\t\t\t\tint iIdEmpresaRaiz,//trae la clave de la empresa raiz ala que se le metera el hijo \r\n\t\t\t\t\t\t\t\t\tint iIdEmpresaHijo,//Id de la empresa \r\n\t\t\t\t\t\t\t\t\tdouble uMonto,//monto en flotante\r\n\t\t\t\t\t\t\t\t\tString nombreArbol,//trae un dato en blanco ''\r\n\t\t\t\t\t\t\t\t\t//String tipoValor,//trae el dato del combo tipodevalor \r\n\t\t\t\t\t\t\t\t\tint tipoOperacion,//treae el numero de la operacion\r\n\t\t\t\t\t\t\t\t\tint iIdEmpresaPadre){//trae el Id del padre ala que se insertara\r\n\r\n\t\t\r\n\t\t\r\n\r\n\t\tString sMsgUsuario = \"en nodos hojso angel\";\r\n\t\tif(!Utilerias.haveSession(WebContextManager.get()))\r\n\t\t\treturn sMsgUsuario;\r\n\t\ttry{\r\n\t\t\tBarridosFondeosService barridosFondeosService = (BarridosFondeosService) contexto.obtenerBean(\"barridosFondeosBusinessImpl\");\r\n\t\t\tsMsgUsuario = barridosFondeosService.agregarNodosArbolIn(bNvoHijo, sRuta, iIdEmpresaRaiz, \r\n\t\t\t\t\tiIdEmpresaHijo, uMonto, nombreArbol, tipoOperacion, iIdEmpresaPadre); \r\n\t\t}catch(Exception e){\r\n\t\t\tbitacora.insertarRegistro(new Date().toString() + \" \" + Bitacora.getStackTrace(e)\r\n\t\t\t\t\t+ \"P: BarridosFondeos C: BarridosFondeosAction M: agregarNodosArbolIn\");\r\n\t\t}return sMsgUsuario;\r\n\t}",
"public RespuestaBD modificarRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismomismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioModificacion) {\n/* 437 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* */ try {\n/* 440 */ String s = \"update wkf_detalle set servicio_inicio=\" + servicioInicio + \",\" + \" accion=\" + accion + \",\" + \" codigo_estado=\" + codigoEstado + \",\" + \" servicio_destino=\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \" nombre_procedimiento='\" + nombreProcedimiento + \"',\" + \" correo_destino='\" + correoDestino + \"',\" + \" enviar_solicitud='\" + enviar + \"',\" + \" ind_mismo_proveedor='\" + mismoProveedor + \"',\" + \" ind_mismo_cliente='\" + mismomismoCliente + \"',\" + \" estado='\" + estado + \"',\" + \" caracteristica=\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + \" valor_caracteristica=\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + \" caracteristica_correo=\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + \" metodo_seleccion_proveedor=\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + \" ind_correo_clientes=\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + \" enviar_hermana=\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + \" enviar_si_hermana_cerrada=\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + \" ind_cliente_inicial=\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"',\" + \" fecha_modificacion=\" + Utilidades.getFechaBD() + \"\" + \" where\" + \" codigo_flujo=\" + codigoFlujo + \" and secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 465 */ rta = this.dat.executeUpdate2(s);\n/* */ }\n/* 467 */ catch (Exception e) {\n/* 468 */ e.printStackTrace();\n/* 469 */ Utilidades.writeError(\"FlujoDetalleDAO:modificarRegistro \", e);\n/* 470 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 472 */ return rta;\n/* */ }",
"@Override\n\tpublic void prossimo_stato(Model_context model, ArrayList<String> dati_input) {\n\t\tswitch(dati_input.get(0)) {\n\t\t\tcase \"1\":{\n\t\t\t\tmodel.set_stato_attuale(new Stato_inserisci_descrizione_libro_ricerca(get_attore()));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"2\":{\n\t\t\t\tmodel.set_stato_attuale(new Stato_inserisci_descrizione_film_ricerca(get_attore()));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:{\n\t\t\t\tmodel.set_stato_attuale(new Stato_errore(new Stato_ricerca_visualizza(get_attore()), this, \"inserisci un valore corretto\", get_attore()));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"@Override protected String isEnabled(final String param) {\n if (getDrbdResource().isCommited()\n && DRBD_RES_PARAM_NAME.equals(param)) {\n return \"\";\n }\n return null;\n }",
"public void update_nombre(int id, String str) {\n String query = \"\";\n Conexion bd = new Conexion();\n\n try {\n query = \"UPDATE curso SET nombre_curso = ? WHERE id_curso = ?;\";\n PreparedStatement ps = bd.conectar().prepareStatement(query);\n ps.setString(1, str);\n ps.setInt(2, id);\n\n ps.executeUpdate();\n System.out.println(\"El registro se actualizó exitosamente.\");\n ps.close();\n bd.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"public void mainkan(){\n System.out.println();\n //System.out.printf(\"Waktu: %1.2f\\n\", this.oPlayer.getWaktu());\n System.out.println(\"Nama : \" + this.oPlayer.nama);\n System.out.println(\"Senjata : \" + this.oPlayer.getNamaSenjataDigunakan());\n System.out.println(\"Kesehatan : \" + this.oPlayer.getKesehatan());\n// System.out.println(\"Daftar Efek : \" + this.oPlayer.getDaftarEfekDiri());\n System.out.println(\"Nama Tempat : \" + this.namaTempat);\n System.out.println(\"Narasi : \" + this.narasi);\n }",
"@Test(expected = NemaKonfiguracije.class)\n public void testUcitajKonfiguraciju_String() throws Exception {\n System.out.println(\"ucitajKonfiguraciju\");\n KonfiguracijaTxt instance = new KonfiguracijaTxt(datKonf.getName());\n instance.ucitajKonfiguraciju(datKonf.getName());\n }",
"public String MuestraCualquiera() {//PARA MOSTRAR CUALQUIER TIPO DE CLIENTE\nString Muestra=\"\";\n\nif(getTipoCliente().equals(\"Docente\")) {//SI ES DOCENTE\nMuestra=MuestraDocente();//SE MUESTRAN SOLO LOS DATOS DE DOCENTE\n}else if(getTipoCliente().equalsIgnoreCase(\"Administrativo\")) {//SI ES ADMINISTRATIVO\nMuestra=MuestraAdministrativo();//SE MUESTRAN SOLO LOS DATOS DE ADMINISTRATIVO\n}\n\nreturn Muestra;\n}",
"String getDataNascimento();",
"public interface ICampaniaDAO {\n\t/**\n\t * Crear la campania en el repositorio\n\t * @param campania\n\t */\n\tvoid crearCampania(GestionPrecioDTO campania);\n\t\n\t\n\t/**\n\t * Actualizar la campania en el repositorio\n\t * @param campania\n\t */\n\tvoid actualizarCampania(GestionPrecioDTO campania, UserDto user);\n\t\n\t/** Metodo actualizarCampania, utilizado para actualizar una campania\n\t * @author srodriguez\n\t * 27/2/2015\n\t * @param campania\n\t * @param user\n\t * @return void\n\t */\n\tvoid actualizarCampania(GestionPrecioDTO campania, String user);\n\t\n\t/**\n\t * Buscar la campania por el código de referencia\n\t * de Loyalty\n\t * @param codigoCampaniaReferencia Código de Loyalty\n\t * @return\n\t */\n\tGestionPrecioDTO findCampania(String codigoCampaniaReferencia);\n /**\n * Verifica si una campania existe dado su clave primaria como\n * parámetro de búsqueda\n * @param id\n * @returnS\n */\n Boolean findExistsCampania(GestionPrecioID id) ;\n /**\n * Obtener todas las campanias existentes en el repositorio\n * @return\n */\n Collection<GestionPrecioDTO> findCampaniasPendientes() ;\n /**\n * Buscar un listado de campanias dado una plantilla de búsqueda y el\n * estado de cobro\n * @param gestionPrecio Plantilla de búsqueda\n * @param estadoCobro Estado de cobro. Ej: PENDIENTE, CONFIGURADA, COBRADA, EN CURSO, etc.\n * @return\n */\n Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);\n \n /**\n * @author cbarahona\n * @param campania\n */\n void actualizarCampaniaLoyalty (GestionPrecioDTO campania);\n \n SearchResultDTO<GestionPrecioDTO> findCampaniasPendientesLazy (Integer firstResult, Integer pageSize, Boolean countAgain);\n \n SearchResultDTO<GestionPrecioDTO> findCampaniasFiltrosLazy (GestionPrecioDTO gestionPrecio, String estadoCobro,Integer firstResult, Integer pageSize, Boolean countAgain);\n \n GestionPrecioDTO findCampania(final String codigoReferencia, final Integer codigoCompania) throws SICException;\n \n void actualizarCampania(GestionPrecioDTO campania) throws SICException;\n \n /**\n * Metodo que valida si una campaña tiene participantes\n * @param codigoReferencia\n * @return\n * @throws SICException\n */\n Boolean tieneParticipantesCampania(String codigoReferencia) throws SICException;\n}",
"public String getAutorizacionCompleto()\r\n/* 184: */ {\r\n/* 185:316 */ return this.establecimiento + \"-\" + this.puntoEmision + \" \" + this.autorizacion;\r\n/* 186: */ }",
"public interface Charakter {\n int getRüstungswert();\n void zeigeRüstungswert();\n}",
"@Override\n\tpublic String toString() {\n\t\treturn \"Tạp Chí: \"+\" Tựa đề: \"+ tuaDe+\", Số Trang: \"+soTrang+\", Nhà xuất bản: \"+nxb+\", Số Bài Viết: \"+soBaiViet;\n\t}",
"public void w_plik (BufferedWriter wpl)\n\t{\n\ttry{\t\n\t\twpl.write(imienaz+\"\\n\");\n\t\twpl.write(rodzaj+\"\\n\");\n\t\twpl.write(Integer.toString(numer)+\"\\n\");\n\t\twpl.write(Integer.toString(powierzchnia)+\"\\n\");\n\t\twpl.write(Integer.toString(wartosc)+\"\\n\");\n\t\tif (altanka == true ) wpl.write(\"1\"+\"\\n\"); else wpl.write(\"0\"+\"\\n\");\n\t\tif (studnia == true ) wpl.write(\"1\"+\"\\n\"); else wpl.write(\"0\"+\"\\n\");\n\t\t}\n\tcatch (IOException e){System.out.println(\"Blad we/wy\");};\n\t}",
"@Override\n\tpublic String validateSpoiledOr(Map<String, Object> params)\tthrows SQLException {\n\t\treturn this.giacSpoiledOrDAO.validateSpoiledOr(params);\n\t}",
"@Test\n public void quandoCriaPilhaVazia(){\n // QUANDO (PRE-CONDIÇAO) E FAÇA (EXECUÇAO DO COMPORTAMENTO):\n PilhaString pilha1 = new PilhaString();\n \n // VERIFICAR (CHECK)\n assertTrue(pilha1.isVazia()); //true\n }",
"@Override\r\n\tprotected String requestText() {\n\t\tConsultarIndiceEjecucionAnioRequest consultarIndiceEjecucionAnioRequest = new ConsultarIndiceEjecucionAnioRequest();\r\n\t\tconsultarIndiceEjecucionAnioRequest.setPeriodo(periodo);\r\n\t\tString request = JSONHelper.serializar(consultarIndiceEjecucionAnioRequest);\r\n\t\treturn request;\r\n\t}",
"public boolean souvislost(){\n\t\t\n\t\tif(pole.size() != pocetVrcholu){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t\t\n\t}",
"public void atakuj() {\n\n System.out.println(\"to metoda atakuj z klasy Potwor \");\n\n }",
"public String GetStatoNaveS() {\n if (this.stato == statonave.INDENNE) {\r\n return \"indenne\";\r\n }\r\n if (this.stato == statonave.COLPITA) {\r\n return \"colpita\";\r\n }\r\n if (this.stato == statonave.AFFONDATA) {\r\n return \"affondata\";\r\n } else {\r\n return \"non c'è alcuna nave!\";\r\n }\r\n }",
"public String insertarOficial() {\r\n\t\tlog.info(\"LISTA DE DESHABILITADO--> \"+ TelefonoDeshabilitado.size()); \r\n\t\tlog.info(\"insertarOficial() \" + \"Id-Cliente-->\"+\" \"+ objClienteSie.getIdcliente() + \" \"+\"Nombre de Cliente\"+\" \"+ objClienteSie.getNombrecliente());\r\n\t\tString paginaretorno=\"\";\r\n\t\ttry {\r\n\t\t\tif (log.isInfoEnabled()) {\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlog.info(\"busca el Id-DNI\");\r\n\t\t\tobjClienteSie.setTbTipoDocumentoIdentidad(objTipoDocService.buscarTipoDocumento(TipoDocumento));\r\n\t\t\t\r\n\t\t\tlog.info(\"busca el Id-Ubigeo\");\r\n\t\t\tobjDomicilio.setTbUbigeo(objUbigeoService.findUbigeo(Integer.parseInt(idUbigeo1)));\r\n\t\t\t\r\n\t\t\tlog.info(\"*******AQUI ESTA SI HAY UN VALOR DENTRO DE LA LISTA TELEFONOS PARA ELIMINAR*******\");\r\n\t\t\tlog.info(\"Tel-FISICO--------->\"+ \" \"+ TelefonoDeshabilitado.size());\r\n\t\t\tlog.info(\"Tel-TEMPORAL------->\"+ \"\t\"+ TelefonoPersonaList.size());\r\n\t\t\t\r\n\t\t\tlog.info(\"*******AQUI ESTA SI HAY UN VALOR DENTRO DE LA LISTA DOMICILIO PARA ELIMINAR*******\");\r\n\t\t\tlog.info(\"Domicilio-FISICO--------->\"+ \" \"+ DomicilioPersonaDeshabilitado.size());\r\n\t\t\tlog.info(\"Domicilio-TEMPORAL------->\"+ \"\t\"+ DomicilioPersonaList.size());\r\n\t\t\tobjClienteService.updateCliente(objClienteSie,objDomicilio,idUbigeo1, idUbigeo, tipo, Tipocasanuevo,TelefonoPersona,TelefonoPersonaList, TelefonoDeshabilitado, DomicilioPersonaList, DomicilioPersonaDeshabilitado);\r\n\t\t\t\r\n\t\t\tmensaje = Constants.MESSAGE_ACTUALIZO_TITULO;\r\n\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_INFO,\r\n\t\t\tConstants.MESSAGE_INFO_TITULO, mensaje);\r\n\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tmensaje = e.getMessage();\r\n\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\tlog.error(e.getMessage());\r\n\t}\r\n\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\treturn getViewList();\r\n\t}",
"public static String updateTurno (Turno trn, Personale dir, Personale sound,\n MyDate giorno, Room sala, TypeTurno type,\n Coppia coppia, ArrayList <Anello> anelli,\n ArrayList <Turno> turni) {\n int righe = 0;\n for (Anello a : anelli) {\n righe += a.getRighe();\n }\n //turno.setTurnoId(\"sh\"+ RandomStringUtils.random(9, true, true)+\"\");\n //turno.setRighe(righe);\n for (Anello anello:anelli) {\n anello.setStatus(Status.WIP);\n }\n\n\n for (Turno tu : turni) {\n\n\n if ( !trn.getTurnoId().equals(tu.getTurnoId()) &&\n giorno.compare(tu.getGiorno()) &&\n type.name().equals(tu.getType().name()) &&\n sala.getName().equals(tu.getSala().getName()) &&\n dir.compareTo(tu.getDir()) &&\n sound.compareTo(tu.getSound()) &&\n coppia.getDopp().compareTo(tu.getCoppia().getDopp()) )\n {\n\n return \"Attenzione!\\n\" +\n \"Un altro turno è già prenotato per questa combinazione di data, orario e\" +\n \" \" +\n \"studio\";\n }\n }\n\n if (!DbShift.update(trn, type, giorno, dir, sound, sala, coppia, righe)) {\n return \"Errore\";\n } else {\n if (!DbShift.deleteShiftAnello(trn)) {\n return \"Errore\";\n } else {\n for (Anello a: trn.getAnelli()) {\n DbAnello.singleEditAnello(a, \"New\", \"status\");\n }\n if (!DbShift.insertAnelli(trn, anelli)) {\n return \"Errore\";\n } else {\n for (Anello a : anelli) {\n if (!DbAnello.singleEditAnello(a, a.getStatus().toString(), \"status\")) {\n return \"Errore\";\n }\n }\n\n trn.setDir(dir);\n trn.setSound(sound);\n trn.setGiorno(giorno);\n trn.setSala(sala);\n trn.setType(type);\n trn.setCoppia(coppia);\n trn.setAnelli(anelli);\n return \"Turno aggiornato correttamente\";\n\n }\n }\n\n }\n }",
"public String toString(){\n\n\t\tString msg =\"\";\n\t\tmsg += super.toString()+\"\\n\";\n\t\tmsg +=\"El tipo de servicio es: \"+typeOfService+\"\\n\";\n\t\tmsg +=\"La cantidad de kiloWatts registrada es: \"+kiloWatts+\"\\n\";\n\t\tmsg +=\"Cantidad de arboles que deben plantar: \"+calculatedConsuption()+\"\\n\";\n\n\t return msg;\n\t}",
"public String InsertarAnuncioGeneral(AnuncioGeneralDTO anuncio){\n int status=0;\n String message=\"Funciona bien\";\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"insertar.AnuncioGeneral\"));\n \n ps.setString(1, anuncio.getTipoAnuncio().toString());\n ps.setString(2,anuncio.getTitulo());\n ps.setString(3,anuncio.getCuerpo());\n \n java.sql.Date fechaPublicacion=new java.sql.Date(anuncio.getFechaPublicacion().getTime());\n // DateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss dd/MM/yyyy\");\n // String fecha = dateFormat.format(anuncio.getFechaPublicacion());\n // java.sql.Date fechaPublicacion=new java.sql.Date(dateFormat.parse(fecha).getTime());\n ps.setDate(4, fechaPublicacion);\n message=\"Cargo bien la fecha\";\n ps.setString(5,anuncio.getPropietario().getEmail());\n ps.setString(6,anuncio.getEstadoAnuncio().toString());\n status=ps.executeUpdate();\n\n \n int idAnuncio=GetMaxID();\n for(Contacto c : anuncio.getDestinatarios()){\n PreparedStatement psDestinatario=conect.prepareStatement(sqlProp.getProperty(\"insertar.Destinatario\"));\n psDestinatario.setInt(1, idAnuncio);\n psDestinatario.setString(2, c.getEmail());\n psDestinatario.executeUpdate();\n }\n message=\"funciona bien\";\n }catch(Exception e){\n e.toString();\n }\n\n return message;\n }"
]
| [
"0.59285206",
"0.58072394",
"0.5632159",
"0.553606",
"0.55290437",
"0.55142033",
"0.54856354",
"0.54637855",
"0.54529685",
"0.5429453",
"0.540309",
"0.53926826",
"0.53811157",
"0.5374819",
"0.53706217",
"0.5369276",
"0.5366368",
"0.5359829",
"0.53444445",
"0.5342318",
"0.53413224",
"0.5252982",
"0.52513623",
"0.52476525",
"0.52234983",
"0.5197886",
"0.5179646",
"0.51765233",
"0.5169325",
"0.51685375",
"0.51663953",
"0.5165429",
"0.51564103",
"0.5144973",
"0.5138496",
"0.5137785",
"0.51246756",
"0.51225615",
"0.51205313",
"0.511809",
"0.5116987",
"0.51042974",
"0.5099058",
"0.50969726",
"0.5082676",
"0.5076409",
"0.50751525",
"0.5072946",
"0.5070771",
"0.506845",
"0.5067367",
"0.50648123",
"0.50588644",
"0.5030311",
"0.5029025",
"0.5014737",
"0.5013247",
"0.50086105",
"0.49841675",
"0.497724",
"0.49762562",
"0.49741626",
"0.497391",
"0.49728128",
"0.49632138",
"0.49603894",
"0.49545872",
"0.4950956",
"0.49494413",
"0.4942575",
"0.49410674",
"0.49391574",
"0.49369663",
"0.49240288",
"0.49120015",
"0.49064383",
"0.49063364",
"0.48986453",
"0.4898336",
"0.4896526",
"0.48939437",
"0.48936564",
"0.48875657",
"0.4877624",
"0.4876514",
"0.4874",
"0.4870875",
"0.48695174",
"0.48653048",
"0.48613286",
"0.486091",
"0.4859684",
"0.48499843",
"0.48459518",
"0.4843762",
"0.48355943",
"0.4835162",
"0.4828892",
"0.48283947",
"0.4828259"
]
| 0.530849 | 21 |
Metoda wybiera losowo jedno z zapisanych wczesniejszych trafien i sprawdza, czy mozna ostrzelac ktores z sasiadujacych pol. Jesli tak, wybiera jedno z pol do ostrzelania. Jesli nie, usuwa pole z listy, wybiera losowo kolejne zapisane trafienie i powtarza proces. Jesli wyczerpane zostana zapisane trafienia, wywolywana jest metoda strzalLosowy() | protected boolean strzalSasiadujacy(StatekIterator oStatkiPrzeciwnika)
{
//przygotowanie kontenera przechowujacego do 4 sasiednich pol, ktore nadaja sie do kolejnego strzalu
ArrayList<Pozycja> oSasiedniePola = new ArrayList<Pozycja>(4);
//petla wyszukujaca we wczesniejszych trafieniach pola do oddania kolejnego strzalu
while (oUzyteczneTrafienia.size() > 0)
{
//wylosowanie pola do przetestowania
int iLosowanePole = oRand.nextInt(oUzyteczneTrafienia.size());
Pozycja oWybranePole = oUzyteczneTrafienia.get(iLosowanePole);
try
{
//wczytanie wspolrzednych 4 sasiadow i sprawdzenie, czy sa to pola puste, lub zawierajace statek
for (int i = -1; i <= 1; ++i)
for (int j = -1; j <= 1; ++j)
if (
oWybranePole.getX() + i >= 0 && oWybranePole.getX() + i < oStatkiPrzeciwnika.getPlansza().getSzerokosc()
&& oWybranePole.getY() + j >= 0 && oWybranePole.getY() + j < oStatkiPrzeciwnika.getPlansza().getWysokosc()
&& (i + j == -1 || i + j == 1)
)
{
if (oStatkiPrzeciwnika.getPlansza().getPole(oWybranePole.getX() + i, oWybranePole.getY() + j) == PlanszaTypPola.PLANSZA_POLE_PUSTE
|| oStatkiPrzeciwnika.getPlansza().getPole(oWybranePole.getX() + i, oWybranePole.getY() + j) == PlanszaTypPola.PLANSZA_STATEK
)
{
Pozycja oPrawidlowe = new Pozycja(2);
oPrawidlowe.setX(oWybranePole.getX() + i);
oPrawidlowe.setY(oWybranePole.getY() + j);
oSasiedniePola.add(oPrawidlowe);
}
}
if (bProsteLinie == true)
{
boolean bPionowy = false;
boolean bPoziomy = false;
for (int i = -1; i <= 1; ++i)
for (int j = -1; j <= 1; ++j)
if (
oWybranePole.getX() + i >= 0 && oWybranePole.getX() + i < oStatkiPrzeciwnika.getPlansza().getSzerokosc()
&& oWybranePole.getY() + j >= 0 && oWybranePole.getY() + j < oStatkiPrzeciwnika.getPlansza().getWysokosc()
&& (i + j == -1 || i + j == 1)
)
{
if (oStatkiPrzeciwnika.getPlansza().getPole(oWybranePole.getX() + i, oWybranePole.getY() + j) == PlanszaTypPola.PLANSZA_STRZAL_CELNY)
{
if (i == 0)
bPionowy = true;
if (j == 0)
bPoziomy = true;
}
}
if (bPionowy == true && bPoziomy == true)
throw new ProgramistaException();
if (bPionowy == true)
{
for (int i = oSasiedniePola.size() - 1; i >= 0; --i)
if (oSasiedniePola.get(i).getX() != oWybranePole.getX())
oSasiedniePola.remove(i);
}
if (bPoziomy == true)
{
for (int i = oSasiedniePola.size() - 1; i >= 0; --i)
if (oSasiedniePola.get(i).getY() != oWybranePole.getY())
oSasiedniePola.remove(i);
}
}
if (oSasiedniePola.size() > 0)
{
//sa pola prawidlowe do oddania kolejnego strzalu
int iWylosowanySasiad = oRand.nextInt(oSasiedniePola.size());
//oddanie strzalu na wspolrzedne weybranego pola
boolean bStrzal;
bStrzal = oStatkiPrzeciwnika.strzal(oSasiedniePola.get(iWylosowanySasiad).getX(), oSasiedniePola.get(iWylosowanySasiad).getY());
if (bStrzal == true)
{
//zapisanie celnego strzalu w tablicy trafien
Pozycja oTrafienie = new Pozycja(2);
oTrafienie.setX( oSasiedniePola.get(iWylosowanySasiad).getX() );
oTrafienie.setY( oSasiedniePola.get(iWylosowanySasiad).getY() );
oUzyteczneTrafienia.add(oTrafienie);
}
return bStrzal;
}
else
{
//brak prawidlowych pol. usuniecie trafienia z listy i przejscie do kolejnej iteracji petli wyszukujacej
oUzyteczneTrafienia.remove(iLosowanePole);
}
}
catch (ParametrException e)
{
throw new ProgramistaException(e);
}
}
return strzalLosowy(oStatkiPrzeciwnika);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected boolean strzalLosowy(StatekIterator oStatkiPrzeciwnika)\n\t\t{\n\t\ttry\n\t\t\t{\n\t\t\tPozycja oWylosowanePole = losujPole(oStatkiPrzeciwnika.getPlansza());\n\t\t\tboolean bTrafienie = oStatkiPrzeciwnika.strzal(oWylosowanePole.getX(), oWylosowanePole.getY());\n\t\t\tif (bTrafienie == true)\n\t\t\t\t{\n\t\t\t\t//zapisanie celnego strzalu w tablicy trafien\n\t\t\t\tPozycja oTrafienie = new Pozycja(2);\n\t\t\t\toTrafienie.setX(oWylosowanePole.getX());\n\t\t\t\toTrafienie.setY(oWylosowanePole.getY());\n\t\t\t\toUzyteczneTrafienia.add(oTrafienie);\n\t\t\t\t}\n\t\t\treturn bTrafienie;\n\t\t\t}\n\t\tcatch (ParametrException e)\n\t\t\t{\n\t\t\tthrow new ProgramistaException(e);\n\t\t\t}\n\t\t}",
"protected boolean strzalWielokrotny(StatekIterator oStatkiPrzeciwnika, int iIloscPowtorzen)\n\t\t{\n\t\ttry\n\t\t\t{\n\t\t\tPozycja oWylosowanePole = null;\n\t\t\tPlansza oPlansza = oStatkiPrzeciwnika.getPlansza();\n\t\t\tfor (int i = 1; i <= iIloscPowtorzen; ++i)\n\t\t\t\t{\n\t\t\t\toWylosowanePole = losujPole(oPlansza);\n\t\t\t\tif (oPlansza.getPole(oWylosowanePole.getX(), oWylosowanePole.getY()) == PlanszaTypPola.PLANSZA_STATEK || i == iIloscPowtorzen)\n\t\t\t\t\t{\n\t\t\t\t\tboolean bStrzal;\n\t\t\t\t\tbStrzal = oStatkiPrzeciwnika.strzal(oWylosowanePole.getX(), oWylosowanePole.getY());\n\t\t\t\t\tif (bStrzal == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t//zapisanie celnego strzalu w tablicy trafien\n\t\t\t\t\t\tPozycja oTrafienie = new Pozycja(2);\n\t\t\t\t\t\toTrafienie.setX( oWylosowanePole.getX() );\n\t\t\t\t\t\toTrafienie.setY( oWylosowanePole.getY() );\n\t\t\t\t\t\toUzyteczneTrafienia.add(oTrafienie);\n\t\t\t\t\t\t}\n\t\t\t\t\treturn bStrzal;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tcatch (ParametrException e)\n\t\t\t{\n\t\t\tthrow new ProgramistaException(e);\n\t\t\t}\n\t\t//petla musi zwrocic strzal. skoro doszlo tutaj - wywal wyjatek\n\t\tthrow new ProgramistaException();\n\t\t}",
"private Pozycja losujPole(Plansza oPlanszaPrzeciwnika)\n\t\t{\n\t\ttry\n\t\t\t{\n\t\t\tPozycja oWylosowanePole = new Pozycja(2);\n\t\t\tint iWylosowanePole = oRand.nextInt( oPlanszaPrzeciwnika.getIloscNieznanych() ) + 1;\n\t\t\t//obliczenie x i y dla wylosowanego pola\n\t\t\tint iX = 0;\n\t\t\tint iY = 0;\n\t\t\twhile (iWylosowanePole > 0)\n\t\t\t\t{\n\t\t\t\tif (oPlanszaPrzeciwnika.getPole(iX, iY) == PlanszaTypPola.PLANSZA_POLE_PUSTE || oPlanszaPrzeciwnika.getPole(iX, iY) == PlanszaTypPola.PLANSZA_STATEK)\n\t\t\t\t\t--iWylosowanePole;\n\t\t\t\tif (iWylosowanePole > 0)\n\t\t\t\t\t{\n\t\t\t\t\t++iX;\n\t\t\t\t\tif (iX == oPlanszaPrzeciwnika.getSzerokosc())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t++iY;\n\t\t\t\t\t\tiX = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\toWylosowanePole.setX(iX);\n\t\t\toWylosowanePole.setY(iY);\n\t\t\treturn oWylosowanePole;\n\t\t\t}\n\t\tcatch (ParametrException e)\n\t\t\t{\n\t\t\tthrow new ProgramistaException(e);\n\t\t\t}\n\t\t}",
"public void realizacjap34() {\n System.out.println(\"REALIZACJA PUNKTU 3\\n\");\n\n System.out.println(\"\\nWyszukiwanie osob po imieniu (Piotr) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzOsobyPoImieniu(Listy.osoby, \"Piotr\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po nazwisku (Oleszczuk) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzOsobyPoNazwisku(Listy.osoby, \"Oleszczuk\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy mniejszym niz 10============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyMniejszymNiz(Listy.osoby, 10).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy większym niz 10============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyWiekszymNiz(Listy.osoby, 10).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy równym 5============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyRownym(Listy.osoby, 5).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin mniejszej niz 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachMniejszychNiz(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin wiekszej niz 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachWiekszychNiz(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin równej 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachRownych(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji wiekszej niz 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiWiekszejNiz(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji mniejszej niz 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiMniejszejNiz(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji rownej 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiRownej(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stanowisku (Adiunkt) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStanowisku(Listy.osoby, \"Adiunkt\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie studenta po numerze indeksu (123456) ============================================================================\\n\");\n System.out.println(NarzedziaWyszukiwania.znajdzStudentaPoIndeksie(Listy.osoby, \"123456\"));\n\n System.out.println(\"\\nWyszukiwanie studentów po roku studiów (1) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzStudentowPoRokuStudiow(Listy.osoby, 1).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie studentów po kierunku (Informatyka Stosowana) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzStudentowPoKierunku(Listy.osoby, \"Informatyka Stosowana\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie kursu po nazwie (Analiza Matematyczna 1) ============================================================================\\n\");\n System.out.println(NarzedziaWyszukiwania.znajdzKursPoNazwie(Listy.kursy, \"Analiza Matematyczna 1\"));\n\n System.out.println(\"\\nWyszukiwanie kursów po liczbie ects (5) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzKursyPoECTS(Listy.kursy, 5).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie kursów po prowadzacym+\"+Listy.osoby.get(0).getImie()+\" \"+Listy.osoby.get(0).getNazwisko()+\" ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzKursyPoProwadzacym(Listy.kursy, Listy.osoby.get(0)).forEach(System.out::println);\n\n\n //REALIZACJA PUNKTU 4\n System.out.println(\"=====================================================================================================================\");\n System.out.println(\"REALIZACJA PUNKTU 4\");\n System.out.println(\"=====================================================================================================================\\n\");\n System.out.println(\"Kursy:\\n\");\n for (Kurs kurs : Listy.kursy) {\n System.out.println(kurs.toString());\n }\n\n System.out.println(\"\\nOsoby:\\n\");\n for (Osoba osoba : Listy.osoby) {\n System.out.println(\"OSOBA====================================================================================================\");\n System.out.println(osoba.toString());\n System.out.println();\n }\n }",
"public void ZbierzTowaryKlas() {\n\t\tSystem.out.println(\"ZbierzTowaryKlas\");\n\t\tfor(int i=0;i<Plansza.getTowarNaPlanszy().size();i++) {\n\t\t\tfor(Towar towar : Plansza.getTowarNaPlanszy()) {\n\t\t\t\t\n\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getNiewolnikNaPLanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getNiewolnikNaPLanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\t//Szansa Niewolnika na zdobycie dwoch razy wiecej towarow\n\t\t\t\t\t\tif(GeneratorRandom.RandomOd0(101) <= ZapisOdczyt.getNiewolnicySzansa()) {\n\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setLicznikTowarow(Plansza.getNiewolnikNaPLanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getRzemieslnikNaPlanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getRzemieslnikNaPlanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setLicznikTowarow(Plansza.getRzemieslnikNaPlanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getArystokrataNaPlanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getArystokrataNaPlanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setLicznikTowarow(Plansza.getArystokrataNaPlanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void AwansSpoleczny() {\n\t\tSystem.out.println(\"AwansSpoleczny\");\n\t\tif(Plansza.getNiewolnikNaPLanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getNiewolnikNaPLanszy() instanceof Niewolnicy) {\n\t\t\tPlansza.setNiewolnikNaPlanszy(new Mieszczanie(Plansza.getNiewolnikNaPLanszy()));\n\t\t}\n\t\t\t\n\t\tif(Plansza.getRzemieslnikNaPlanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getRzemieslnikNaPlanszy() instanceof Rzemieslnicy) {\n\t\t\tPlansza.setRzemieslnikNaPlanszy(new Handlarze(Plansza.getRzemieslnikNaPlanszy()));\n\t\t}\n\t\t\t\n\t\tif(Plansza.getArystokrataNaPlanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getArystokrataNaPlanszy() instanceof Arystokracja) {\n\t\t\tPlansza.setArystokrataNaPlanszy(new Szlachta(Plansza.getArystokrataNaPlanszy()));\n\t\t}\n\t}",
"public void ustawPojazdNaPoczatek()\n\t{\n\t\tSciezka pierwszaSc = droga.get(0);\n\t\tfinal double y = 10;\n\t\tpojazd.zmienPozycje(pierwszaSc.getCenterDownX(), y);\n\t}",
"public void obliczSzanseWykolejenia(Tramwaj tramwaj, Pogoda pogoda, Motorniczy motorniczy, Przystanek przystanek){\r\n RegulyWykolejen regulyWykolejen= new RegulyWykolejen();\r\n this.szansaWykolejenia = pogoda.getRyzyko() + przystanek.getStanTechnicznyPrzystanku() + tramwaj.getStanTechTramwaju() + regulyWykolejen.regulaWiek(motorniczy.getWiek()) + regulyWykolejen.regulaDoswiadczenie(motorniczy.getDoswiadczenie());\r\n }",
"public void rozseparujDokladnie() {\r\n\t\tboolean wSpacjach, wWyrazie;\r\n\t\tString[] liniaRozseparowana = null;\r\n\t\tArrayList<Integer> lista = null;\r\n\t\tArrayList<String> lista2 = null;\r\n\r\n\t\tfor (String linia : calaZawartosc) {\r\n\t\t\twSpacjach = false;\r\n\t\t\twWyrazie = false;\r\n\r\n\t\t\tlista = new ArrayList<Integer>();\r\n\r\n\t\t\tfor (int i = 0; i < linia.length(); ++i) {\r\n\t\t\t\tif (Character.isWhitespace(linia.charAt(i))) {\r\n\t\t\t\t\tif (!wSpacjach) {\r\n\t\t\t\t\t\twSpacjach = true;\r\n\t\t\t\t\t\twWyrazie = false;\r\n\t\t\t\t\t\tlista.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!wWyrazie) {\r\n\t\t\t\t\t\twSpacjach = false;\r\n\t\t\t\t\t\twWyrazie = true;\r\n\t\t\t\t\t\tlista.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlista.add(linia.length());\r\n\r\n\t\t\tlista2 = new ArrayList<String>();\r\n\r\n\t\t\tfor (int i = 0; i < lista.size() - 1; ++i)\r\n\t\t\t\tlista2.add(linia.substring(lista.get(i), lista.get(i + 1)));\r\n\r\n\t\t\tliniaRozseparowana = new String[lista2.size()];\r\n\t\t\tfor (int i = 0; i < liniaRozseparowana.length; ++i) {\r\n\t\t\t\tliniaRozseparowana[i] = lista2.get(i);\r\n\t\t\t}\r\n\r\n\t\t\tcalaZawartoscRozsep.add(liniaRozseparowana);\r\n\t\t}\r\n\t}",
"public void naplnVrcholy() {\r\n System.out.println(\"Zadajte pocet vrcholov: \");\r\n pocetVrcholov = skener.nextInt();\r\n for (int i=0; i < pocetVrcholov; i++) {\r\n nekonecno = (int)(Double.POSITIVE_INFINITY);\r\n if(i==0) { //pre prvy vrchol potrebujeme nastavit vzdialenost 0 \r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu, 0, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n } else { //ostatne budu mat nekonecno alebo v tomto pripade 9999 (lebo tuto hodnotu v mensich grafoch nepresiahnem)\r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu,nekonecno, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n }\r\n }\r\n }",
"private String sprawdzRozszerzenie(String adresPliku) {\r\n\t\tString[] tablica = adresPliku.split(\"\\\\.\");\r\n\r\n\t\treturn tablica[tablica.length - 1];\r\n\t}",
"public void RuchyKlas() {\n\t\tSystem.out.println(\"RuchyKlas\");\n\t\tPlansza.getNiewolnikNaPLanszy().Ruch();\n\t\tPlansza.getRzemieslnikNaPlanszy().Ruch();\n\t\tPlansza.getArystokrataNaPlanszy().Ruch();\n\t}",
"ArrayList<Float> pierwszaPredykcja()\n\t{\n\t\tif (Stale.scenariusz<100)\n\t\t{\n\t\t\treturn pierwszaPredykcjaNormal();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//dla scenariusza testowego cnea predykcji jest ustawiana na 0.30\n\t\t\tArrayList<Float> L1 = new ArrayList<>();\n\t\t\tL1.add(0.30f);\n\t\t\treturn L1;\n\t\t}\n\t}",
"ArrayList<Float> pierwszaPredykcjaNormal()\n\t{\n\t\tif (Stale.cenyZGeneratora)\n\t\t{\n\t\t\tArrayList<Float> listaSumarycznejGeneracji = listaProsumentowWrap.getListaSumarycznejGeneracji(LokalneCentrum.getTimeIndex());\n\t\t\tArrayList<Float> listaSumarycznejKonsumpcji = listaProsumentowWrap.getListaSumarycznejKonsumpcji(LokalneCentrum.getTimeIndex());\n\n\t\t\treturn predictPrice(listaSumarycznejGeneracji,listaSumarycznejKonsumpcji);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tArrayList<Float> proposedPriceVector = pierwszaPredykcjaWezPredykcjeZListy();\n\t\t\t\n\t\t\t//jezeli brakuje elementow w plikyu do pelnej predykcji an horyzont czasowy to uuzplenij dnaymi z modelu\n\t\t\tif (proposedPriceVector.size()<Stale.horyzontCzasowy)\n\t\t\t{\n\t\t\t\tArrayList<Float> listaSumarycznejGeneracji = listaProsumentowWrap.getListaSumarycznejGeneracji(LokalneCentrum.getTimeIndex());\n\t\t\t\tArrayList<Float> listaSumarycznejKonsumpcji = listaProsumentowWrap.getListaSumarycznejKonsumpcji(LokalneCentrum.getTimeIndex());\n\t\t\t\tArrayList<Float> cenyZmodelu =predictPrice(listaSumarycznejGeneracji,listaSumarycznejKonsumpcji);\n\t\t\t\t\n\t\t\t\tproposedPriceVector = polaczListy(proposedPriceVector, cenyZmodelu);\n\t\t\t\t\n\t\t\t\tif (proposedPriceVector.size()!=Stale.horyzontCzasowy)\n\t\t\t\t{\n\t\t\t\t\tgetInput(\"ERROR in pierwszaPredykcjaNormal\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn proposedPriceVector;\n\t\t\t//podaj predykcje taka jak wynika z podanego pliku\n\t\t\t//getInput(\"Fill this part out - wczytaj rpedykcje z pliku!\");\n\t\t\t//return new ArrayList<Float>();\n\t\t}\n\t}",
"public void pobierzukladprzegladRZiSBO() {\r\n if (uklad.getUklad() == null) {\r\n uklad = ukladBRDAO.findukladBRPodatnikRokPodstawowy(wpisView.getPodatnikObiekt(), wpisView.getRokWpisuSt());\r\n }\r\n List<PozycjaRZiSBilans> pozycje = UkladBRBean.pobierzpozycje(pozycjaRZiSDAO, pozycjaBilansDAO, uklad, \"\", \"r\");\r\n UkladBRBean.czyscPozycje(pozycje);\r\n rootProjektRZiS.getChildren().clear();\r\n List<StronaWiersza> zapisy = StronaWierszaBean.pobraniezapisowwynikoweBO(stronaWierszaDAO, wpisView);\r\n try {\r\n PozycjaRZiSFKBean.ustawRoota(rootProjektRZiS, pozycje, zapisy);\r\n level = PozycjaRZiSFKBean.ustawLevel(rootProjektRZiS, pozycje);\r\n Msg.msg(\"i\", \"Pobrano układ \");\r\n } catch (Exception e) {\r\n E.e(e);\r\n rootProjektRZiS.getChildren().clear();\r\n Msg.msg(\"e\", e.getLocalizedMessage());\r\n }\r\n }",
"public void podstawZapiszDaneWielePlikow() throws IOException {\r\n\t\tBufferedWriter bw = null; // tutaj zaSztywno\r\n\t\tString[] wektorDanych;\r\n\t\tString nazwaPlikuWynikowego = null;\r\n\t\tint licznik = 0;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\t++licznik;\r\n\t\t\tnazwaPlikuWynikowego = \"./wynik/wynik\" + Integer.toString(licznik)\r\n\t\t\t\t\t+ \".\" + rozszerzenieSzablonu;\r\n\t\t\tbw = new BufferedWriter(new FileWriter(nazwaPlikuWynikowego));\r\n\t\t\tfor (String[] s : calaZawartoscRozsep) {\r\n\t\t\t\tfor (String wyraz : s) {\r\n\t\t\t\t\tif (wyraz.equals(interpretujWyraz(wyraz)))\r\n\t\t\t\t\t\tfor (int i = 0; i < zmienne.length; ++i) {\r\n\t\t\t\t\t\t\tif (wyraz.equals(zmienne[i])) {\r\n\t\t\t\t\t\t\t\twyraz = wektorDanych[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twyraz = interpretujWyraz(wyraz);\r\n\r\n\t\t\t\t\tbw.write(wyraz);\r\n\t\t\t\t}\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.close();\r\n\t\t}\r\n\t}",
"public void stworzWrogow() {\n\t\tfor(; aktualnaLiczbaWrogow < MAX_LICZBA_WROGOW; aktualnaLiczbaWrogow++) {\n\t\t\tdouble x = (generatorWspolrzednych.nextInt(550)) + 20 ;\n\t\t\tdouble y = ((generatorWspolrzednych.nextInt(750)) + 20);\n\t\t\tx = x < 0 ? -x : x; \n\t\t\ty = y < 0 ? y : -y;\n\t\t\tStatekWroga statekWroga = new StatekWroga(new Wspolrzedne(x, y));\n\t\t\t\n\t\t\tstatekWroga.setDol(DLUGOSC_RUCHU);\n\t\t\t\n\t\t\tstatkiWroga.add(statekWroga);\n\t\t}\n\t}",
"public boolean Wygrana() {\n\t\tSystem.out.println(\"Wygrana\");\n\t\tif(SprawdzanieWygranej.WygranaNiewolnikow()) {\n\t\t\tZapisOdczyt.setWygranaKlasa(Plansza.getNiewolnikNaPLanszy());\n\t\t\tZapisOdczyt.setWygranaKlasaPopulacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t\n\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getPopulacja() >= Plansza.getArystokrataNaPlanszy().getPopulacja()) {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getRzemieslnikNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getArystokrataNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getArystokrataNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getRzemieslnikNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\tif(SprawdzanieWygranej.WygranaRzemieslnikow()) {\n\t\t\tZapisOdczyt.setWygranaKlasa(Plansza.getRzemieslnikNaPlanszy());\n\t\t\tZapisOdczyt.setWygranaKlasaPopulacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t\n\t\t\tif(Plansza.getNiewolnikNaPLanszy().getPopulacja() >= Plansza.getArystokrataNaPlanszy().getPopulacja()) {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getNiewolnikNaPLanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getArystokrataNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getArystokrataNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getNiewolnikNaPLanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\tif(SprawdzanieWygranej.WygranaArystokracji()) {\n\t\t\tZapisOdczyt.setWygranaKlasa(Plansza.getArystokrataNaPlanszy());\n\t\t\tZapisOdczyt.setWygranaKlasaPopulacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t\n\t\t\tif(Plansza.getNiewolnikNaPLanszy().getPopulacja() >= Plansza.getRzemieslnikNaPlanszy().getPopulacja()) {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getNiewolnikNaPLanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getRzemieslnikNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getRzemieslnikNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getNiewolnikNaPLanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public void rozseparujWytnijBialeZnaki() {\r\n\t\tString[] bufor;\r\n\t\tString[] tablicaWynik;\r\n\t\tint licznik;\r\n\t\tint m;\r\n\t\tfor (String s : calaZawartosc) {\r\n\t\t\tbufor = s.split(\"[\\\\s]+\");\r\n\t\t\tlicznik = 0;\r\n\r\n\t\t\tfor (int i = 0; i < bufor.length; ++i)\r\n\t\t\t\tif (!bufor[i].equals(\"\")) {\r\n\t\t\t\t\t++licznik;\r\n\t\t\t\t}\r\n\r\n\t\t\ttablicaWynik = new String[2 * licznik];\r\n\r\n\t\t\tm = 0;\r\n\r\n\t\t\tfor (String str : bufor)\r\n\t\t\t\tif (!str.equals(\"\")) {\r\n\t\t\t\t\ttablicaWynik[m] = str;\r\n\t\t\t\t\ttablicaWynik[m + 1] = \" \";\r\n\t\t\t\t\t++m;\r\n\t\t\t\t\t++m;\r\n\t\t\t\t}\r\n\r\n\t\t\tcalaZawartoscRozsep.add(tablicaWynik);\r\n\t\t}\r\n\t}",
"public ArrayList<ArrayList<Float>> predykcjaCenNaRynkuLokalnym()\n\t{\n\t\tfloat cenaMinimalnaNaRynkuLokalnym= Stale.cenaMinimalnaNaRynkuLokalnym;\n\t\tfloat cenaMaksymalnaNaRynkuLokalnym = Stale.cenaDystrybutoraZewnetrznego;\n\t\t\n\t\t//tu siedzi to rozroznienie czy z generatora czy predykcja z poprzendiej symualcji\n\t\tArrayList<Float> normalnaPredykcja = pierwszaPredykcja();\n\t\tpriceVectorsList.add(normalnaPredykcja);\n\t\t\n\t\tArrayList<ArrayList<Float>> listaPredykcjiCen= new ArrayList<ArrayList<Float>>();\n\t\t\n\t\t\n\t\t//nizsza \n\t\tArrayList<Float> predykcjaZNizszaCena=new ArrayList<Float>(normalnaPredykcja);\t\t\n\t\tArrayList<Float> predykcjaZWyzszaCena=new ArrayList<Float>(normalnaPredykcja);\n\t\t\n\t\tfloat nizszaCena =(normalnaPredykcja.get(0)+cenaMinimalnaNaRynkuLokalnym)/2 ;\n\t\tfloat wyzszaCena=(normalnaPredykcja.get(0)+cenaMaksymalnaNaRynkuLokalnym)/2;\n\t\t\n\t\tpredykcjaZNizszaCena.set(0, nizszaCena);\n\t\tpredykcjaZWyzszaCena.set(0, wyzszaCena);\n\t\t\n\t\tlistaPredykcjiCen.add(predykcjaZNizszaCena);\n\t\tlistaPredykcjiCen.add(normalnaPredykcja);\n\t\tlistaPredykcjiCen.add(predykcjaZWyzszaCena);\n\t\t\n\t\t//reporting - zapisz zadeklarowan cene\n\t\trynekHistory.dodajZadeklarowanaCene(normalnaPredykcja.get(0));\n\t\t\n\t\t\n\t\treturn listaPredykcjiCen;\t\n\t}",
"public static List<Transakcja> pobierzbiezaceTransakcjeDlaNowejTransakcji(StronaWiersza stronawiersza, String wnma) {\r\n List<Transakcja> pobrana = Collections.synchronizedList(new ArrayList<>());\r\n try {\r\n pobrana.addAll((stronawiersza).getPlatnosci());\r\n return pobrana;\r\n } catch (Exception e) {\r\n return pobrana;\r\n }\r\n }",
"public void Zabojstwa() {\n\t\tSystem.out.println(\"Zabojstwa\");\n\t\tfor(int i=0;i<Plansza.getNiebezpieczenstwoNaPlanszy().size();i++) {\n\t\t\tfor(GenerujNiebezpieczenstwo niebez : Plansza.getNiebezpieczenstwoNaPlanszy()) {\n\n\t\t\t\tif(niebez.getZabojca() instanceof DzikieZwierzeta) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getUbrania() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getNiewolnikNaPLanszy().getJedzenie() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setUbrania(Plansza.getNiewolnikNaPLanszy().getUbrania() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setJedzenie(Plansza.getNiewolnikNaPLanszy().getJedzenie() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setLicznikNiebezpieczenstw(Plansza.getNiewolnikNaPLanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Bandyci) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getMaterialy() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getRzemieslnikNaPlanszy().getNarzedzia() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tif(GeneratorRandom.RandomOd0(101) <= ZapisOdczyt.getRzemieslnicySzansa()) {\n\t\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setMaterialy(Plansza.getRzemieslnikNaPlanszy().getMaterialy() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setNarzedzia(Plansza.getRzemieslnikNaPlanszy().getNarzedzia() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getRzemieslnikNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Zlodzieje) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getTowary() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getArystokrataNaPlanszy().getZloto() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setTowary(Plansza.getArystokrataNaPlanszy().getTowary() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setZloto(Plansza.getArystokrataNaPlanszy().getZloto() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getArystokrataNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"public ControllerUtilizadorGeraLinhaEncomenda(TrazAqui s, String u, String l){\n this.trazAqui = s;\n this.codLoja = l;\n this.codUtilizador = u;\n this.linhaCriada = new ArrayList<>();\n this.peso = 0.0;\n }",
"public static void trazenjeVozila(Iznajmljivac o) {\n\t\tLocalDate pocetniDatum = UtillMethod.unosDatum(\"pocetni\");\n\t\tLocalDate krajnjiDatum = UtillMethod.unosDatum(\"krajnji\");\n\t\tSystem.out.println(\"------------------------------------\");\n\t\tSystem.out.println(\"Provera dostupnosti vozila u toku...\\n\");\n\t\tArrayList<Vozilo> dostupnaVoz = new ArrayList<Vozilo>();\n\t\tint i = 0;\n\t\tfor (Vozilo v : Main.getVozilaAll()) {\n\t\t\tif (!postojiLiRezervacija(v, pocetniDatum, krajnjiDatum) && !v.isVozObrisano()) {\n\t\t\t\tSystem.out.println(i + \"-\" + v.getVrstaVozila() + \"-\" + \"Registarski broj\" + \"-\" + v.getRegBR()\n\t\t\t\t\t\t+ \"-Potrosnja na 100km-\" + v.getPotrosnja100() + \"litara\");\n\t\t\t\ti++;\n\t\t\t\tdostupnaVoz.add(v);\n\t\t\t}\n\t\t}\n\t\tif (i > 0) {\n\t\t\tSystem.out.println(\"------------------------------------------------\");\n\t\t\tSystem.out.println(\"Ukucajte kilometrazu koju planirate da predjete:\");\n\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\tint km1 = (int) km;\n\t\t\tporedjenjeVozila d1 = new poredjenjeVozila(km1);\n\t\t\tCollections.sort(dostupnaVoz,d1);\n\t\t\tint e = 0;\n\t\t\tfor(Vozilo v : dostupnaVoz) {\n\t\t\t\tdouble temp = cenaTroskaVoz(v, km, v.getGorivaVozila().get(0));\n\t\t\t\tSystem.out.println(e + \" - \" + v.getVrstaVozila()+ \"-Registarski broj: \"+ v.getRegBR()+\" | \"+ \"Cena na dan:\"+v.getCenaDan() +\" | Broj sedista:\"+ v.getBrSedist()+ \" | Broj vrata:\"+ v.getBrVrata() + \"| Cena troskova puta:\" + temp + \" Dinara\");\n\t\t\t\te++;\n\t\t\t}\n\t\t\tSystem.out.println(\"---------------------------------------\");\n\t\t\tSystem.out.println(\"Unesite redni broj vozila kojeg zelite:\");\n\t\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\t\tif (redniBroj < dostupnaVoz.size()) {\n\t\t\t\tDateTimeFormatter formatters = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\t\t\t\tString pocetni = pocetniDatum.format(formatters);\n\t\t\t\tString krajnji = krajnjiDatum.format(formatters);\n\t\t\t\tdouble cena = UtillMethod.cenaIznaj(pocetniDatum, krajnjiDatum, dostupnaVoz.get(redniBroj));\n\t\t\t\tRezervacija novaRez = new Rezervacija(dostupnaVoz.get(redniBroj), o, cena, false, pocetni, krajnji);\n\t\t\t\tMain.getRezervacijeAll().add(novaRez);\n\t\t\t\tSystem.out.println(\"Uspesno ste napravili rezervaciju!\");\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t\tSystem.out.println(novaRez);\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Nema dostupnih vozila za rezervaaciju.\");\n\t\t}\n\t}",
"private String nalozZvieraNaVozidlo() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz cislo zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Prepravitelny z = (Prepravitelny) zoo.getZvierataZOO(pozicia - 1);\r\n zoo.nalozZivocicha(z);\r\n zoo.odstranZivocicha(pozicia - 1);\r\n return \"Zviera \" + z + \"\\n\\tbolo nalozene na prepravne vozidlo\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nemozno prepravit\\n\\t\";\r\n } catch (NullPointerException exNP) {\r\n return \"Zviera c. \" + pozicia + \" nie je v ZOO\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"public void sprawdzBonusy()\n\t{\n\t\tif(aktualnyNumerSciezki != -1)\n\t\t{\n\t\t\tpojazd.sprawdzBonus(droga.get(aktualnyNumerSciezki));\n\t\t\twyswietleniePunktow.setText(\"\" + pojazd.pobierzPunkty());\n\t\t}\n\t}",
"ArrayList<Float> pierwszaPredykcjaWezPredykcjeZListy()\n\t{\n\t\tArrayList<Float> L1 = new ArrayList<Float>();\n\t\t\n\t\tint i=0;\n\t\twhile (i<Stale.horyzontCzasowy && (LokalneCentrum.getTimeIndex()+i)<listaCenWczytanaZPliku.size())\n\t\t{\n\t\t\tL1.add(listaCenWczytanaZPliku.get(LokalneCentrum.getTimeIndex()+i));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\treturn L1;\n\t}",
"@AutoEscape\n\tpublic String getLydoTraVe();",
"public void urciStupneVrcholu(){\n\t\tfor(int i = 0;i < vrchP.length; i++){\n\t\t\tstupenVrcholu(vrchP[i].klic);\n\t\t}\n\t}",
"public void testtraduciraOSM()\n\t\t{\n\t\t\tTipoNodoLeisure tipo1 = new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.6\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo2= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.7\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo3= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.8\")); //$NON-NLS-1$\n\t\t\tif (tipo1.traduciraOSM(tipo1.getValorTipo())!=tipo1.traduciraOSM(tipo1.getValorTipo()))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.9\")); //$NON-NLS-1$\n\t\t\tif (tipo1.traduciraOSM(tipo1.getValorTipo())!=tipo2.traduciraOSM(tipo2.getValorTipo()))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.10\")); //$NON-NLS-1$\n\t\t\tif (tipo1.traduciraOSM(tipo1.getValorTipo())==tipo3.traduciraOSM(tipo3.getValorTipo()))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.11\")); //$NON-NLS-1$\n\t\t}",
"private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}",
"boolean sprawdz_przegrana(){\n for(int i=0;i<figura_jakas.getWspolzedne_figorki().size();i++)\n if(sprawdz_kolizje_z_innymi_klockami(0))\n return true;\n return false;\n }",
"private void zmienne_poziomu(int poziom)\n {\n liczba_zyc =Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc\"));\n liczba_naboi=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_naboi\"));\n liczba_zyc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc_wroga\"));\n liczba_pilek=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_pilek\"));\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_predkosc_wroga\"));\n bonusy_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_bonusy_poziomu\"));\n rozmiar_pilki=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_rozmiar_pilki\"));\n zmiana_ruchu_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_zmiana_ruchu_wroga\"));\n czas_gry=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_czas_gry\"));\n }",
"public void setPolaznik(Polaznik polaznik) {\n this.polaznik = polaznik;\n }",
"public static void TroskoviPredjenogPuta() {\n\t\tUtillMethod.izlistavanjeVozila();\n\t\tSystem.out.println(\"Unesite redni broj vozila za koje zelite da racunate predjeni put!\");\n\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\tif (redniBroj < Main.getVozilaAll().size()) {\n\t\t\tif (!Main.getVozilaAll().get(redniBroj).isVozObrisano()) {\n\t\t\t\tSystem.out.println(\"Unesite broj kilometara koje ste presli sa odgovarajucim vozilom\");\n\t\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\t\tVozilo v = Main.getVozilaAll().get(redniBroj);\n\t\t\t\tdouble rezultat;\n\t\t\t\tif(v.getGorivaVozila().size()>1) {\n\t\t\t\t\tGorivo g = UtillMethod.izabirGoriva();\n\t\t\t\t\trezultat = cenaTroskaVoz(v,km,g);\n\t\t\t\t}else {\n\t\t\t\t\t rezultat = cenaTroskaVoz(v,km,v.getGorivaVozila().get(0));\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Cena troskova za predjeni put je \" + rezultat + \"Dinara!\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Ovo vozilo je obrisano i ne moze da se koristi!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t}\n\t}",
"public static void llenarSoriana(){\r\n Producto naranja1 = new Producto (\"naranja\", \"el huertito\", 25, 0);\r\n Nodo<Producto> nTemp1 = new Nodo(naranja1);\r\n listaSoriana.agregarNodo(nTemp1);\r\n \r\n Producto naranja2 = new Producto (\"naranja\", \"el ranchito\", 34, 0);\r\n Nodo<Producto> nTemp2 = new Nodo (naranja2);\r\n listaSoriana.agregarNodo(nTemp2);\r\n \r\n Producto manzana3 = new Producto (\"manzana\", \"el rancho de don chuy\", 24, 0);\r\n Nodo<Producto> nTemp3 = new Nodo (manzana3);\r\n listaSoriana.agregarNodo(nTemp3);\r\n \r\n Producto manzana4 = new Producto (\"manzana\", \"la costeña\", 15, 0);\r\n Nodo<Producto> nTemp4 = new Nodo(manzana4);\r\n listaSoriana.agregarNodo(nTemp4);\r\n \r\n Producto platano5 = new Producto (\"platano\", \"el Huertito\", 26, 0);\r\n Nodo<Producto> nTemp5 = new Nodo (platano5);\r\n listaSoriana.agregarNodo(nTemp5);\r\n \r\n Producto platano6 = new Producto (\"platano\", \"granjita dorada\", 36, 0);\r\n Nodo<Producto> nTemp6 = new Nodo (platano6);\r\n listaSoriana.agregarNodo (nTemp6);\r\n \r\n Producto pera7 = new Producto (\"pera\", \"el rancho de don chuy\", 38, 0);\r\n Nodo<Producto> nTemp7 = new Nodo (pera7);\r\n listaSoriana.agregarNodo(nTemp7);\r\n \r\n Producto pera8 = new Producto (\"pera\", \"la costeña\", 8,0);\r\n Nodo<Producto> nTemp8 = new Nodo (pera8);\r\n listaSoriana.agregarNodo(nTemp8);\r\n \r\n Producto durazno9 = new Producto (\"durazno\", \"el huertito\", 12.50, 0);\r\n Nodo<Producto> nTemp9 = new Nodo (durazno9);\r\n listaSoriana.agregarNodo(nTemp9);\r\n \r\n Producto fresa10 = new Producto (\"fresa\", \"el rancho de don chuy\", 35.99,0);\r\n Nodo<Producto> nTemp10 = new Nodo (fresa10);\r\n listaSoriana.agregarNodo(nTemp10);\r\n \r\n Producto fresa11 = new Producto (\"fresa\", \"grajita dorada\", 29.99,0);\r\n Nodo<Producto> nTemp11 = new Nodo (fresa11);\r\n listaSoriana.agregarNodo(nTemp11);\r\n \r\n Producto melon12 = new Producto (\"melon\", \"la costeña\", 18.50, 0);\r\n Nodo<Producto> nTemp12 = new Nodo (melon12);\r\n listaSoriana.agregarNodo(nTemp12);\r\n \r\n Producto melon13 = new Producto (\"melon\", \"el huertito\", 8.50, 0);\r\n Nodo<Producto> nTemp13 = new Nodo (melon13);\r\n listaSoriana.agregarNodo(nTemp13);\r\n \r\n Producto elote14 = new Producto (\"elote\", \"el ranchito\", 6, 0);\r\n Nodo<Producto> nTemp14 = new Nodo (elote14);\r\n listaSoriana.agregarNodo(nTemp14);\r\n \r\n Producto elote15 = new Producto (\"elote\", \"moctezuma\", 12, 0);\r\n Nodo<Producto> nTemp15 = new Nodo (elote15);\r\n listaSoriana.agregarNodo(nTemp15);\r\n \r\n Producto aguacate16 = new Producto (\"aguacate\", \"la costeña\", 35, 0);\r\n Nodo<Producto> nTemp16 = new Nodo (aguacate16);\r\n listaSoriana.agregarNodo(nTemp16);\r\n \r\n Producto cebolla17 = new Producto (\"cebolla\", \"granjita dorada\", 8.99, 0);\r\n Nodo<Producto> nTemp17 = new Nodo (cebolla17);\r\n listaSoriana.agregarNodo(nTemp17);\r\n \r\n Producto tomate18 = new Producto (\"tomate\", \"el costeñito feliz\", 10.50, 0);\r\n Nodo<Producto> nTemp18 = new Nodo (tomate18);\r\n listaSoriana.agregarNodo(nTemp18);\r\n \r\n Producto tomate19 = new Producto (\"tomate\", \"el ranchito\", 8.99, 0);\r\n Nodo<Producto> nTemp19 = new Nodo (tomate19);\r\n listaSoriana.agregarNodo(nTemp19);\r\n \r\n Producto limon20 = new Producto (\"limon\", \"la costeña\", 3.50, 0);\r\n Nodo<Producto> nTemp20 = new Nodo (limon20);\r\n listaSoriana.agregarNodo(nTemp20);\r\n \r\n Producto limon21 = new Producto (\"limon\", \"el ranchito\", 10.99, 0);\r\n Nodo<Producto> nTemp21 = new Nodo (limon21);\r\n listaSoriana.agregarNodo(nTemp21);\r\n \r\n Producto papas22 = new Producto (\"papas\", \"la costeña\", 11, 0);\r\n Nodo<Producto> nTemp22 = new Nodo(papas22);\r\n listaSoriana.agregarNodo(nTemp22);\r\n \r\n Producto papas23 = new Producto (\"papas\", \"granjita dorada\", 4.99, 0);\r\n Nodo<Producto> nTemp23 = new Nodo(papas23);\r\n listaSoriana.agregarNodo(nTemp23);\r\n \r\n Producto chile24 = new Producto (\"chile\", \"el rancho de don chuy\", 2.99, 0);\r\n Nodo<Producto> nTemp24 = new Nodo (chile24);\r\n listaSoriana.agregarNodo(nTemp24);\r\n \r\n Producto chile25 = new Producto (\"chile\",\"la costeña\", 12, 0);\r\n Nodo<Producto> nTemp25 = new Nodo (chile25);\r\n listaSoriana.agregarNodo(nTemp25);\r\n \r\n Producto jamon26 = new Producto (\"jamon\",\"fud\", 25, 1);\r\n Nodo<Producto> nTemp26 = new Nodo(jamon26);\r\n listaSoriana.agregarNodo(nTemp26);\r\n \r\n Producto jamon27 = new Producto(\"jamon\", \"kir\", 13.99, 1);\r\n Nodo<Producto> nTemp27 = new Nodo(jamon27);\r\n listaSoriana.agregarNodo(nTemp27);\r\n \r\n Producto peperoni28 = new Producto (\"peperoni28\", \"fud\", 32, 1);\r\n Nodo<Producto> nTemp28 = new Nodo (peperoni28);\r\n listaSoriana.agregarNodo(nTemp28);\r\n \r\n Producto salchicha29 = new Producto (\"salchicha\", \" san rafael\", 23.99, 1);\r\n Nodo<Producto> nTemp29 = new Nodo (salchicha29);\r\n listaSoriana.agregarNodo(nTemp29); \r\n \r\n Producto huevos30 = new Producto (\"huevos\", \"san rafael\", 30.99, 1);\r\n Nodo<Producto> nTemp30 = new Nodo (huevos30);\r\n listaSoriana.agregarNodo(nTemp30);\r\n \r\n Producto chuletas31 = new Producto (\"chuletas\", \"la res dorada\", 55, 1);\r\n Nodo<Producto> nTemp31 = new Nodo (chuletas31);\r\n listaSoriana.agregarNodo(nTemp31);\r\n \r\n Producto carnemolida32 = new Producto (\"carne molida\", \"san rafael\", 34, 1);\r\n Nodo<Producto> nTemp32 = new Nodo (carnemolida32);\r\n listaSoriana.agregarNodo(nTemp32);\r\n \r\n Producto carnemolida33 = new Producto (\"carne molida\", \"la res dorada\", 32.99, 1);\r\n Nodo<Producto> nTemp33 = new Nodo (carnemolida33);\r\n listaSoriana.agregarNodo(nTemp33);\r\n \r\n Producto pollo34 = new Producto (\"pollo\", \"pollito feliz\", 38, 1);\r\n Nodo<Producto> nTemp34 = new Nodo (pollo34);\r\n listaSoriana.agregarNodo(nTemp34);\r\n \r\n Producto pescado35 = new Producto (\"pescado\", \"pescadito\", 32.99, 1);\r\n Nodo<Producto> nTemp35 = new Nodo (pescado35);\r\n listaSoriana.agregarNodo(nTemp35);\r\n \r\n Producto quesolaurel36 = new Producto (\"queso\", \"laurel\", 23.50, 1);\r\n Nodo<Producto> nTemp36 = new Nodo (quesolaurel36);\r\n listaSoriana.agregarNodo(nTemp36);\r\n \r\n Producto leche37 = new Producto (\"leche\", \"nutrileche\", 12.99, 1);\r\n Nodo<Producto> nTemp37 = new Nodo (leche37);\r\n listaSoriana.agregarNodo(nTemp37);\r\n \r\n Producto lechedeslactosada38 = new Producto (\"leche deslactosada\", \"lala\", 17.50, 1);\r\n Nodo<Producto> nTemp38 = new Nodo (lechedeslactosada38);\r\n listaSoriana.agregarNodo(nTemp38);\r\n \r\n Producto panblanco39 = new Producto (\"pan blanco\", \"bombo\", 23.99, 2);\r\n Nodo<Producto> nTemp39 = new Nodo (panblanco39);\r\n listaSoriana.agregarNodo(nTemp39);\r\n \r\n Producto atun40 = new Producto (\"atun\", \"la aleta feliz\", 12, 2);\r\n Nodo<Producto> nTemp40 = new Nodo (atun40);\r\n listaSoriana.agregarNodo(nTemp40);\r\n \r\n Producto atun41 = new Producto (\"atun\", \"el barco\", 10.99, 2);\r\n Nodo<Producto> nTemp41 = new Nodo (atun41);\r\n listaSoriana.agregarNodo(nTemp41);\r\n \r\n Producto arroz42 = new Producto (\"arroz\", \"mi marca\", 12.50, 2);\r\n Nodo<Producto> nTemp42 = new Nodo (arroz42);\r\n listaSoriana.agregarNodo(nTemp42);\r\n \r\n Producto arroz43 = new Producto (\"arroz\", \"soriana\", 9.99, 2);\r\n Nodo<Producto> nTemp43 = new Nodo (arroz43);\r\n listaSoriana.agregarNodo(nTemp43);\r\n \r\n Producto frijol44 = new Producto (\"frijol\", \"mi marca\", 10.99, 2);\r\n Nodo<Producto> nTemp44 = new Nodo (frijol44);\r\n listaSoriana.agregarNodo(nTemp44);\r\n \r\n Producto frijol45 = new Producto (\"frijol\", \"soriana\", 15.99, 2);\r\n Nodo<Producto> nTemp45 = new Nodo (frijol45);\r\n listaSoriana.agregarNodo(nTemp45);\r\n \r\n Producto azucar46 = new Producto (\"azucar\", \"mi marca\", 12.50, 2);\r\n Nodo<Producto> nTemp46 = new Nodo (azucar46);\r\n listaSoriana.agregarNodo(nTemp46);\r\n \r\n Producto azucar47 = new Producto (\"azucar\", \"zulka\", 15.99, 2);\r\n Nodo<Producto> nTemp47 = new Nodo (azucar47);\r\n listaSoriana.agregarNodo(nTemp47);\r\n \r\n Producto servilletas48 = new Producto (\"servilletas\", \"esponjosas\",10.50, 2);\r\n Nodo<Producto> nTemp48 = new Nodo (servilletas48);\r\n listaSoriana.agregarNodo(nTemp48);\r\n \r\n Producto sal49 = new Producto (\"sal\", \"mar azul\", 3.99, 2);\r\n Nodo<Producto> nTemp49 = new Nodo (sal49);\r\n listaSoriana.agregarNodo(nTemp49);\r\n \r\n Producto aceitedecocina50 = new Producto (\"aceite de cocina\", \"123\", 15.99, 2);\r\n Nodo<Producto> nTemp50 = new Nodo (aceitedecocina50);\r\n listaSoriana.agregarNodo(nTemp50);\r\n \r\n Producto caffe51 = new Producto (\"caffe\", \"nescafe\", 23, 2);\r\n Nodo<Producto> nTemp51 = new Nodo (caffe51);\r\n listaSoriana.agregarNodo(nTemp51);\r\n \r\n Producto puredetomate52 = new Producto (\"pure de tomate\", \" la costeña\", 12.99, 2);\r\n Nodo<Producto> nTemp52 = new Nodo (puredetomate52);\r\n listaSoriana.agregarNodo(nTemp52);\r\n \r\n Producto lentejas53 = new Producto (\"lentejas\", \"la granjita\", 8.99, 2);\r\n Nodo<Producto> nTemp53 = new Nodo (lentejas53);\r\n listaSoriana.agregarNodo(nTemp53);\r\n \r\n Producto zuko54 = new Producto (\"zuko\", \"zuko\", 2.99, 2);\r\n Nodo<Producto> nTemp54 = new Nodo (zuko54);\r\n listaSoriana.agregarNodo(nTemp54);\r\n \r\n Producto champu55 = new Producto (\"champu\", \"loreal\", 32, 3);\r\n Nodo<Producto> nTemp55 = new Nodo (champu55);\r\n listaSoriana.agregarNodo(nTemp55);\r\n \r\n Producto champu56 = new Producto (\"champu\", \"el risueño\", 29.99, 3);\r\n Nodo<Producto> nTemp56 = new Nodo (champu56);\r\n listaSoriana.agregarNodo(nTemp56);\r\n \r\n Producto desodorante57 = new Producto (\"desodorante\", \"nivea\", 23.50, 3);\r\n Nodo<Producto> nTemp57 = new Nodo (desodorante57);\r\n listaSoriana.agregarNodo(nTemp57);\r\n \r\n Producto pastadedientes58 = new Producto(\"pasta de dientes\", \"colgate\", 17.50, 3);\r\n Nodo<Producto> nTemp58 = new Nodo (pastadedientes58);\r\n listaSoriana.agregarNodo(nTemp58);\r\n \r\n Producto pastadedientes59 = new Producto (\"pasta de dientes\", \"el diente blanco\", 29, 3);\r\n Nodo<Producto> nTemp59 = new Nodo (pastadedientes59);\r\n listaSoriana.agregarNodo(nTemp59);\r\n \r\n Producto rastrillos60 = new Producto (\"rastrillos\", \"el filosito\", 33.99, 3);\r\n Nodo<Producto> nTemp60 = new Nodo (rastrillos60);\r\n listaSoriana.agregarNodo(nTemp60);\r\n \r\n Producto rastrillos61 = new Producto (\"rastrillos\", \"barba de oro\", 23.99, 3);\r\n Nodo<Producto> nTemp61 = new Nodo (rastrillos61);\r\n listaSoriana.agregarNodo(nTemp61);\r\n \r\n Producto hilodental62 = new Producto (\"hilo dental\", \"el diente blanco\", 32.99, 3);\r\n Nodo<Producto> nTemp62 = new Nodo (hilodental62);\r\n listaSoriana.agregarNodo(nTemp62);\r\n \r\n Producto cepillodedientes63 = new Producto (\"cepillo de dientes\", \"OBBM\", 17.99, 3);\r\n Nodo<Producto> nTemp63 = new Nodo (cepillodedientes63);\r\n listaSoriana.agregarNodo(nTemp63);\r\n \r\n Producto cloro64 = new Producto (\"cloro\", \"cloralex\", 23.50, 3);\r\n Nodo<Producto> nTemp64 = new Nodo (cloro64);\r\n listaSoriana.agregarNodo(nTemp64);\r\n \r\n Producto acondicionador65 = new Producto (\"acondicionador\", \"sedal\", 28.99, 3);\r\n Nodo<Producto> nTemp65 = new Nodo (acondicionador65);\r\n listaSoriana.agregarNodo(nTemp65);\r\n \r\n Producto acondicionador66 = new Producto (\"acondicionador\", \"pantene\", 23.99, 3);\r\n Nodo<Producto> nTemp66 = new Nodo (acondicionador66);\r\n listaSoriana.agregarNodo(nTemp66);\r\n \r\n Producto pinol67 = new Producto(\"pinol\", \"mi piso limpio\", 15, 3);\r\n Nodo<Producto> nTemp67 = new Nodo (pinol67);\r\n listaSoriana.agregarNodo(nTemp67);\r\n \r\n Producto pinol68 = new Producto (\"pinol\", \"eficaz\", 18.99, 3);\r\n Nodo<Producto> nTemp68 = new Nodo (pinol68);\r\n listaSoriana.agregarNodo(nTemp68);\r\n \r\n Producto tortillas69 = new Producto (\"tortillas\", \"maizena\", 8.99, 2);\r\n Nodo<Producto> nTemp69 = new Nodo (tortillas69);\r\n listaSoriana.agregarNodo(nTemp69);\r\n \r\n Producto cremaparacuerpo70 = new Producto (\"crema para cuerpo\", \"dove\", 13.50, 3);\r\n Nodo<Producto> nTemp70 = new Nodo (cremaparacuerpo70);\r\n listaSoriana.agregarNodo(nTemp70);\r\n \r\n Producto maizoro71 = new Producto (\"maizoro\", \"special k\", 35.99, 2);\r\n Nodo<Producto> nTemp71 = new Nodo (maizoro71);\r\n listaSoriana.agregarNodo(nTemp71);\r\n \r\n Producto maizoro72 = new Producto (\"maizoro\",\"azucaradas\", 43, 2);\r\n Nodo<Producto> nTemp72 = new Nodo (maizoro72);\r\n listaSoriana.agregarNodo(nTemp72);\r\n \r\n Producto zanahoria73 = new Producto (\"zanahoria\", \"el huertito\", 12.99, 0);\r\n Nodo<Producto> nTemp73 = new Nodo (zanahoria73);\r\n listaSoriana.agregarNodo(nTemp73);\r\n \r\n Producto maizoro74 = new Producto (\"maizoro\", \"cherrios\", 45, 2);\r\n Nodo<Producto> nTemp74 = new Nodo (maizoro74);\r\n listaSoriana.agregarNodo(nTemp74);\r\n \r\n Producto mayonesa75 = new Producto (\"mayonesa\", \"helmans\", 23, 2);\r\n Nodo<Producto> nTemp75 = new Nodo (mayonesa75);\r\n listaSoriana.agregarNodo(nTemp75);\r\n }",
"public void skratiListu() {\n if (!jePrazna()) {\n int n = Svetovid.in.readInt(\"Unesite broj elemenata za skracivanje: \");\n obrniListu(); //Zato sto se trazi odsecanje poslednjih n elemenata\n while (prvi != null && n > 0) {\n prvi = prvi.veza;\n n--;\n }\n obrniListu(); //Vraca listu u prvobitni redosled\n }\n }",
"private String vylozZvieraZVozidla() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz index zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Zivocich ziv = zoo.vylozZivocicha(pozicia-1);\r\n if (ziv == null) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n }\r\n zoo.pridajZivocicha(ziv);\r\n return \"Zviera \" + ziv\r\n + \"\\n\\tbolo vylozene z prepravneho vozidla\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"public void uradiPotez(int direkcija) {\r\n\t\tboolean promjena1 = pomjeri(direkcija);\r\n\t\tboolean promjena2 = spoji(direkcija);\r\n\t\tif(promjena1 || promjena2) { //ukoliko nije bilo promjene ni u pomjeranju ni spajanju, ne generise novo polje\r\n\t\t\tpomjeri(direkcija);\r\n\t\t\tgenerisiPolje();\r\n\t\t}\r\n\t}",
"public void obrniListu() {\n if (prvi != null && prvi.veza != null) {\n Element preth = null;\n Element tek = prvi;\n \n while (tek != null) {\n Element sled = tek.veza;\n \n tek.veza = preth;\n preth = tek;\n tek = sled;\n }\n prvi = preth;\n }\n }",
"public void tradOra(){\r\n leerOracion();\r\n String res=\"\";\r\n for(int i=0; i<orac.size(); i++){\r\n res+=tradPal(rz, orac.get(i).trim())+\" \";\r\n }\r\n System.out.println(res);\r\n }",
"public void w_plik (BufferedWriter wpl)\n\t{\n\ttry{\t\n\t\twpl.write(imienaz+\"\\n\");\n\t\twpl.write(rodzaj+\"\\n\");\n\t\twpl.write(Integer.toString(numer)+\"\\n\");\n\t\twpl.write(Integer.toString(powierzchnia)+\"\\n\");\n\t\twpl.write(Integer.toString(wartosc)+\"\\n\");\n\t\tif (altanka == true ) wpl.write(\"1\"+\"\\n\"); else wpl.write(\"0\"+\"\\n\");\n\t\tif (studnia == true ) wpl.write(\"1\"+\"\\n\"); else wpl.write(\"0\"+\"\\n\");\n\t\t}\n\tcatch (IOException e){System.out.println(\"Blad we/wy\");};\n\t}",
"public boolean czyKolizja()\n\t{\n\t\tif(aktualnyNumerSciezki == -1)\n\t\t\treturn false;\n\t\tSciezka s = droga.get(aktualnyNumerSciezki);\n\t\treturn s.czyKolizja(pojazd);\t\n\t}",
"public void zmiana_rozmiaru_okna()\n {\n b.dostosowanie_rozmiaru(getWidth(),getHeight());\n w.dostosowanie_rozmiaru(getWidth(),getHeight());\n\n for (Pilka np : p) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Naboj np : n) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Bonus np : bon) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n\n }",
"public Polinomio(String cadenaPolinomio) {\n patron = Pattern.compile(PATRON_POLINOMIO);//se carga el patron polinomio\n polinomio = ConvertirPolinomio(cadenaPolinomio);\n }",
"public static void llenarWalmart(){\r\n \r\n \r\n Producto café = new Producto(\"cafe\", \"nescafe\", 77, 2);\r\n Nodo<Producto> nTemp = new Nodo(café);\r\n listaWalmart.agregarNodo(nTemp);\r\n \r\n Producto panblancobimbo = new Producto(\"pan blanco bimbo\", \"bimbo\", 30, 2);\r\n Nodo<Producto> nTemp2 = new Nodo(panblancobimbo);\r\n listaWalmart.agregarNodo(nTemp2);\r\n \r\n Producto lecheentera = new Producto(\"leche\", \"Lala\", 17, 2);\r\n Nodo<Producto> nTemp3 = new Nodo(lecheentera);\r\n listaWalmart.agregarNodo(nTemp3);\r\n \r\n Producto mantequilla = new Producto(\"mantequilla\", \"sin sal lala\", 11.50, 2);\r\n Nodo<Producto> nTemp4 = new Nodo(mantequilla);\r\n listaWalmart.agregarNodo(nTemp4);\r\n \r\n Producto huevoblanco= new Producto(\"huevo\", \"san juan\",50.50, 2);\r\n Nodo<Producto> nTemp5 = new Nodo(huevoblanco);\r\n listaWalmart.agregarNodo(nTemp5);\r\n \r\n Producto crema= new Producto(\"crema\", \"lala\", 46, 2);\r\n Nodo<Producto> nTemp6 = new Nodo(crema);\r\n listaWalmart.agregarNodo(nTemp6);\r\n \r\n Producto naranja= new Producto(\"naranja\", \"valencia\", 15.90, 0);\r\n Nodo<Producto> nTemp7 = new Nodo(naranja);\r\n listaWalmart.agregarNodo(nTemp7);\r\n \r\n Producto limon= new Producto(\"limon\", \"limon agrio\", 25.90, 0);\r\n Nodo<Producto> nTemp8 = new Nodo(limon);\r\n listaWalmart.agregarNodo(nTemp8);\r\n \r\n Producto manzana= new Producto(\"manzana\", \"red delicious\", 39.90, 0);\r\n Nodo<Producto> nTemp9 = new Nodo(manzana);\r\n listaWalmart.agregarNodo(nTemp9);\r\n \r\n Producto plátano = new Producto(\"platano\", \"chiapas\", 13.90, 0);\r\n Nodo<Producto> nTemp10 = new Nodo(plátano);\r\n listaWalmart.agregarNodo(nTemp10);\r\n \r\n Producto papaya= new Producto(\"papaya\", \"maradol\",27.90, 0);\r\n Nodo<Producto> nTemp11 = new Nodo(papaya);\r\n listaWalmart.agregarNodo(nTemp11);\r\n \r\n Producto uva= new Producto(\"uva\", \"roja sin semilla\", 59, 0);\r\n Nodo<Producto> nTemp12 = new Nodo(uva);\r\n listaWalmart.agregarNodo(nTemp12);\r\n \r\n Producto chiledelarbol= new Producto(\"chile del arbol\", \"verde valle\", 20, 2);\r\n Nodo<Producto> nTemp13 = new Nodo(chiledelarbol);\r\n listaWalmart.agregarNodo(nTemp13);\r\n \r\n Producto piernaymuslodepollo = new Producto(\"pierna y muslo de pollo\", \"bachoco\", 34, 1);\r\n Nodo<Producto> nTemp14 = new Nodo(piernaymuslodepollo);\r\n listaWalmart.agregarNodo(nTemp14);\r\n \r\n Producto pechugadepollo= new Producto(\"pechuga de pollo\", \"bachoco\", 114, 1);\r\n Nodo<Producto> nTemp15 = new Nodo(pechugadepollo);\r\n listaWalmart.agregarNodo(nTemp15);\r\n \r\n Producto costilladecerdo= new Producto(\"costilla de cerdo\", \"pork loin\", 114, 1);\r\n Nodo<Producto> nTemp16 = new Nodo(costilladecerdo);\r\n listaWalmart.agregarNodo(nTemp16);\r\n \r\n Producto carnemolida= new Producto(\"carne molida\", \"premium\", 152, 1);\r\n Nodo<Producto> nTemp17 = new Nodo(carnemolida);\r\n listaWalmart.agregarNodo(nTemp17);\r\n \r\n Producto chuletadecostilla= new Producto(\"chuleta de costilla\", \"premium\", 219, 1);\r\n Nodo<Producto> nTemp18 = new Nodo(chuletadecostilla);\r\n listaWalmart.agregarNodo(nTemp18);\r\n \r\n Producto pescado= new Producto(\"pescado\", \"sierra del golfo\", 89, 1);\r\n Nodo<Producto> nTemp19 = new Nodo(pescado);\r\n listaWalmart.agregarNodo(nTemp19);\r\n \r\n Producto atun= new Producto(\"atun\", \"herdez\", 18.50, 2);\r\n Nodo<Producto> nTemp20 = new Nodo(atun);\r\n listaWalmart.agregarNodo(nTemp20);\r\n \r\n Producto arroz = new Producto(\"arroz\", \"verde valle super extra\", 22.50, 2);\r\n Nodo<Producto> nTemp21 = new Nodo(arroz);\r\n listaWalmart.agregarNodo(nTemp21);\r\n \r\n Producto frijol= new Producto(\"frijol\", \"verde valle\", 30, 2);\r\n Nodo<Producto> nTemp22 = new Nodo(frijol);\r\n listaWalmart.agregarNodo(nTemp22);\r\n \r\n \r\n Producto azucar= new Producto(\"azucar\", \"zulka\", 54, 2);\r\n Nodo<Producto> nTemp23 = new Nodo(azucar);\r\n listaWalmart.agregarNodo(nTemp23);\r\n \r\n Producto consome= new Producto(\"consome\", \"knorr\", 7, 2);\r\n Nodo<Producto> nTemp24 = new Nodo(consome);\r\n listaWalmart.agregarNodo(nTemp24);\r\n \r\n Producto galletassaladas= new Producto(\"galletas saladas\", \"saladitas\", 40, 2);\r\n Nodo<Producto> nTemp25 = new Nodo(galletassaladas);\r\n listaWalmart.agregarNodo(nTemp25);\r\n \r\n Producto sal= new Producto(\"sal\", \"la fina\", 8.90, 2);\r\n Nodo<Producto> nTemp26 = new Nodo(sal);\r\n listaWalmart.agregarNodo(nTemp26);\r\n \r\n Producto pimienta= new Producto(\"pimienta\", \"mccormick\", 47.50, 2);\r\n Nodo<Producto> nTemp27= new Nodo(pimienta);\r\n listaWalmart.agregarNodo(nTemp27);\r\n \r\n Producto comino= new Producto(\"comino\", \"mccormick\", 30, 2);\r\n Nodo<Producto> nTemp28 = new Nodo(comino);\r\n listaWalmart.agregarNodo(nTemp28);\r\n \r\n Producto canela= new Producto(\"canela\", \"el cuernito\", 4.50, 2);\r\n Nodo<Producto> nTemp29 = new Nodo(canela);\r\n listaWalmart.agregarNodo(nTemp29);\r\n \r\n Producto cebolla= new Producto(\"cebolla\", \"blanca\", 31.90, 2);\r\n Nodo<Producto> nTemp30 = new Nodo(cebolla);\r\n listaWalmart.agregarNodo(nTemp30);\r\n \r\n Producto zanahoria= new Producto(\"zanahoria\", \"simple\", 19.50, 2);\r\n Nodo<Producto> nTemp31 = new Nodo(zanahoria);\r\n listaWalmart.agregarNodo(nTemp31);\r\n \r\n Producto polvoparaprepararbebida= new Producto(\"polvo para preparar bebida\", \"zuko\", 3.80, 2);\r\n Nodo<Producto> nTemp32 = new Nodo(polvoparaprepararbebida);\r\n listaWalmart.agregarNodo(nTemp32);\r\n \r\n Producto cereal= new Producto(\"cereal\", \"nestle\", 39.90, 2);\r\n Nodo<Producto> nTemp33 = new Nodo(cereal);\r\n listaWalmart.agregarNodo(nTemp33);\r\n \r\n Producto sopa= new Producto(\"sopa\", \"aurrera \", 3.10, 2);\r\n Nodo<Producto> nTemp34 = new Nodo(sopa);\r\n listaWalmart.agregarNodo(nTemp34);\r\n \r\n \r\n Producto espagueti= new Producto(\"espagueti\", \"moderna\", 5.20, 2);\r\n Nodo<Producto> nTem35 = new Nodo(espagueti);\r\n listaWalmart.agregarNodo(nTem35);\r\n \r\n Producto maquinaparaafeitar= new Producto(\"maquina para afeitar\", \"gillette prestobarba\", 20, 3);\r\n Nodo<Producto> nTemp35 = new Nodo(maquinaparaafeitar);\r\n listaWalmart.agregarNodo(nTemp35);\r\n \r\n Producto shampoo= new Producto(\"shampoo\", \"ego black\", 63.50, 3);\r\n Nodo<Producto> nTemp36 = new Nodo(shampoo);\r\n listaWalmart.agregarNodo(nTemp36);\r\n \r\n \r\n Producto pastadental= new Producto(\"pasta dental\", \"colgate\", 43.50, 3);\r\n Nodo<Producto> nTemp37 = new Nodo(pastadental);\r\n listaWalmart.agregarNodo(nTemp37);\r\n \r\n Producto papelhigienico= new Producto(\"papel higienico\", \"elite\", 17.50, 3);\r\n Nodo<Producto> nTemp38 = new Nodo(papelhigienico);\r\n listaWalmart.agregarNodo(nTemp38);\r\n \r\n Producto pañuelos = new Producto(\"pañuelos\", \"kleenex\", 14.50, 3);\r\n Nodo<Producto> nTemp39 = new Nodo(pañuelos);\r\n listaWalmart.agregarNodo(nTemp39);\r\n \r\n Producto cremad = new Producto(\"crema\", \"pond´s\", 56, 2);\r\n Nodo<Producto> nTemp40 = new Nodo(cremad);\r\n listaWalmart.agregarNodo(nTemp40);\r\n \r\n Producto desodorantemasculino= new Producto(\"desodorante masculino\", \"stefano\", 41.50, 3);\r\n Nodo<Producto> nTemp41 = new Nodo(desodorantemasculino);\r\n listaWalmart.agregarNodo(nTemp41);\r\n \r\n Producto desodorantefemenino= new Producto(\"desodorante femenino\", \"lady speed stick\", 23, 3);\r\n Nodo<Producto> nTemp42 = new Nodo(desodorantefemenino);\r\n listaWalmart.agregarNodo(nTemp42);\r\n \r\n Producto cloro= new Producto(\"cloro\", \"cloralex\", 21, 3);\r\n Nodo<Producto> nTemp43 = new Nodo(cloro);\r\n listaWalmart.agregarNodo(nTemp43);\r\n \r\n Producto pinol= new Producto(\"pinol\", \"pinol\", 29.90, 3);\r\n Nodo<Producto> nTemp44 = new Nodo(pinol);\r\n listaWalmart.agregarNodo(nTemp44);\r\n \r\n Producto lavatrastes= new Producto(\"lavatrastes\", \"axion\", 36.90, 3);\r\n Nodo<Producto> nTemp45 = new Nodo(lavatrastes);\r\n listaWalmart.agregarNodo(nTemp45);\r\n \r\n Producto deterjente= new Producto(\"deterjente\", \"finish\", 99, 3);\r\n Nodo<Producto> nTemp46 = new Nodo(deterjente);\r\n listaWalmart.agregarNodo(nTemp46);\r\n \r\n Producto queso= new Producto(\"queso\", \"chichuahua\", 125, 1);\r\n Nodo<Producto> nTemp47 = new Nodo(queso);\r\n listaWalmart.agregarNodo(nTemp47);\r\n \r\n Producto lentejas= new Producto(\"lentejas\", \"verde valle\", 25.50, 2);\r\n Nodo<Producto> nTemp48 = new Nodo(lentejas);\r\n listaWalmart.agregarNodo(nTemp48);\r\n \r\n Producto papitas= new Producto(\"papitas\", \"sabritas\", 36, 2);\r\n Nodo<Producto> nTemp49 = new Nodo(papitas);\r\n listaWalmart.agregarNodo(nTemp49);\r\n \r\n Producto mole= new Producto(\"mole\", \"doña maria \", 33, 2);\r\n Nodo<Producto> nTemp50 = new Nodo(mole);\r\n listaWalmart.agregarNodo(nTemp50);\r\n }",
"Object obtenerPolizasPorFolioSolicitudNoCancelada(int folioSolicitud,String formatoSolicitud);",
"private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}",
"public void wczytaj() {\n\t\tTowar t=new Towar();\n\t\tString nazwa;\n\t\tDouble ilosc;\n\t\tDouble cena;\n\t\tDouble wartosc;\n\t\tScanner odczyt=new Scanner(System.in);\n\t\tSystem.out.println(\"Ile towarow chcesz dodac\");\n\t\tint n=odczyt.nextInt();\n\t\tlista=new ArrayList<Towar>(n);\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tSystem.out.println(\"Podaj nazwe\");\n\t\t\tnazwa=odczyt.next();\t\t\t \n\t\t\tSystem.out.println(\"Podaj ilosc\");\n\t\t\tilosc=odczyt.nextDouble();\t\t\t \n\t\t\tSystem.out.println(\"Podaj cene\");\n\t\t\tcena=odczyt.nextDouble();\t\t\t \n\t\t\tSystem.out.println(\"Podaj wartosc\");\n\t\t\twartosc=odczyt.nextDouble();\n\t\t\tt=new Towar(nazwa,ilosc,cena,wartosc);\n\t\t\tlista.add(t);\n\t}\n\t\t\n\t\t\n\t}",
"public boolean souvislost(){\n\t\t\n\t\tif(pole.size() != pocetVrcholu){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t\t\n\t}",
"private int obliczDowoz() {\n int x=this.klient.getX();\n int y=this.klient.getY();\n double odl=Math.sqrt((Math.pow((x-189),2))+(Math.pow((y-189),2)));\n int kilometry=(int)(odl*0.5); //50 gr za kilometr\n return kilometry;\n }",
"public void DaneStartowe() {\n\t\tSystem.out.println(\"DaneStartowe\");\n\t\tPlansza.getNiewolnikNaPLanszy().setJedzenie(ZapisOdczyt.getPopulacjaStartowaNiewolnicy());\n\t\tPlansza.getNiewolnikNaPLanszy().setUbrania(ZapisOdczyt.getPopulacjaStartowaNiewolnicy());\n\t\tPlansza.getRzemieslnikNaPlanszy().setMaterialy(ZapisOdczyt.getPopulacjaStartowaRzemieslnicy());\n\t\tPlansza.getRzemieslnikNaPlanszy().setNarzedzia(ZapisOdczyt.getPopulacjaStartowaRzemieslnicy());\n\t\tPlansza.getArystokrataNaPlanszy().setZloto((int) (ZapisOdczyt.getPopulacjaStartowaArystokracja() + ZapisOdczyt.getArystokracjaWiekszaPopulacja()*ZapisOdczyt.getPopulacjaStartowaArystokracja()*0.01));\n\t\tPlansza.getArystokrataNaPlanszy().setTowary((int) (ZapisOdczyt.getPopulacjaStartowaArystokracja() + ZapisOdczyt.getArystokracjaWiekszaPopulacja()*ZapisOdczyt.getPopulacjaStartowaArystokracja()*0.01));\n\t}",
"public void zpracujObjednavky()\n\t{\n\t\tint idtmp = 0;\n\t\tfloat delkaCesty = 0;\n\t\t\n\t\tif (this.objednavky.isEmpty())\n\t\t{\n\t\t\treturn ;\n\t\t}\n\t\t\n\t\tNakladak nakl = (Nakladak) getVolneAuto();\n\t\t\n\t\tnakl.poloha[0] = this.poloha[0];\n\t\tnakl.poloha[1] = this.poloha[1];\n\t\tObjednavka ob = this.objednavky.remove();\n\n\t\t/*System.out.println();\n\t\tSystem.out.println(\"Objednavka hospody:\" + ob.id + \" se zpracuje pres trasu: \");\n\t\t */\n\t\tdelkaCesty += vyberCestu(this.id, ob.id, nakl);\n\t\t\n\t\twhile(nakl.pridejObjednavku(ob))\n\t\t{\n\t\t\tidtmp = ob.id;\n\t\t\t\n\t\t\tob = vyberObjednavku(ob.id);\n\t\t\tif (ob == null)\n\t\t\t{\n\t\t\t\tob=nakl.objednavky.getLast();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tobjednavky.remove(ob);\n\t\t\t\n\t\t\tdelkaCesty += vyberCestu(idtmp, ob.id, nakl);\n\t\t\t\n\t\t\tif((nakl.objem > 24)||(13-Simulator.getCas().hodina)*(nakl.RYCHLOST) + 100 < delkaCesty){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t/*\n\t\t\tif((Simulator.getCas().hodina > 12) && (delkaCesty > 80) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif((Simulator.getCas().hodina > 9) && (delkaCesty > 130) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}*/\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//cesta zpatky\n\t\tvyberCestu(ob.id, this.id, nakl);\n\t\tif (nakl.objem >= 1)\n\t\t{\n\t\t\tnakl.kDispozici = false;\n\t\t\tnakl.jede = true;\n\t\t\t//vytvoreni nove polozky seznamu pro statistiku\n\t\t\tnakl.novaStatCesta();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnakl.resetCesta();\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tint x = 3;\n\t\tint potega = 2;\n\t\t\n\t\t\n\t\t//wiekszosc metod bazuje na wewnetrznych polach klasy.\n\t\t//np klasa liczba ma wartosc (podawana w konstruktorze)\n\t\t//metoda PodniesDoPotegi operuje na polu 'wartosc' i podnosi ja do potegi, a nastepnie zwraca wynik\n\t\t//(mozna wyobrazic sobie tez taka metode ktora nie zwraca wyniku tylko zmianie pole 'wartosc' podnoszac je do potegi\n\t\tLiczba liczba = new Liczba(x);\n\t\tint liczbaPodniesionaDoPotegi = liczba.PodniesDoPotegi(potega);\n\t\t\n\t\t//niektore metody dzialaja niezależnie od klas.\n\t\t//np metoda statyczna PodniesDoPotegi pobiera liczbe ktora ma być podniesiona oraz potege.\n\t\t//nie używa ona w swoim ciele żadnych nie statycznych metod ani pol\n\t\t liczbaPodniesionaDoPotegi = Liczba.PodniesDoPotegi(x, potega);\n\t\t\n\t\t //taka metode można przenieść do dowolnej klasy i tez bedzie dzialać, dlatego ze nie jest ona zależna od obiektow klasy.\n\t\t//np:\n\t\t liczbaPodniesionaDoPotegi = ABC.PodniesDoPotegi(x, potega);\n\t\t\n\t\t //funkcje statyczne moga uzywac pol i metod STATYCZNYCH\n\t\t // NP:\n\t\t\n\t\tint maxValue = Liczba.MaxValue();\n\t\t\n\t\t//przykład uzycia wzorca projektowego singleton\n\t\tMySingleton mysingleton = MySingleton.GetInstance();\n\t\tmysingleton.doSemethink();\n\t\t\n\t\tMySingleton mysingleton2 = MySingleton.GetInstance();\n\t\t\n\t\t//mysingleton i mysingleton2 pokazuje na ten sam obiekt;\n\t\t\n\t}",
"private Zivocich vytvorZivocicha() {\r\n final String[] zFarba = {\"cervena\", \"zelena\", \"modra\", \"zlta\", \"zlto-zelena\"};\r\n Zivocich zviera = null;\r\n double kolkoVazi = 0.0;\r\n\r\n //-- Vygenerujeme zviera\r\n int vygenerovane = 1 + generator.nextInt(4); //cislo <1,4>\r\n\r\n switch (vygenerovane) {\r\n case 1: //blcha \r\n double kolkoDoskoci=3 * generator.nextDouble() ; //cislo <0;2.99>\r\n double kolkoVyskoci=3 * generator.nextDouble() ; //cislo <0;2.99>\r\n zviera=new Blcha(6,kolkoDoskoci,kolkoVyskoci);\r\n break;\r\n case 2: //simpanz\r\n kolkoVazi=3 + (97 * generator.nextDouble()); //cislo <3;99.9>\r\n boolean cviceny;\r\n cviceny=generator.nextBoolean(); \r\n zviera=new Simpanz(kolkoVazi,cviceny);\r\n break;\r\n case 3: //papagaj\r\n kolkoVazi = 0.1 + (5*generator.nextDouble()); // cislo <0.1; 6>\r\n String farba = zFarba[generator.nextInt(5)]; // farba zo zoznamu\r\n zviera = new Papagaj(\"Ara\", 2, kolkoVazi, farba); \r\n break;\r\n case 4: //slon\r\n kolkoVazi=20 + (480*generator.nextDouble()); //cislo <20;500> \r\n int pocet=generator.nextInt(50); //pocet zubov bude <0,49>\r\n zviera=new Slon(kolkoVazi,pocet);\r\n break;\r\n } //------------------------------------------------------------- switch --\r\n return zviera;\r\n }",
"public static List<Object> czytaniePogody(){\r\n Object[] elementyPogody = new Object[3];\r\n elementyPogody[0]=0;\r\n elementyPogody[1]=0;\r\n elementyPogody[2]=null;\r\n String line;\r\n OdczytZPliku plik = new OdczytZPliku();\r\n InputStream zawartosc = plik.pobierzZPliku(\"bazapogod.txt\");\r\n try (InputStreamReader odczyt = new InputStreamReader(zawartosc, StandardCharsets.UTF_8);\r\n BufferedReader czytaj = new BufferedReader(odczyt)) {\r\n String numerWStringu = String.valueOf(elementyPogody[0] = (int) (Math.random() * 4));\r\n while ((line = czytaj.readLine()) != null){\r\n if (line.equals(numerWStringu)){\r\n elementyPogody[1] = Integer.parseInt(czytaj.readLine());\r\n elementyPogody[2] = czytaj.readLine();\r\n System.out.println(\"\\nPogoda na dzis: \" + elementyPogody[2]);\r\n break;\r\n }\r\n else {\r\n for (int i = 0; i < 2; i++) {\r\n line = czytaj.readLine();\r\n }\r\n }\r\n }\r\n } catch (Exception ignored) {\r\n }\r\n return List.of(elementyPogody);\r\n }",
"private boolean pomjeri(int direkcija) {\t\r\n\t\t/**\r\n\t\t * Atribut predstavlja zadnje polje u smjeru direkcije u redu ili koloni (zavisno od toga da li je\r\n\t\t * pomjeranje horizontalno ili vertikalno).\r\n\t\t */\r\n\t\tint pocetna;\r\n\t\t/**\r\n\t\t * Atribut govori u kojem smjeru se pomjera trenutnaPozicija (smjer je suprotan direkciji poteza).\r\n\t\t */\r\n\t\tint pomak;\r\n\t\t/**\r\n\t\t * Atribut predstavlja prvo prazno polje na koje se moze pomjeriti iduce neprazno polje.\r\n\t\t */\r\n\t\tint trenutnaPozicija;\r\n\t\t/**\r\n\t\t * Atribut se postavlja na true ukoliko dodje do nekog pomjeranja (promjene u odnosu na prijasnje stanje tabele).\r\n\t\t */\r\n\t\tboolean bilo_promjene = false;\r\n\t\t\r\n\t\t// pomjeranje desno i lijevo\r\n\t\tif(direkcija == 1 || direkcija == 2) {\r\n\t\t\tpocetna = 6 - 3*direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 2*direkcija - 3; // pomak je ili -1 ili 1\r\n\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo pomjeranje polja\r\n\t\t\tfor(int i = 0 ; i < 4 ; i++) {\r\n\t\t\t\tfor(int j = pocetna ; j != pocetna + 4 * pomak ; j += pomak) {\r\n\t\t\t\t\tif(tabela[i][trenutnaPozicija] != 0) // ukoliko se na pocetku desi da to polje nije slobodno\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\telse if (tabela[i][j] != 0) { // pomjeri to polje u smjeru direkcija\r\n\t\t\t\t\t\ttabela[i][trenutnaPozicija] = tabela[i][j];\r\n\t\t\t\t\t\ttabela[i][j] = 0;\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// pomjeranje gore i dole\r\n\t\telse {\r\n\t\t\tpocetna = direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 1 - (2*direkcija)/3; // pomak je ili -1 ili 1\r\n\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo pomjeranje polja\r\n\t\t\tfor(int j = 0 ; j < 4 ; j++) {\r\n\t\t\t\tfor(int i = pocetna ; i != pocetna + 4 * pomak ; i += pomak) {\r\n\t\t\t\t\tif(tabela[trenutnaPozicija][j] != 0) // ukoliko se na pocetku desi da to polje nije slobodno\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\telse if (tabela[i][j] != 0) { // pomjeri to polje u smjeru direkcija\r\n\t\t\t\t\t\ttabela[trenutnaPozicija][j] = tabela[i][j];\r\n\t\t\t\t\t\ttabela[i][j] = 0;\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn bilo_promjene;\r\n\t}",
"public ListaPracownikow() {\n generujPracownikow();\n //dodajPracownika();\n }",
"public static void odczytLiniaPoLinii(String nazwaPlikuOdczyt) throws IOException {\n BufferedReader plikLiniowy = null;\n try {\n plikLiniowy = new BufferedReader(new FileReader(nazwaPlikuOdczyt));\n System.out.println(\"\\n\\nOdczyt linia po linii:\\n\");\n String linia = plikLiniowy.readLine();\n while (linia != null) {\n System.out.println(linia);\n linia = plikLiniowy.readLine();\n }\n } finally {\n if (plikLiniowy != null) {\n plikLiniowy.close();//zamknięcie pliku\n }\n }\n }",
"ArrayList<Float> znajdzOstatecznaCeneCenaNaNajblizszeSloty()\n\t{\n\t\t//getInput(\"znajdzOstatecznaCeneCenaNaNajblizszeSloty -start\");\n\t\t\n\t\t\n\t\t//wez wszystkie ceny \n\t\t//moze byc brane od dowolnego prosumenta wiec 0 tez jest ok\n\t\tArrayList<Point> L1 = listaFunkcjiUzytecznosci.get(0);\n\t\t\n\t\tArrayList<Float> L2 = new ArrayList<Float>();\n\t\t\n\t\tint i=0;\n\t\twhile (i<L1.size())\n\t\t{\n\t\t\tfloat cena = L1.get(i).getPrice();\n\t\t\tL2.add(cena);\n\t\t\t//print(cena);\n\t\t\ti++;\n\t\t}\n\t\t\n\t\t//print (Arrays.toString(L2.toArray()));\n\t\t\n\t\t//getInput(\"znajdzOstatecznaCeneCenaNaNajblizszeSloty -end\");\n\t\t\n\t\treturn L2;\n\t}",
"public void podstawZapiszDaneJedenPlik() throws IOException {\r\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(\"./wynik/wynik.\"\r\n\t\t\t\t+ rozszerzenieSzablonu));\r\n\t\tString[] wektorDanych;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\tfor (String[] s : calaZawartoscRozsep) {\r\n\t\t\t\tfor (String wyraz : s) {\r\n\t\t\t\t\tif (wyraz.equals(interpretujWyraz(wyraz)))\r\n\t\t\t\t\t\tfor (int i = 0; i < zmienne.length; ++i) {\r\n\t\t\t\t\t\t\tif (wyraz.equals(zmienne[i])) {\r\n\t\t\t\t\t\t\t\twyraz = wektorDanych[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twyraz = interpretujWyraz(wyraz);\r\n\r\n\t\t\t\t\tbw.write(wyraz);\r\n\t\t\t\t}\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.write(\"---------------------------------------------------\");\r\n\t\t\tbw.newLine();\r\n\t\t}\r\n\t\tbw.close();\r\n\t}",
"public String [] losuj(){\n int licznik = 0;\n String [] wybrane = new String[5];\n while(licznik<5){ // Dla jednego gracza\n int kolor = (int) (Math.random()*4);\n int wartosc = (int) (Math.random()*13);\n if(czyWybrana[kolor][wartosc]==false){\n czyWybrana[kolor][wartosc]=true;\n wybrane[licznik]=karty[kolor][wartosc]+\".jpg\";\n licznik++;\n }\n }\n return wybrane;// tablica z 5 wylosowanymi kartami\n }",
"public void zeichnen_kavalier() {\n /**\n * Abrufen der Koordinaten aus den einzelnen\n * Point Objekten des Objekts Tetraeder.\n */\n double[] A = t1.getTetraeder()[0].getPoint();\n double[] B = t1.getTetraeder()[1].getPoint();\n double[] C = t1.getTetraeder()[2].getPoint();\n double[] D = t1.getTetraeder()[3].getPoint();\n\n /**\n * Aufrufen der Methode sortieren\n */\n double[][] sP = cls_berechnen.sortieren(A, B, C, D);\n\n A = sP[0];\n B = sP[1];\n C = sP[2];\n D = sP[3];\n\n /**Wenn alle z Koordinaten gleich sind, ist es kein Tetraeder. */\n if (A[2] == D[2] || (A[2]==B[2] && C[2]==D[2])) {\n System.out.println(\"kein Tetraeder\");\n return;\n }\n\n /** Transformiert x,y,z Koordinaten zu x,y Koordinaten */\n double ax, ay, bx, by, cx, cy, dx, dy;\n ax = (A[0] + (A[2] / 2));\n ay = (A[1] + (A[2] / 2));\n bx = (B[0] + (B[2] / 2));\n by = (B[1] + (B[2] / 2));\n cx = (C[0] + (C[2] / 2));\n cy = (C[1] + (C[2] / 2));\n dx = (D[0] + (D[2] / 2));\n dy = (D[1] + (D[2] / 2));\n\n tetraederzeichnen(ax, ay, bx, by, cx, cy, dx, dy);\n }",
"public static List<StronaWiersza> pobierzStronaWierszazBazy(StronaWiersza stronaWiersza, String wnma, StronaWierszaDAO stronaWierszaDAO, TransakcjaDAO transakcjaDAO) {\r\n List<StronaWiersza> listaStronaWierszazBazy =new ArrayList<>();\r\n// stare = pobiera tylko w walucie dokumentu rozliczeniowego \r\n// listaNowychRozrachunkow = stronaWierszaDAO.findStronaByKontoWnMaWaluta(stronaWiersza.getKonto(), stronaWiersza.getWiersz().getTabelanbp().getWaluta().getSymbolwaluty(), stronaWiersza.getWnma());\r\n// nowe pobiera wszystkie waluty \r\n listaStronaWierszazBazy = stronaWierszaDAO.findStronaByKontoWnMa(stronaWiersza.getKonto(), wnma);\r\n //stronaWierszaDAO.refresh(listaStronaWierszazBazy);\r\n if (listaStronaWierszazBazy != null && !listaStronaWierszazBazy.isEmpty()) {\r\n try {\r\n DateFormat formatter;\r\n formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n String datarozrachunku = null;\r\n if (stronaWiersza.getWiersz().getDataWalutyWiersza() != null) {\r\n datarozrachunku = stronaWiersza.getWiersz().getDokfk().getRok()+\"-\"+stronaWiersza.getWiersz().getDokfk().getMiesiac()+\"-\"+stronaWiersza.getWiersz().getDataWalutyWiersza();\r\n } else {\r\n datarozrachunku = stronaWiersza.getWiersz().getDokfk().getDatadokumentu();\r\n }\r\n Date dataR = formatter.parse(datarozrachunku);\r\n Iterator it = listaStronaWierszazBazy.iterator();\r\n while(it.hasNext()) {\r\n StronaWiersza stronaWierszaZbazy = (StronaWiersza) it.next();\r\n List<Transakcja> zachowaneTransakcje = transakcjaDAO.findByNowaTransakcja(stronaWierszaZbazy);\r\n for (Iterator<Transakcja> itx = stronaWierszaZbazy.getPlatnosci().iterator(); itx.hasNext();) {\r\n Transakcja transakcjazbazy = (Transakcja) itx.next();\r\n if (zachowaneTransakcje == null || zachowaneTransakcje.size() == 0) {\r\n itx.remove();\r\n } else if (!zachowaneTransakcje.contains(transakcjazbazy)) {\r\n itx.remove();\r\n }\r\n }\r\n for (Transakcja ta : zachowaneTransakcje) {\r\n if (!stronaWierszaZbazy.getPlatnosci().contains(ta)) {\r\n stronaWierszaZbazy.getPlatnosci().add(ta);\r\n }\r\n }\r\n if (Z.z(stronaWierszaZbazy.getPozostalo()) <= 0.0) {\r\n it.remove();\r\n } else {\r\n String dataplatnosci;\r\n if (stronaWierszaZbazy.getWiersz().getDataWalutyWiersza() != null) {\r\n dataplatnosci = stronaWierszaZbazy.getWiersz().getDokfk().getRok()+\"-\"+stronaWierszaZbazy.getWiersz().getDokfk().getMiesiac()+\"-\"+stronaWierszaZbazy.getWiersz().getDataWalutyWiersza();\r\n } else {\r\n dataplatnosci = stronaWierszaZbazy.getWiersz().getDokfk().getDatadokumentu();\r\n }\r\n Date dataP = formatter.parse(dataplatnosci);\r\n if (dataP.compareTo(dataR) > 0) {\r\n it.remove();\r\n }\r\n }\r\n }\r\n } catch (ParseException ex) {\r\n E.e(ex);\r\n }\r\n }\r\n List<StronaWiersza> stronywierszaBO = stronaWierszaDAO.findStronaByKontoWnMaBO(stronaWiersza.getKonto(), stronaWiersza.getWnma());\r\n if (stronywierszaBO != null && !stronywierszaBO.isEmpty()) {\r\n Iterator it = stronywierszaBO.iterator();\r\n while(it.hasNext()) {\r\n StronaWiersza p = (StronaWiersza) it.next();\r\n if (Z.z(p.getPozostalo()) <= 0.0) {\r\n it.remove();\r\n }\r\n }\r\n listaStronaWierszazBazy.addAll(stronywierszaBO);\r\n }\r\n if (listaStronaWierszazBazy == null) {\r\n return (new ArrayList<>());\r\n }\r\n return listaStronaWierszazBazy;\r\n //pobrano wiersze - a teraz z nich robie rozrachunki\r\n }",
"public void dodaj(String ime, int starost, int pol)\n {\n // pre svega nam je potrebno da pronadjemo odgovarajuce mesto\n // za naseg novog sticenika, zbog toga sto oni moraju biti sortirani\n //\n // pre toga, proveravamo da li on vec postoji\n if(postoji(ime))\n return;\n\n Sticenik s = new Sticenik(ime, starost, pol);\n\n // prvo resavamo trivijalan slucaj, kada je lista prazna\n if(this.head == null)\n {\n s.next = this.head;\n this.head = s;\n return; // izlazimo iz metode, jer nema potrebe da proveravamo dalje\n }\n\n // posebno treba proveriti, u slucaju kada je novi sticenik stariji od prvog (head)\n // u listi\n // ovo radimo iz razloga, sto moramo da pomeramo head tj uvek dodajemo na pocetak\n if(this.head.starost >= starost)\n {\n s.next = this.head;\n this.head = s;\n return;\n }\n\n // u slucaju da se nas sticenik nalazi negde u sredini liste,\n // moramo da znamo gde je tacno, pa stoga pamtimo prethodnika\n // da bi mogli da ga uvezemo na odgovarajuce mesto\n Sticenik t = this.head; // trenutni\n Sticenik p = null; // prethodni\n\n // sada prolazimo kroz listu while petljom, dok ne naidjemo na sticenika koji je stariji od naseg\n // kada ga pronadjemo, hocemo da dodamo novog sticenika izmedju njega i prethodnika\n while(t.next != null && t.starost <= starost)\n {\n p = t;\n t = t.next;\n }\n\n // sada treba da proverimo da li je t == null\n // ako nije uvezujemo sticenika izmedju dva, a ako jeste\n // onda samo dodajemo sticenika na kraj\n if(t.next != null)\n {\n System.out.println(\"t: \" + t.next);\n p.next = s;\n s.next = t;\n }\n else\n {\n s.next = t.next;\n t.next = s;\n }\n }",
"public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}",
"public void setLivello(String l){\n \n this.livello = l;\n \n }",
"public static void main(String[] args) {\n\t\tString pol1=\"1x^3+3x^2+7x^1+21x^0\";\r\n\t\tString pol2=\"1x^2+7x^0\";\r\n\t\tString adunare=\"+1x^3+4x^2+7x^1+28x^0\";\r\n\t\tString scadere=\"+1x^3+2x^2+7x^1+14x^0\";\r\n\t\tString inmultire=\"+1x^5+3x^4+14x^3+42x^2+49x^1+147x^0\";\r\n\t\tString restul=\"\";\r\n\t\tString catul=\"+1.0x^1+3.0x^0\";\r\n\t\tString derivare=\"+3x^2+6x^1+7x^0\";\r\n\t\tString integrare=\"+0.25x^4+1.0x^3+3.5x^2+21.0x^1\";\r\n\t\tPolinom p1=new Polinom();\r\n\t\tPolinom p2=new Polinom();\r\n\t\tPolinom p1copie=new Polinom();\r\n\t\ttry {\r\n\t\t\tp1=p1.crearePolinom(pol1, 3);\r\n\t\t\tp1copie=p1.crearePolinom(pol1, 3);\r\n\t\t\tp2=p2.crearePolinom(pol2, 2);\r\n\t\t} catch (IllegalInputException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\r\n\t\tPolinom p3=p1.adunarePolinom(p2, 4);\r\n\t\tString rezAdunare=p3.afisPolinomIntreg();\r\n\t\tPolinom p4=p1.scaderePolinom(p2, 4);\r\n\t\tString rezScadere=p4.afisPolinomIntreg();\r\n\t\tPolinom p5=p1.inmultirePolinom(p2, 6);\r\n\t\tString rezInmultire=p5.afisPolinomIntreg();\r\n\t\tString cat=p1.impartirePolinom(p2, 3, 2);\r\n\t\tString rest=p1copie.impartirePolinom(p2, 3, 2);\r\n\t\tPolinom p7=p1.derivarePolinom(3);\r\n\t\tString rezDerivare=p7.afisPolinomReal();\r\n\t\tPolinom p8=p1.integrarePolinom(4);\r\n\t\tString rezIntegrare=p8.afisPolinomReal();\r\n\t\t\r\n\t\tassert adunare!=rezAdunare : \"Nu se verifica adunarea!\";\r\n\t\tassert scadere!=rezScadere : \"Nu se verifica scaderea!\";\r\n\t\tassert inmultire!=rezInmultire : \"Nu se verifica inmultirea!\";\r\n\t\tassert derivare!=rezDerivare : \"Nu se verifica derivarea!\";\r\n\t\tassert integrare!=rezIntegrare : \"Nu se verifica integrarea!\";\r\n\t\tassert catul!=cat : \"Nu se verifica adunarea!\";\r\n\t\tassert restul!=rest : \"Nu se verifica adunarea!\";\r\n\t\t\r\n\t\t\r\n\t}",
"float znajdzOstatecznaCene2()\n\t{\n\t\tArrayList<Float> cenyNaNajblizszySlot =znajdzOstatecznaCeneCenaNaNajblizszeSloty();\n\t\t\n\t\tfloat minimuCena =-1;\n\t\t\n\t\t//Stworzenie cen w raportowaniu\n\t\tint i=0;\n\t\twhile (i<cenyNaNajblizszySlot.size())\n\t\t{\n\t\t\trynekHistory.kontraktDodajCene(cenyNaNajblizszySlot.get(i));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\t//wyznacz liste ktora ma najwieksza wartosc funkcji rynkowej\n\t\t\n\t\tArrayList<Float> cenyZNajwiekszaFunkcjaRynkowa = new ArrayList<>();\n\t\tfloat maximumFunkcjiRynkowej=-1;\n\t\t\n\t\ti=0;\n\t\twhile (i<cenyNaNajblizszySlot.size())\n\t\t{\n\t\t\tfloat cena =cenyNaNajblizszySlot.get(i);\n\t\t\tfloat value =funkcjaRynku2(cena, false,true);\t\t\t\n\n\t\t\trynekHistory.kontraktDodajWartoscFunkcjiRynku(value, cena);\n\n\t\t\t\n\t\t\tif (value>maximumFunkcjiRynkowej)\n\t\t\t{\n\t\t\t\tcenyZNajwiekszaFunkcjaRynkowa.clear();\n\t\t\t\tcenyZNajwiekszaFunkcjaRynkowa.add(cena);\n\t\t\t\tmaximumFunkcjiRynkowej = value;\n\t\t\t}\n\t\t\telse if (value==maximumFunkcjiRynkowej)\n\t\t\t{\n\t\t\t\tcenyZNajwiekszaFunkcjaRynkowa.add(cena);\n\t\t\t} \n\t\t\t\n\t\t\t\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tminimuCena = cenyZNajwiekszaFunkcjaRynkowa.get(cenyZNajwiekszaFunkcjaRynkowa.size()/2);\n\t\t\n\t\treturn minimuCena;\n\n\t}",
"public void testtraduciraCastellano()\n\t\t{\n\t\t\tTipoNodoLeisure tipo1 = new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.12\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo2= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.13\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo3= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.14\")); //$NON-NLS-1$\n\t\t\tif (tipo1.traduciraCastellano(tipo1.traduciraOSM(tipo1.getValorTipo()))!=tipo1.traduciraCastellano(tipo1.traduciraOSM(tipo1.getValorTipo())))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.15\")); //$NON-NLS-1$\n\t\t\tif (tipo1.traduciraCastellano(tipo1.traduciraOSM(tipo1.getValorTipo()))!=tipo2.traduciraCastellano(tipo2.traduciraOSM(tipo2.getValorTipo())))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.16\")); //$NON-NLS-1$\n\t\t\tif (tipo1.traduciraCastellano(tipo1.traduciraOSM(tipo1.getValorTipo()))==tipo3.traduciraCastellano(tipo3.traduciraOSM(tipo3.getValorTipo())))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.17\")); //$NON-NLS-1$\n\t\t}",
"private void caricaLivelloDiLegge() {\n\t\ttry {\n\t\t\t//TODO riutilizzo il piano dei conti caricato in precedenza ma associato al padre (per evitare un nuovo accesso a db)! verificare se va bene!\n\t\t\tlivelloDiLegge = conto.getContoPadre().getPianoDeiConti().getClassePiano().getLivelloDiLegge();\n\t\t} catch(NullPointerException npe) {\n\t\t\tthrow new BusinessException(\"Impossibile determinare il livello di legge associato al conto. Verificare sulla base dati il legame con il piano dei conti e la classe piano.\");\n\t\t}\n\t}",
"public static ArrayList<Point2D> przesunPunktyOtoczki(ArrayList<Point2D> wierzcholki, Canvas canvas) {\n ArrayList<Point2D> otoczka = new ArrayList();\n double w = canvas.getWidth();\n double h = canvas.getHeight();\n for (Point2D punkt : wierzcholki) {\n otoczka.add((new Point2D(punkt.getX() + w / 2, h - punkt.getY() - h / 2)));\n }\n\n return otoczka;\n }",
"private void poczatkowe_zmienne()\n {\n konfiguracja.loadProperties();\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(\"predkosc_wroga\"));\n czas_watku=Integer.parseInt(konfiguracja.properties.getProperty(\"czas_watku\"));\n punkty_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(\"punkty_poziomu\"));\n zmienne_poziomu(poziom);\n }",
"public TrasaPunktowana(String start, String koniec, GrupaGorska gr, PodgrupaGorska pd, StopienTrudnosci st, boolean niepelnosprawny, int pktwej, int pktzej){\n miejscePoczatkowe = start;\n miejsceKoncowe = koniec;\n grupaGorska = gr;\n podgrupaGorska = pd;\n stopienTrudnosci = st;\n czyDlaNiepelnosprawnych = niepelnosprawny;\n punktyZaWejscie = pktwej;\n punktyZaZejscie = pktzej;\n }",
"public String dajPopis() {\n return super.dajPopis() + \"KUZLO \\nJedna tebou vybrata jednotka ziska 3-nasobnu silu\";\n }",
"public QwirkleSpiel()\n {\n beutel=new Beutel(3); //erzeuge Beutel mit 3 Steinfamilien\n spielfeld=new List<Stein>();\n\n rote=new ArrayList<Stein>(); //Unterlisten, die zum leichteren Durchsuchen des Spielfelds angelegt werden\n blaue=new ArrayList<Stein>();\n gruene=new ArrayList<Stein>();\n gelbe=new ArrayList<Stein>();\n violette=new ArrayList<Stein>();\n orangene=new ArrayList<Stein>();\n kreise=new ArrayList<Stein>();\n kleeblaetter=new ArrayList<Stein>();\n quadrate=new ArrayList<Stein>();\n karos=new ArrayList<Stein>();\n kreuze=new ArrayList<Stein>();\n sterne=new ArrayList<Stein>();\n\n erstelleListenMap();\n }",
"public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}",
"private int calcularPrecio(Repuesto repuesto, boolean formateo, boolean limpieza) {\n int precio = 0;\n if (repuesto != null) {\n precio += repuesto.getPrecio();\n }\n \n if (formateo) {\n precio += 10000;\n }\n \n if (limpieza) {\n precio += 7500;\n }\n return precio;\n }",
"private Punto getPuntoPriorizado(Punto puntoini, List<Punto> puntos ){\n\t\t\n\t\tPunto puntopriorizado = null;\n\t\t// calculamos la heuristica de distancias a los demas puntos\n\t\tfor (Punto punto : puntos) {\n\t\t\tif( (puntoini!=null && punto!=null) && !puntoini.equals(punto) ){\n\t\t\t\tdouble d = Geometria.distanciaDeCoordenadas(puntoini, punto);\n\t\t\t\tpunto.getDatos().put(\"distanci\", d);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// ordenamos por las heuristicas definidad en la clase comparator\n\t\t// hora atencion, prioridad, urgencia, distancia\n\t\tCollections.sort(puntos, new PuntoHeuristicaComparator1());\n\t\tSystem.out.println(\"### mostrando las heuristicas #####\");\n\t\tmostratPuntosHeuristica(puntos);\n\t\n\t\tif( puntos!=null && puntos.size()>0){\n\t\t\tpuntopriorizado = puntos.get(0);\n\t\t}\n\t\t\n\t\t/*Punto pa = null ;\n\t\tfor (Punto p : puntos) {\n\t\t\tif(pa!=null){\n\t\t\t\tString key = p.getDatos().toString();\n\t\t\t\tString keya = pa.getDatos().toString();\n\t\t\t\tif(!key.equals(keya)){\n\t\t\t\t\tpuntopriorizado = p;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tpa = p ;\n\t\t}*/\n\n\t\treturn puntopriorizado;\n\t}",
"public static List<Punto> getPuntos(){\n\t\t\n\t\tList<Punto> puntos = new ArrayList<Punto>();\n\t\ttry{\n\n\t\t\t//-12.045916, -75.195270\n\t\t\t\n\t\t\tPunto p1 = new Punto(1,-12.037512,-75.183327,0.0);\n\t\t\tp1.setDatos(getDatos(\"16/06/2017 09:00:00\", 2 , 1));\n\t\t\t\n\t\t\tPunto p2 = new Punto(2,-12.041961,-75.184786,0.0);\n\t\t\tp2.setDatos(getDatos(\"16/06/2017 09:00:00\",1 , 2));\n\t\t\t\n\t\t\tPunto p3 = new Punto(3,-12.0381,-75.1841,0.0);\n\t\t\tp3.setDatos(getDatos(\"16/06/2017 09:00:00\",2 , 2));\n\t\t\t\n\t\t\tPunto p4 = new Punto(4,-12.041542,-75.185816,0.0);\n\t\t\tp4.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p5 = new Punto(5,-12.037764,-75.181096,0.0);\n\t\t\tp5.setDatos(getDatos(\"16/06/2017 11:15:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p6 = new Punto(6,-12.042801,-75.190108,0.0);\n\t\t\tp6.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p7 = new Punto(7,-12.04364,-75.184014,0.0);\n\t\t\tp7.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p8 = new Punto(8,-12.045739,-75.185387,0.0);\n\t\t\tp8.setDatos(getDatos(\"16/06/2017 11:30:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p9 = new Punto(9,-12.04683,-75.187361,0.0);\n\t\t\tp9.setDatos(getDatos(\"16/06/2017 11:50:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p10 = new Punto(10,-12.050775,-75.187962,0.0);\n\t\t\tp10.setDatos(getDatos(\"16/06/2017 12:30:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p11 = new Punto(11,-12.053797,-75.184271,0.0);\n\t\t\tp11.setDatos(getDatos(\"16/06/2017 13:00:00\",0 , 0));\n\t\t\t\n\t\t\tpuntos.add(p8);\n\t\t\tpuntos.add(p9);\n\t\t\tpuntos.add(p3);\n\t\t\tpuntos.add(p4);\n\t\t\tpuntos.add(p5);\n\t\t\tpuntos.add(p6);\n\t\t\tpuntos.add(p7);\n\t\t\tpuntos.add(p10);\n\t\t\tpuntos.add(p1);\n\t\t\tpuntos.add(p2);\n\t\t\tpuntos.add(p11);\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e ){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn puntos;\n\t\n\t}",
"public static ArrayList<Vkladi> rascetPolozBalans() {\r\n\t\tArrayList<Vkladi> foundVkladi = new ArrayList<Vkladi>();\r\n\r\n\t\tint t = 0;\r\n\t\tfor (Vkladi vkla : vklad) {\r\n\r\n\t\t\tt = t + vkla.getPribil();\r\n\t\t}\r\n\t\tSystem.out.println(\"Polozitelnii balanse Scetov= \" + t + \"$\");\r\n\t\treturn foundVkladi;\r\n\t}",
"private void wczytaj_nowy_poziom(Graphics g)\n {\n while (((int) Math.round(czas_gry) == 0) || (liczba_zyc_wroga == 0)) {\n try{\n poziom++;\n liczba_punktow += punkty_poziomu;\n zmienne_poziomu(poziom);\n g.setColor(Color.BLACK);\n g.drawString(\"NOWY POZIOM: \" + poziom, (int) Math.round(getWidth() * 0.5), (int) Math.round(getHeight() * 0.5));\n gra = false;\n } catch (Exception a){\n informacja_dla_obserwatora(new Zdarzenie_panelu_gry(\"koniec_poziomow\",liczba_punktow));\n }\n }\n }",
"public static Vector<Integer> jeMlin(int polje) {\n\t\tVector<Integer> mlin = new Vector<>(3, 6);\n\t\tSet<Set<Integer>> kandidati = IgralnaPloscaInfo.kandidatiZaMlin.get(polje); // množica parov, ki skupajs poljem polje tvorijo trojico\n\n\t\tfor (Set<Integer> par : kandidati) { \n\t\t\tVector<Integer> a = new Vector<>(3);\n\t\t\ta.add(polje);\n\t\t\tfor (int i : par) {\n\t\t\t\tif (IgralnaPloscaInfo.tabela[polje].zasedenost != IgralnaPloscaInfo.tabela[i].zasedenost) \n\t\t\t\t\tbreak;\n\t\t\t\t\ta.add(i);\n\t\t\t\t\t// preverim če imam 3, torej za cel mlin\n\t\t\t\t\tif (a.size() != 0 && a.size() % 3 == 0) mlin.addAll(a);\n\t\t\t}\n\t\t}\n\treturn mlin;\n\t}",
"public boolean czyJestWykolejenie(){\r\n int losowy = (int) (Math.random() * 130) ;\r\n if (losowy <= szansaWykolejenia){\r\n System.out.println(\"Nastapilo wykolejenie tramwaju!\");\r\n return true;\r\n }\r\n else {\r\n System.out.println(\"Brak wykolejenia\");\r\n return false;\r\n }\r\n }",
"protected ArrayList<Integer> bepaalTrioSpelers(Groep groep) {\r\n ArrayList<Integer> trio = new ArrayList<>();\r\n if (groep.getSpelers().size() == 3) {\r\n \t// 3 spelers, dus maak gelijk trio\r\n trio.add(groep.getSpelers().get(0).getId());\r\n trio.add(groep.getSpelers().get(1).getId());\r\n trio.add(groep.getSpelers().get(2).getId());\r\n return trio;\r\n }\r\n int spelerID = 0;\r\n try {\r\n spelerID = IJCController.c().getBeginpuntTrio(groep.getSpelers().size());\r\n }\r\n catch (Exception e) {\r\n \tlogger.log(Level.WARNING, \"Problem with spelersID. No int.\");\r\n }\r\n int minDelta = 1;\r\n int plusDelta = 1;\r\n int ignore = 0;\r\n boolean doorzoeken = true;\r\n while (doorzoeken) {\r\n Speler s1 = groep.getSpelerByID(spelerID);\r\n Speler s2 = groep.getSpelerByID(spelerID - minDelta);\r\n Speler s3 = groep.getSpelerByID(spelerID + plusDelta);\r\n if (isGoedTrio(s1, s2, s3, ignore)) {\r\n trio.add(s1.getId());\r\n trio.add(s2.getId());\r\n trio.add(s3.getId());\r\n return trio;\r\n } else {\r\n if ((s2 == null) || (s3 == null)) {\r\n if (ignore > 4) {\r\n doorzoeken = false;\r\n }\r\n ignore += 1;\r\n minDelta = 1;\r\n plusDelta = 1;\r\n } else {\r\n if (minDelta > plusDelta) {\r\n plusDelta++;\r\n } else {\r\n minDelta++;\r\n }\r\n }\r\n }\r\n }\r\n return trio;\r\n }",
"public void sortiereTabelleSpiele() {\n sortListe.sort(new Comparator<Spiel>() {\n @Override\n public int compare(Spiel o1, Spiel o2) {\n /*int a=0,b=0;\n if(o1.getStatus()==0)\n {\n a-=100000;\n }\n if(o2.getStatus()==0)\n {\n b-=100000;\n }*/\n return o1.getZeitplanNummer() - o2.getZeitplanNummer();\n }\n });\n tabelle_spiele.setItems(sortListe);\n }",
"@Test\r\n\tpublic void testGetPeliBalorazioNormalizatuak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == -2.75);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.25);\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 0);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.75);\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 1.75);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t\r\n\t\t// Normalizazioa Zsore erabiliz egiten dugu\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Zscore());\r\n\t\t\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.0000\");\r\n\t\t\r\n\t\t// p1 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(df.format(bek.getBalioa(e1.getId())).equals(\"1,2247\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\"-1,6398\"));\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(df.format(bek.getBalioa(e1.getId())).equals(\"-1,2247\"));\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 1);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\",1491\"));\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 0);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == -1);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\",4472\"));\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\"1,0435\"));\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Batezbestekoa());\r\n\t\t\r\n\t}",
"@Override\r\n public String toString() {\r\n// ritorna una stringa\r\n return \"pollo\";\r\n }",
"public void teken(){\n removeAll();\n \n //eerste tekening\n if(tekenEerste != false){\n tekenMuur();\n tekenSleutel();\n veld[9][9] = 6;\n tekenEerste = false;\n tekenBarricade();\n }\n \n //methode die de speler de waarde van de sleutel geeft aanroepen\n sleutelWaarde();\n \n //de methode van het spel einde aanroepen\n einde();\n \n //vernieuwd veld aanroepen\n veld = speler.nieuwVeld(veld);\n \n //het veld tekenen\n for(int i = 0; i < coordinaten.length; i++) {\n for(int j = 0; j < coordinaten[1].length; j++){\n switch (veld[i][j]) {\n case 1: //de sleutels\n if(i == sleutel100.getY() && j == sleutel100.getX()){\n coordinaten[i][j] = new SleutelVakje(100);\n }\n else if (i == sleutel1002.getY() && j == sleutel1002.getX()){\n coordinaten[i][j] = new SleutelVakje(100);\n }\n else if (i == sleutel200.getY() && j == sleutel200.getX()){\n coordinaten[i][j] = new SleutelVakje(200);\n }\n else if (i == sleutel300.getY() && j == sleutel300.getX()){\n coordinaten[i][j] = new SleutelVakje(300);\n } break;\n case 2: //de muren\n coordinaten[i][j] = new MuurVakje();\n break;\n // de barricades\n case 3:\n coordinaten[i][j] = new BarricadeVakje(100);\n break;\n case 4:\n coordinaten[i][j] = new BarricadeVakje(200);\n break;\n case 5:\n coordinaten[i][j] = new BarricadeVakje(300);\n break;\n case 6: // het eindveld vakje\n coordinaten[i][j] = new EindveldVakje();\n break;\n default: // het normale vakje\n coordinaten[i][j] = new CoordinaatVakje();\n break;\n }\n //de speler\n coordinaten[speler.getY()][speler.getX()] = new SpelerVakje();\n \n //het veld aan de JPanel toevoegen\n add(coordinaten[i][j]);\n }\n }\n System.out.println(\"Speler waarde = \" + speler.getSleutelWaarde());\n revalidate();\n repaint();\n }",
"public static List<Integer> czytanieMotorniczego(){\r\n int numerMotorniczego;\r\n int wiek=0;\r\n int doswiadczenie = 0;\r\n String line;\r\n OdczytZPliku plik = new OdczytZPliku();\r\n InputStream zawartosc = plik.pobierzZPliku(\"bazamotorniczych.txt\");\r\n String numerWStringu = String.valueOf( numerMotorniczego = (int) (Math.random() * 4));\r\n try (InputStreamReader odczyt = new InputStreamReader(zawartosc, StandardCharsets.UTF_8);\r\n BufferedReader czytaj = new BufferedReader(odczyt)) {\r\n while ((line = czytaj.readLine()) != null) {\r\n if (line.equals(numerWStringu)) {\r\n wiek = Integer.parseInt(czytaj.readLine());\r\n doswiadczenie = Integer.parseInt(czytaj.readLine());\r\n break;\r\n }\r\n else{\r\n for (int i = 0; i < 2; i++) {\r\n line = czytaj.readLine();\r\n }\r\n }\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n return List.of(numerMotorniczego, wiek, doswiadczenie);\r\n }",
"private void pokupiIzPoljaIKreirajServisera() {\n\t\tServiser noviServiser;\n\t\tif(izmena == false) {\n\t\t\tString ime = rssv.getTfIme().getText();\n\t\t\tString prezime = rssv.getTfPrezime().getText();\n\t\t\tString JMBG = rssv.getTfJMBG().getText();\n\t\t\tPol pol = rssv.getPolBox().getSelectionModel().getSelectedItem();\n\t\t\tString adresa = rssv.getTfAdresa().getText();\n\t\t\tString brojTelefona = rssv.getTfBrojTelefona().getText();\n\t\t\tString korisnickoIme = rssv.getTfKorisnickoIme().getText();\n\t\t\tString lozinka = rssv.getTfLozinka().getText();\n\t\t\tSpecijalizacija specijalizacija = rssv.getSpecijalizacijaBox().getSelectionModel().getSelectedItem();\n\t\t\t\t\n\t\t\ttry {\n\t\t\t\tdouble plata = Double.valueOf(rssv.getTfPlata().getText());\n\t\t\t\tnoviServiser = new Serviser(ime, prezime, JMBG, pol, adresa, brojTelefona, korisnickoIme, lozinka, specijalizacija, plata);\n\t\t\t\trssv.getTabela().getItems().add(noviServiser);\n\t\t\t\tServiserController.upisiServiseraUFajl(noviServiser);\n\t\t\t\trssv.resetujPolja();\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\trssv.izbaciPorukuOGresci(e.getMessage());\n\t\t\t} catch (Exception e) {\n\t\t\t\trssv.izbaciPorukuOGresci(e.getMessage());\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\tString ime = rssv.getTfIme().getText();\n\t\t\tString prezime = rssv.getTfPrezime().getText();\n\t\t\tString JMBG = rssv.getTfJMBG().getText();\n\t\t\tPol pol = rssv.getPolBox().getSelectionModel().getSelectedItem();\n\t\t\tString adresa = rssv.getTfAdresa().getText();\n\t\t\tString brojTelefona = rssv.getTfBrojTelefona().getText();\n\t\t\tString korisnickoIme = rssv.getTfKorisnickoIme().getText();\n\t\t\tString lozinka = rssv.getTfLozinka().getText();\n\t\t\tSpecijalizacija specijalizacija = rssv.getSpecijalizacijaBox().getSelectionModel().getSelectedItem();\n\t\t\t\n\t\t\ttry {\n\t\t\t\tdouble plata = Double.valueOf(rssv.getTfPlata().getText());\n\t\t\t\tnoviServiser = new Serviser(tempServiser.getOznaka(), ime, prezime, JMBG, pol, adresa, brojTelefona, korisnickoIme, lozinka, false, specijalizacija, plata);\n\t\t\t\tServiserController.izbrisiIzUcitanihServiseraSaOznakom(tempServiser.getOznaka());\n\t\t\t\trssv.getTabela().getItems().add(noviServiser);\n\t\t\t\tServiserController.upisiServiseraUFajl(noviServiser);\n\t\t\t\trssv.getTabela().getItems().remove(tempServiser);\n\t\t\t\tServiserController.sacuvajIzmeneUFajl();\n\t\t\t\trssv.resetujPolja();\n\t\t\t\t\n\t\t\t\tizmena = false;\n\t\t\t\ttempServiser = null;\n\t\t\t\t\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"@Override\n public ArrayList<String> kaikkiMahdollisetSiirrot(int x, int y, Ruutu[][] ruudukko) {\n ArrayList<String> siirrot = new ArrayList<>();\n if (x - 1 >= 0 && y - 2 >= 0 && (ruudukko[x - 1][y - 2].getNappula() == null || !onkoSamaVari(ruudukko[x - 1][y - 2].getNappula()))) {\n siirrot.add(\"\" + (x - 1) + (y - 2));\n }\n if (x - 2 >= 0 && y - 1 >= 0 && (ruudukko[x - 2][y - 1].getNappula() == null || !onkoSamaVari(ruudukko[x - 2][y - 1].getNappula()))) {\n siirrot.add(\"\" + (x - 2) + (y - 1));\n }\n if (x - 1 >= 0 && y + 2 <= 7 && (ruudukko[x - 1][y + 2].getNappula() == null || !onkoSamaVari(ruudukko[x - 1][y + 2].getNappula()))) {\n siirrot.add(\"\" + (x - 1) + (y + 2));\n }\n if (x - 2 >= 0 && y + 1 <= 7 && (ruudukko[x - 2][y + 1].getNappula() == null || !onkoSamaVari(ruudukko[x - 2][y + 1].getNappula()))) {\n siirrot.add(\"\" + (x - 2) + (y + 1));\n }\n if (x + 1 <= 7 && y - 2 >= 0 && (ruudukko[x + 1][y - 2].getNappula() == null || !onkoSamaVari(ruudukko[x + 1][y - 2].getNappula()))) {\n siirrot.add(\"\" + (x + 1) + (y - 2));\n }\n if (x + 2 <= 7 && y - 1 >= 0 && (ruudukko[x + 2][y - 1].getNappula() == null || !onkoSamaVari(ruudukko[x + 2][y - 1].getNappula()))) {\n siirrot.add(\"\" + (x + 2) + (y - 1));\n }\n if (x + 1 <= 7 && y + 2 <= 7 && (ruudukko[x + 1][y + 2].getNappula() == null || !onkoSamaVari(ruudukko[x + 1][y + 2].getNappula()))) {\n siirrot.add(\"\" + (x + 1) + (y + 2));\n }\n if (x + 2 <= 7 && y + 1 <= 7 && (ruudukko[x + 2][y + 1].getNappula() == null || !onkoSamaVari(ruudukko[x + 2][y + 1].getNappula()))) {\n siirrot.add(\"\" + (x + 2) + (y + 1));\n }\n return siirrot;\n }",
"private boolean isLoptaNaPodlozi(){\n\t\tif (loptaY >= LOPTA_MIN_Y && loptaY <= LOPTA_MAX_Y){\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public String toStringPrologFormatListLo()\r\n\t{\n\t\t\r\n\t\tString output = \"[\";\r\n\r\n\t\tfor (Location lo : this.listLocation)\r\n\t\t{\r\n\t\t\toutput += lo.LocationToStringPrologFormat();\r\n\t\t\toutput += \",\";\r\n\t\t}\r\n\t\toutput = output.substring(0, output.length()-1);\r\n\t\toutput += \"]\";\r\n\t\treturn output;\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tclass Ulamek{\r\n\t\t\tprivate int licznik, mianownik;\r\n\r\n\t\t\tpublic void ustawLicznik (int l){\r\n\t\t\t\tlicznik=l;\r\n\t\t\t}\r\n\t\t\tpublic void ustawMianownik (int m){\r\n\t\t\t\tmianownik=m;\r\n\t\t\t}\r\n\t\t\tpublic void ustawUlamek (int u1, int u2){\r\n\t\t\t\tlicznik=u1;\r\n\t\t\t\tmianownik=u2;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpublic void wyswietl (){\r\n\t\t\t\t\r\n\t\t\t\tint przod, reszta, przod_dlugosc, mianownik_dlugosc, licznik_dlugosc;\r\n\t\t\t\tString przod_zamiana, mianownik_string, licznik_string;\r\n\t\t\t\tdouble wynik;\r\n\t\t\t\t\r\n\t\t\t\tif (mianownik!=0 && licznik !=0){\r\n\t\t\t\tprzod=licznik/mianownik;\r\n\t\t\t\treszta=licznik-(przod*mianownik);\r\n\t\t\t\tprzod_zamiana=\"\"+przod;\r\n\t\t\t\tprzod_dlugosc=przod_zamiana.length();\r\n\t\t\t\twynik=1.0*licznik/mianownik;\r\n\t\t\t\t\r\n\t\t\t\tif(reszta!=0){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tint licznik = 0;\r\n\t\t\t\t\tdo{\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t licznik++;\r\n\t\t\t\t\t}while (licznik!=przod_dlugosc);\r\n\t\t\t\tSystem.out.println(reszta);\r\n\t\t\t}\r\n\r\n\t\t\t\t//zamiana na stringa i liczenie\r\n\t\t\t\tmianownik_string=\"\"+mianownik;\r\n\t\t\t\tmianownik_dlugosc=mianownik_string.length();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//brak calości\r\n\t\t\t\tif(przod==0){\r\n\t\t\t\tSystem.out.print(\" \"+\" \"+\" \");\r\n\t\t\t\tint licznik3 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t licznik3++;\r\n\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t System.out.print(\" = \"+wynik);\r\n\r\n\t\t\t System.out.println();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\r\n\r\n\t\t\t\tif(przod!=0){\r\n\t\t\t\tSystem.out.print(\" \"+przod+\" \");\r\n\t\t\t\tint licznik3 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t\tif(reszta!=0){\r\n\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t}\r\n\t\t\t\t licznik3++;\r\n\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t System.out.print(\" = \"+wynik);\r\n\r\n\t\t\t System.out.println();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(reszta!=0){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tint licznik2 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t\tif(reszta!=0){\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t licznik2++;\r\n\t\t\t\t\t\r\n\t\t\t\t}while (licznik2!=przod_dlugosc);\r\n\t\t\t\tSystem.out.println(mianownik);\r\n\t\t\t System.out.println();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//jezeli blad \r\n\t\t\t\t\tmianownik_string=\"\"+mianownik;\r\n\t\t\t\t\tmianownik_dlugosc=mianownik_string.length();\r\n\t\t\t\t\tlicznik_string=\"\"+licznik;\r\n\t\t\t\t\tlicznik_dlugosc=licznik_string.length();\r\n\t\t\t\t\tif(licznik_dlugosc>mianownik_dlugosc){\r\n\t\t\t\t\t\tmianownik_dlugosc=licznik_dlugosc;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//gora\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t//if(licznik==0){\r\n\t\t\t\t\t//System.out.print(\" \");\r\n\t\t\t\t\t//}\r\n\r\n\t\t\t\t\tSystem.out.println(licznik);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//srodek\r\n\t\t\t\t\tSystem.out.print(\" \"+\" \"+\" \");\r\n\t\t\t\t\t\r\n\t\t\t\t\tint licznik3 = 0;\r\n\t\t\t\t\tdo{\r\n\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t licznik3++;\r\n\t\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t\t System.out.print(\" = \"+\"ERR\");\r\n\r\n\t\t\t\t System.out.println();\r\n\t\t\t\t\t\r\n\t\t\t\t //dol\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t\t\tSystem.out.println(mianownik);\r\n\t\t\t\t\t System.out.println();\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t Ulamek u1=new Ulamek();\r\n\t\t Ulamek u2=new Ulamek();\r\n\r\n\t\t u1.ustawLicznik(3);\r\n\t\t u1.ustawMianownik(5);\r\n\r\n\t\t u2.ustawLicznik(142);\r\n\t\t u2.ustawMianownik(8);\r\n\r\n\t\t u1.wyswietl();\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t \r\n\t\t u2.wyswietl();\r\n\r\n\r\n\r\n\r\n\t\t u2.ustawUlamek(100,0);\r\n\r\n\r\n\t\t u2.wyswietl();\r\n\r\n\t}",
"@Given(\"^daje ci otwarta strone$\")\n public void daje_ci_otwarta_strone() throws Throwable {\n driver = new ChromeDriver();\n String url = \"http://www.pollub.pl/\";\n driver.navigate().to(url);\n driver.manage().window().maximize();\n // driver.manage().timeouts().implicitlyWait(5000, TimeUnit.MILLISECONDS); // PRZYKLAD GLOBALNEGO IMPLICITY WAIT-A\n\n }",
"public void tetraederzeichnen(double ax,double ay,double bx,double by,double cx,double cy,double dx,double dy){\n double[][] arr_koordinaten_2d ={{ax,ay},{bx,by},{cx,cy},{dx,dy}};\n /**\n * Aufruf der Methode gestricheltodernicht\n *\n * Überprüft, welche Strecken von Punkt D sichtbar sind oder nicht.\n */\n\n boolean[] strichelnodernicht = cls_berechnen.gestricheltodernicht(arr_koordinaten_2d);\n\n /**Skaliert die Koordinaten zum Pixelformat mit Koordinatenursprung\n * ca in der Mitte der Zeichenfläche*/\n int sw=9; //skalierungswert\n ax= (sw+ax)*50;\n ay=(sw-ay)*50;\n bx= (sw+bx)*50;\n by=(sw-by)*50;\n cx= (sw+cx)*50;\n cy=(sw-cy)*50;\n dx= (sw+dx)*50;\n dy=(sw-dy)*50;\n\n /**\n * Erstellt Linienobjekte für die Kanten des Tetraeder Objekts...\n */\n Line line1 = new Line();\n Line line2 = new Line();\n Line line3 = new Line();\n Line line4 = new Line();\n Line line5 = new Line();\n Line line6 = new Line();\n\n /**\n * ... weißt ihnen die Koordinaten zu...\n */\n line1.setStartX(ax);\n line1.setStartY(ay);\n line1.setEndX(bx);\n line1.setEndY(by);\n\n line2.setStartX(ax);\n line2.setStartY(ay);\n line2.setEndX(cx);\n line2.setEndY(cy);\n\n line3.setStartX(bx);\n line3.setStartY(by);\n line3.setEndX(cx);\n line3.setEndY(cy);\n \n line4.setStartX(dx);\n line4.setStartY(dy);\n line4.setEndX(ax);\n line4.setEndY(ay);\n\n line5.setStartX(dx);\n line5.setStartY(dy);\n line5.setEndX(bx);\n line5.setEndY(by);\n\n line6.setStartX(dx);\n line6.setStartY(dy);\n line6.setEndX(cx);\n line6.setEndY(cy);\n \n if(!strichelnodernicht[0]){\n line4.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[1]){\n line5.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[2]){\n line6.getStrokeDashArray().addAll(5d,5d);}\n\n /**\n * ... und fügt die Linien Objekte der Zeichenfläche hinzu\n */\n canvaspane.getChildren().add(line1);\n canvaspane.getChildren().add(line2);\n canvaspane.getChildren().add(line3);\n canvaspane.getChildren().add(line4);\n canvaspane.getChildren().add(line5);\n canvaspane.getChildren().add(line6);\n\n //zeichnet den Koordinatenursprung neu\n canvaspane.getChildren().add(l1);\n canvaspane.getChildren().add(l2);\n }",
"private static List<Polyomino> generic_aux(int P, Polyomino parent, LinkedList<Square> untried, Set<Square> vus, List<Polyomino> l, String s) {\n while (!untried.isEmpty()) {\n Square point = untried.pop();\n parent.squares.add(point);\n List<Square> anti_points = point.images(s);\n for (Square anti_point : anti_points) {\n parent.squares.add(anti_point);\n }\n\n if (parent.squares.size() <= P)\n l.add(parent.clone());\n if (parent.squares.size() < P) {\n List<Square> voisins = getNeighbours(point, s);\n LinkedList<Square> copy_untried = (LinkedList<Square>) untried.clone();\n Set<Square> copy_vus = new HashSet<Square>(vus);\n for (Square v : voisins) {\n if (!copy_vus.contains(v.canonicalForm(s)) && v.isAllowed(s)) {\n copy_untried.add(v);\n copy_vus.add(v.canonicalForm(s));\n }\n }\n\n generic_aux(P, parent, copy_untried, copy_vus, l, s);\n }\n parent.squares.remove(point);\n for (Square anti_point : anti_points) {\n parent.squares.remove(anti_point);\n }\n }\n return l;\n }",
"@Test\n public void test_distanceLinaireSurY_ParcourOptimum_Pour_4villes() {\n\n Pays pays = new Pays(4);\n\n int positionX = (int) (Math.random() * 50);\n\n pays.setPositionVille(0, new Point(positionX, 2));\n pays.setPositionVille(1, new Point(positionX, 3));\n pays.setPositionVille(2, new Point(positionX, 4));\n pays.setPositionVille(3, new Point(positionX, 5));\n\n brutForceV3.recherche(pays, 0);\n\n assertEquals(\"0>1>2>3>0\", brutForceV3.getParcours().getVillesEmprunté());\n assertEquals(brutForceV3.getParcours().getDistance(),\n parcoursVilles(pays, brutForceV3.getParcours().getVillesEmprunté(),\">\"));\n\n }",
"public boolean odigraj(Koordinati poteza) {\n if (this.jeVeljavnaPoteza(poteza)) {\n plosca[poteza.getX()][poteza.getY()] = igralecNaPotezi.getPolje();\n // Potezo dodamo v odigranePoteze.\n\t\t\tthis.odigranePoteze.add(poteza);\n igralecNaPotezi = igralecNaPotezi.nasprotnik();\n return true;\n } else return false;\n }"
]
| [
"0.6898991",
"0.635793",
"0.6195998",
"0.6190879",
"0.61449796",
"0.59798706",
"0.5899255",
"0.5860511",
"0.57935727",
"0.5760874",
"0.57251006",
"0.5718903",
"0.5712025",
"0.570814",
"0.5686188",
"0.56829137",
"0.5663302",
"0.5662163",
"0.5535959",
"0.55352545",
"0.5513544",
"0.54938823",
"0.5423461",
"0.53478235",
"0.53454053",
"0.53142893",
"0.52831584",
"0.52678764",
"0.52673066",
"0.5266742",
"0.5246255",
"0.5237954",
"0.522462",
"0.52178055",
"0.518933",
"0.5172184",
"0.51514393",
"0.5133761",
"0.51266146",
"0.5126346",
"0.5126116",
"0.5112547",
"0.5109808",
"0.5105425",
"0.50887245",
"0.5086816",
"0.5075423",
"0.506001",
"0.5050842",
"0.5048084",
"0.5034242",
"0.50210965",
"0.5004432",
"0.49895492",
"0.4985419",
"0.49788585",
"0.49767062",
"0.49759045",
"0.49665046",
"0.49628308",
"0.49467477",
"0.4943706",
"0.49368653",
"0.49360728",
"0.49335226",
"0.49325746",
"0.4930863",
"0.49287567",
"0.4927832",
"0.49188507",
"0.4915916",
"0.48993418",
"0.48918545",
"0.48838556",
"0.48726338",
"0.48593065",
"0.48476216",
"0.48343396",
"0.48303938",
"0.4822484",
"0.48169258",
"0.4809341",
"0.48086292",
"0.47976798",
"0.47919443",
"0.47885987",
"0.47876778",
"0.47875804",
"0.47852525",
"0.47743735",
"0.4772805",
"0.4757868",
"0.4757327",
"0.47571397",
"0.47561923",
"0.4754217",
"0.47541136",
"0.4753511",
"0.47492316",
"0.47461358"
]
| 0.65005964 | 1 |
Metoda wyszukuje losowo na planszy pole do oddania strzalu, jednak jesli wylosowane pole nie zawiera statku, nastepuje ponowne losowanie w celu znalezienia lepszego pola do strzalu. Dozwolona ilosc powtorzen okresla drugi parametr. Jesli w ktorejkolwiek iteracji nastapi wylosowanie pola zawierajacego statek, strzal uznaje sie za trafiony i nie sa wykonywane kolejne iteracje petli. Jesli w ostatniej iteracji takze zostanie wylosowane pole puste, wspolrzedne tego pola zostaje uznane za wykonany strzal i jest on niecelny. | protected boolean strzalWielokrotny(StatekIterator oStatkiPrzeciwnika, int iIloscPowtorzen)
{
try
{
Pozycja oWylosowanePole = null;
Plansza oPlansza = oStatkiPrzeciwnika.getPlansza();
for (int i = 1; i <= iIloscPowtorzen; ++i)
{
oWylosowanePole = losujPole(oPlansza);
if (oPlansza.getPole(oWylosowanePole.getX(), oWylosowanePole.getY()) == PlanszaTypPola.PLANSZA_STATEK || i == iIloscPowtorzen)
{
boolean bStrzal;
bStrzal = oStatkiPrzeciwnika.strzal(oWylosowanePole.getX(), oWylosowanePole.getY());
if (bStrzal == true)
{
//zapisanie celnego strzalu w tablicy trafien
Pozycja oTrafienie = new Pozycja(2);
oTrafienie.setX( oWylosowanePole.getX() );
oTrafienie.setY( oWylosowanePole.getY() );
oUzyteczneTrafienia.add(oTrafienie);
}
return bStrzal;
}
}
}
catch (ParametrException e)
{
throw new ProgramistaException(e);
}
//petla musi zwrocic strzal. skoro doszlo tutaj - wywal wyjatek
throw new ProgramistaException();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected boolean strzalSasiadujacy(StatekIterator oStatkiPrzeciwnika)\n\t\t{\n\t\t//przygotowanie kontenera przechowujacego do 4 sasiednich pol, ktore nadaja sie do kolejnego strzalu\n\t\tArrayList<Pozycja> oSasiedniePola = new ArrayList<Pozycja>(4);\n\t\t//petla wyszukujaca we wczesniejszych trafieniach pola do oddania kolejnego strzalu\n\t\twhile (oUzyteczneTrafienia.size() > 0)\n\t\t\t{\n\t\t\t//wylosowanie pola do przetestowania\n\t\t\tint iLosowanePole = oRand.nextInt(oUzyteczneTrafienia.size());\n\t\t\tPozycja oWybranePole = oUzyteczneTrafienia.get(iLosowanePole);\n\t\t\t\n\t\t\ttry\n\t\t\t\t{\n\t\t\t\t//wczytanie wspolrzednych 4 sasiadow i sprawdzenie, czy sa to pola puste, lub zawierajace statek\n\t\t\t\tfor (int i = -1; i <= 1; ++i)\n\t\t\t\t\tfor (int j = -1; j <= 1; ++j)\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\toWybranePole.getX() + i >= 0 && oWybranePole.getX() + i < oStatkiPrzeciwnika.getPlansza().getSzerokosc()\n\t\t\t\t\t\t\t&& oWybranePole.getY() + j >= 0 && oWybranePole.getY() + j < oStatkiPrzeciwnika.getPlansza().getWysokosc()\n\t\t\t\t\t\t\t&& (i + j == -1 || i + j == 1)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (oStatkiPrzeciwnika.getPlansza().getPole(oWybranePole.getX() + i, oWybranePole.getY() + j) == PlanszaTypPola.PLANSZA_POLE_PUSTE\n\t\t\t\t\t\t\t\t|| oStatkiPrzeciwnika.getPlansza().getPole(oWybranePole.getX() + i, oWybranePole.getY() + j) == PlanszaTypPola.PLANSZA_STATEK\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tPozycja oPrawidlowe = new Pozycja(2);\n\t\t\t\t\t\t\t\toPrawidlowe.setX(oWybranePole.getX() + i);\n\t\t\t\t\t\t\t\toPrawidlowe.setY(oWybranePole.getY() + j);\n\t\t\t\t\t\t\t\toSasiedniePola.add(oPrawidlowe);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (bProsteLinie == true)\n\t\t\t\t\t{\n\t\t\t\t\tboolean bPionowy = false;\n\t\t\t\t\tboolean bPoziomy = false;\n\t\t\t\t\tfor (int i = -1; i <= 1; ++i)\n\t\t\t\t\t\tfor (int j = -1; j <= 1; ++j)\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\toWybranePole.getX() + i >= 0 && oWybranePole.getX() + i < oStatkiPrzeciwnika.getPlansza().getSzerokosc()\n\t\t\t\t\t\t\t\t&& oWybranePole.getY() + j >= 0 && oWybranePole.getY() + j < oStatkiPrzeciwnika.getPlansza().getWysokosc()\n\t\t\t\t\t\t\t\t&& (i + j == -1 || i + j == 1)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (oStatkiPrzeciwnika.getPlansza().getPole(oWybranePole.getX() + i, oWybranePole.getY() + j) == PlanszaTypPola.PLANSZA_STRZAL_CELNY)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (i == 0)\n\t\t\t\t\t\t\t\t\t\tbPionowy = true;\n\t\t\t\t\t\t\t\t\tif (j == 0)\n\t\t\t\t\t\t\t\t\t\tbPoziomy = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\tif (bPionowy == true && bPoziomy == true)\n\t\t\t\t\t\tthrow new ProgramistaException();\n\t\t\t\t\tif (bPionowy == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfor (int i = oSasiedniePola.size() - 1; i >= 0; --i)\n\t\t\t\t\t\t\tif (oSasiedniePola.get(i).getX() != oWybranePole.getX())\n\t\t\t\t\t\t\t\toSasiedniePola.remove(i);\n\t\t\t\t\t\t}\n\t\t\t\t\tif (bPoziomy == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfor (int i = oSasiedniePola.size() - 1; i >= 0; --i)\n\t\t\t\t\t\t\tif (oSasiedniePola.get(i).getY() != oWybranePole.getY())\n\t\t\t\t\t\t\t\toSasiedniePola.remove(i);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (oSasiedniePola.size() > 0)\n\t\t\t\t\t{\n\t\t\t\t\t//sa pola prawidlowe do oddania kolejnego strzalu\n\t\t\t\t\tint iWylosowanySasiad = oRand.nextInt(oSasiedniePola.size());\n\t\t\t\t\t//oddanie strzalu na wspolrzedne weybranego pola\n\t\t\t\t\tboolean bStrzal;\n\t\t\t\t\tbStrzal = oStatkiPrzeciwnika.strzal(oSasiedniePola.get(iWylosowanySasiad).getX(), oSasiedniePola.get(iWylosowanySasiad).getY());\n\t\t\t\t\tif (bStrzal == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t//zapisanie celnego strzalu w tablicy trafien\n\t\t\t\t\t\tPozycja oTrafienie = new Pozycja(2);\n\t\t\t\t\t\toTrafienie.setX( oSasiedniePola.get(iWylosowanySasiad).getX() );\n\t\t\t\t\t\toTrafienie.setY( oSasiedniePola.get(iWylosowanySasiad).getY() );\n\t\t\t\t\t\toUzyteczneTrafienia.add(oTrafienie);\n\t\t\t\t\t\t}\n\t\t\t\t\treturn bStrzal;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t//brak prawidlowych pol. usuniecie trafienia z listy i przejscie do kolejnej iteracji petli wyszukujacej\n\t\t\t\t\toUzyteczneTrafienia.remove(iLosowanePole);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tcatch (ParametrException e)\n\t\t\t\t{\n\t\t\t\tthrow new ProgramistaException(e);\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\treturn strzalLosowy(oStatkiPrzeciwnika);\n\t\t}",
"protected boolean strzalLosowy(StatekIterator oStatkiPrzeciwnika)\n\t\t{\n\t\ttry\n\t\t\t{\n\t\t\tPozycja oWylosowanePole = losujPole(oStatkiPrzeciwnika.getPlansza());\n\t\t\tboolean bTrafienie = oStatkiPrzeciwnika.strzal(oWylosowanePole.getX(), oWylosowanePole.getY());\n\t\t\tif (bTrafienie == true)\n\t\t\t\t{\n\t\t\t\t//zapisanie celnego strzalu w tablicy trafien\n\t\t\t\tPozycja oTrafienie = new Pozycja(2);\n\t\t\t\toTrafienie.setX(oWylosowanePole.getX());\n\t\t\t\toTrafienie.setY(oWylosowanePole.getY());\n\t\t\t\toUzyteczneTrafienia.add(oTrafienie);\n\t\t\t\t}\n\t\t\treturn bTrafienie;\n\t\t\t}\n\t\tcatch (ParametrException e)\n\t\t\t{\n\t\t\tthrow new ProgramistaException(e);\n\t\t\t}\n\t\t}",
"public void stworzWrogow() {\n\t\tfor(; aktualnaLiczbaWrogow < MAX_LICZBA_WROGOW; aktualnaLiczbaWrogow++) {\n\t\t\tdouble x = (generatorWspolrzednych.nextInt(550)) + 20 ;\n\t\t\tdouble y = ((generatorWspolrzednych.nextInt(750)) + 20);\n\t\t\tx = x < 0 ? -x : x; \n\t\t\ty = y < 0 ? y : -y;\n\t\t\tStatekWroga statekWroga = new StatekWroga(new Wspolrzedne(x, y));\n\t\t\t\n\t\t\tstatekWroga.setDol(DLUGOSC_RUCHU);\n\t\t\t\n\t\t\tstatkiWroga.add(statekWroga);\n\t\t}\n\t}",
"public void ZbierzTowaryKlas() {\n\t\tSystem.out.println(\"ZbierzTowaryKlas\");\n\t\tfor(int i=0;i<Plansza.getTowarNaPlanszy().size();i++) {\n\t\t\tfor(Towar towar : Plansza.getTowarNaPlanszy()) {\n\t\t\t\t\n\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getNiewolnikNaPLanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getNiewolnikNaPLanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\t//Szansa Niewolnika na zdobycie dwoch razy wiecej towarow\n\t\t\t\t\t\tif(GeneratorRandom.RandomOd0(101) <= ZapisOdczyt.getNiewolnicySzansa()) {\n\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setLicznikTowarow(Plansza.getNiewolnikNaPLanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getRzemieslnikNaPlanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getRzemieslnikNaPlanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setLicznikTowarow(Plansza.getRzemieslnikNaPlanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getArystokrataNaPlanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getArystokrataNaPlanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setLicznikTowarow(Plansza.getArystokrataNaPlanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void Zabojstwa() {\n\t\tSystem.out.println(\"Zabojstwa\");\n\t\tfor(int i=0;i<Plansza.getNiebezpieczenstwoNaPlanszy().size();i++) {\n\t\t\tfor(GenerujNiebezpieczenstwo niebez : Plansza.getNiebezpieczenstwoNaPlanszy()) {\n\n\t\t\t\tif(niebez.getZabojca() instanceof DzikieZwierzeta) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getUbrania() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getNiewolnikNaPLanszy().getJedzenie() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setUbrania(Plansza.getNiewolnikNaPLanszy().getUbrania() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setJedzenie(Plansza.getNiewolnikNaPLanszy().getJedzenie() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setLicznikNiebezpieczenstw(Plansza.getNiewolnikNaPLanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Bandyci) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getMaterialy() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getRzemieslnikNaPlanszy().getNarzedzia() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tif(GeneratorRandom.RandomOd0(101) <= ZapisOdczyt.getRzemieslnicySzansa()) {\n\t\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setMaterialy(Plansza.getRzemieslnikNaPlanszy().getMaterialy() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setNarzedzia(Plansza.getRzemieslnikNaPlanszy().getNarzedzia() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getRzemieslnikNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Zlodzieje) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getTowary() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getArystokrataNaPlanszy().getZloto() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setTowary(Plansza.getArystokrataNaPlanszy().getTowary() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setZloto(Plansza.getArystokrataNaPlanszy().getZloto() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getArystokrataNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"public void pobierzukladprzegladRZiSBO() {\r\n if (uklad.getUklad() == null) {\r\n uklad = ukladBRDAO.findukladBRPodatnikRokPodstawowy(wpisView.getPodatnikObiekt(), wpisView.getRokWpisuSt());\r\n }\r\n List<PozycjaRZiSBilans> pozycje = UkladBRBean.pobierzpozycje(pozycjaRZiSDAO, pozycjaBilansDAO, uklad, \"\", \"r\");\r\n UkladBRBean.czyscPozycje(pozycje);\r\n rootProjektRZiS.getChildren().clear();\r\n List<StronaWiersza> zapisy = StronaWierszaBean.pobraniezapisowwynikoweBO(stronaWierszaDAO, wpisView);\r\n try {\r\n PozycjaRZiSFKBean.ustawRoota(rootProjektRZiS, pozycje, zapisy);\r\n level = PozycjaRZiSFKBean.ustawLevel(rootProjektRZiS, pozycje);\r\n Msg.msg(\"i\", \"Pobrano układ \");\r\n } catch (Exception e) {\r\n E.e(e);\r\n rootProjektRZiS.getChildren().clear();\r\n Msg.msg(\"e\", e.getLocalizedMessage());\r\n }\r\n }",
"public void AwansSpoleczny() {\n\t\tSystem.out.println(\"AwansSpoleczny\");\n\t\tif(Plansza.getNiewolnikNaPLanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getNiewolnikNaPLanszy() instanceof Niewolnicy) {\n\t\t\tPlansza.setNiewolnikNaPlanszy(new Mieszczanie(Plansza.getNiewolnikNaPLanszy()));\n\t\t}\n\t\t\t\n\t\tif(Plansza.getRzemieslnikNaPlanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getRzemieslnikNaPlanszy() instanceof Rzemieslnicy) {\n\t\t\tPlansza.setRzemieslnikNaPlanszy(new Handlarze(Plansza.getRzemieslnikNaPlanszy()));\n\t\t}\n\t\t\t\n\t\tif(Plansza.getArystokrataNaPlanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getArystokrataNaPlanszy() instanceof Arystokracja) {\n\t\t\tPlansza.setArystokrataNaPlanszy(new Szlachta(Plansza.getArystokrataNaPlanszy()));\n\t\t}\n\t}",
"public void realizacjap34() {\n System.out.println(\"REALIZACJA PUNKTU 3\\n\");\n\n System.out.println(\"\\nWyszukiwanie osob po imieniu (Piotr) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzOsobyPoImieniu(Listy.osoby, \"Piotr\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po nazwisku (Oleszczuk) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzOsobyPoNazwisku(Listy.osoby, \"Oleszczuk\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy mniejszym niz 10============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyMniejszymNiz(Listy.osoby, 10).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy większym niz 10============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyWiekszymNiz(Listy.osoby, 10).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy równym 5============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyRownym(Listy.osoby, 5).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin mniejszej niz 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachMniejszychNiz(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin wiekszej niz 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachWiekszychNiz(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin równej 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachRownych(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji wiekszej niz 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiWiekszejNiz(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji mniejszej niz 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiMniejszejNiz(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji rownej 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiRownej(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stanowisku (Adiunkt) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStanowisku(Listy.osoby, \"Adiunkt\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie studenta po numerze indeksu (123456) ============================================================================\\n\");\n System.out.println(NarzedziaWyszukiwania.znajdzStudentaPoIndeksie(Listy.osoby, \"123456\"));\n\n System.out.println(\"\\nWyszukiwanie studentów po roku studiów (1) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzStudentowPoRokuStudiow(Listy.osoby, 1).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie studentów po kierunku (Informatyka Stosowana) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzStudentowPoKierunku(Listy.osoby, \"Informatyka Stosowana\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie kursu po nazwie (Analiza Matematyczna 1) ============================================================================\\n\");\n System.out.println(NarzedziaWyszukiwania.znajdzKursPoNazwie(Listy.kursy, \"Analiza Matematyczna 1\"));\n\n System.out.println(\"\\nWyszukiwanie kursów po liczbie ects (5) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzKursyPoECTS(Listy.kursy, 5).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie kursów po prowadzacym+\"+Listy.osoby.get(0).getImie()+\" \"+Listy.osoby.get(0).getNazwisko()+\" ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzKursyPoProwadzacym(Listy.kursy, Listy.osoby.get(0)).forEach(System.out::println);\n\n\n //REALIZACJA PUNKTU 4\n System.out.println(\"=====================================================================================================================\");\n System.out.println(\"REALIZACJA PUNKTU 4\");\n System.out.println(\"=====================================================================================================================\\n\");\n System.out.println(\"Kursy:\\n\");\n for (Kurs kurs : Listy.kursy) {\n System.out.println(kurs.toString());\n }\n\n System.out.println(\"\\nOsoby:\\n\");\n for (Osoba osoba : Listy.osoby) {\n System.out.println(\"OSOBA====================================================================================================\");\n System.out.println(osoba.toString());\n System.out.println();\n }\n }",
"public void naplnVrcholy() {\r\n System.out.println(\"Zadajte pocet vrcholov: \");\r\n pocetVrcholov = skener.nextInt();\r\n for (int i=0; i < pocetVrcholov; i++) {\r\n nekonecno = (int)(Double.POSITIVE_INFINITY);\r\n if(i==0) { //pre prvy vrchol potrebujeme nastavit vzdialenost 0 \r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu, 0, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n } else { //ostatne budu mat nekonecno alebo v tomto pripade 9999 (lebo tuto hodnotu v mensich grafoch nepresiahnem)\r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu,nekonecno, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n }\r\n }\r\n }",
"float znajdzOstatecznaCene()\n\t{\n\t\t//getInput(\"znajdzOstatecznaCene\");\n\t\t//print (\"znajdzOstatecznaCene \"+iteracja);\n\t\t\n\t\t//debug\n\t\tBoolean debug = false;\n\t\tif (LokalneCentrum.getCurrentHour().equals(\"03:00\"))\n\t\t{\n\t\t\tprint(\"03:00 on the clock\",debug);\n\t\t\tdebug=false;\n\t\t}\n\t\t\n\t\t//wszystkie ceny jakie byly oglaszan ne na najblizszy slot w \n\t\tArrayList<Float> cenyNaNajblizszySlot =znajdzOstatecznaCeneCenaNaNajblizszeSloty();\n\t\t\n\t\t\n\t\t//Stworzenie cen w raportowaniu\n\t\tint i=0;\n\t\twhile (i<cenyNaNajblizszySlot.size())\n\t\t{\n\t\t\trynekHistory.kontraktDodajCene(cenyNaNajblizszySlot.get(i));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tprint(\"ceny na najblizszy slot \"+cenyNaNajblizszySlot.size());\n\n\t\t\n\t\t//do rpzerobienia problemu minimalizacji na maksymalizacje\n\t\tint inverter =-1;\n\t\t\n\t\ti=0;\n\t\tfloat cena =cenyNaNajblizszySlot.get(i);\n\t\tfloat minimuCena =cena;\t\t\n\t\tfloat minimumValue =inverter*funkcjaRynku2(cena, false,true);\n\t\ti++;\n\t\t\n\t\trynekHistory.kontraktDodajWartoscFunkcjiRynku(funkcjaRynku2(cena, false), minimuCena);\n\t\t\n\t\twhile (i<cenyNaNajblizszySlot.size())\n\t\t{\n\t\t\tcena =cenyNaNajblizszySlot.get(i);\n\t\t\tfloat value =inverter*funkcjaRynku2(cena, false,true);\t\t\t\n\n\t\t\trynekHistory.kontraktDodajWartoscFunkcjiRynku(funkcjaRynku2(cena, false), cena);\n\n\t\t\tif (value<minimumValue)\n\t\t\t{\n\t\t\t\tminimuCena =cena;\n\t\t\t\tminimumValue = value;\n\n\t\t\t}\n\t\t\t\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tif(debug)\n\t\t{\n\t\t\tgetInput(\"03:00 end\");\n\t\t}\n\t\t\n\t\t//getInput(\"znajdzOstatecznaCene - nto finished\");\n\t\treturn minimuCena;\n\t\t\n\t}",
"public boolean Wygrana() {\n\t\tSystem.out.println(\"Wygrana\");\n\t\tif(SprawdzanieWygranej.WygranaNiewolnikow()) {\n\t\t\tZapisOdczyt.setWygranaKlasa(Plansza.getNiewolnikNaPLanszy());\n\t\t\tZapisOdczyt.setWygranaKlasaPopulacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t\n\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getPopulacja() >= Plansza.getArystokrataNaPlanszy().getPopulacja()) {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getRzemieslnikNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getArystokrataNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getArystokrataNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getRzemieslnikNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\tif(SprawdzanieWygranej.WygranaRzemieslnikow()) {\n\t\t\tZapisOdczyt.setWygranaKlasa(Plansza.getRzemieslnikNaPlanszy());\n\t\t\tZapisOdczyt.setWygranaKlasaPopulacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t\n\t\t\tif(Plansza.getNiewolnikNaPLanszy().getPopulacja() >= Plansza.getArystokrataNaPlanszy().getPopulacja()) {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getNiewolnikNaPLanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getArystokrataNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getArystokrataNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getNiewolnikNaPLanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\tif(SprawdzanieWygranej.WygranaArystokracji()) {\n\t\t\tZapisOdczyt.setWygranaKlasa(Plansza.getArystokrataNaPlanszy());\n\t\t\tZapisOdczyt.setWygranaKlasaPopulacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t\n\t\t\tif(Plansza.getNiewolnikNaPLanszy().getPopulacja() >= Plansza.getRzemieslnikNaPlanszy().getPopulacja()) {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getNiewolnikNaPLanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getRzemieslnikNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getRzemieslnikNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getNiewolnikNaPLanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"private Pozycja losujPole(Plansza oPlanszaPrzeciwnika)\n\t\t{\n\t\ttry\n\t\t\t{\n\t\t\tPozycja oWylosowanePole = new Pozycja(2);\n\t\t\tint iWylosowanePole = oRand.nextInt( oPlanszaPrzeciwnika.getIloscNieznanych() ) + 1;\n\t\t\t//obliczenie x i y dla wylosowanego pola\n\t\t\tint iX = 0;\n\t\t\tint iY = 0;\n\t\t\twhile (iWylosowanePole > 0)\n\t\t\t\t{\n\t\t\t\tif (oPlanszaPrzeciwnika.getPole(iX, iY) == PlanszaTypPola.PLANSZA_POLE_PUSTE || oPlanszaPrzeciwnika.getPole(iX, iY) == PlanszaTypPola.PLANSZA_STATEK)\n\t\t\t\t\t--iWylosowanePole;\n\t\t\t\tif (iWylosowanePole > 0)\n\t\t\t\t\t{\n\t\t\t\t\t++iX;\n\t\t\t\t\tif (iX == oPlanszaPrzeciwnika.getSzerokosc())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t++iY;\n\t\t\t\t\t\tiX = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\toWylosowanePole.setX(iX);\n\t\t\toWylosowanePole.setY(iY);\n\t\t\treturn oWylosowanePole;\n\t\t\t}\n\t\tcatch (ParametrException e)\n\t\t\t{\n\t\t\tthrow new ProgramistaException(e);\n\t\t\t}\n\t\t}",
"public void podstawZapiszDaneWielePlikow() throws IOException {\r\n\t\tBufferedWriter bw = null; // tutaj zaSztywno\r\n\t\tString[] wektorDanych;\r\n\t\tString nazwaPlikuWynikowego = null;\r\n\t\tint licznik = 0;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\t++licznik;\r\n\t\t\tnazwaPlikuWynikowego = \"./wynik/wynik\" + Integer.toString(licznik)\r\n\t\t\t\t\t+ \".\" + rozszerzenieSzablonu;\r\n\t\t\tbw = new BufferedWriter(new FileWriter(nazwaPlikuWynikowego));\r\n\t\t\tfor (String[] s : calaZawartoscRozsep) {\r\n\t\t\t\tfor (String wyraz : s) {\r\n\t\t\t\t\tif (wyraz.equals(interpretujWyraz(wyraz)))\r\n\t\t\t\t\t\tfor (int i = 0; i < zmienne.length; ++i) {\r\n\t\t\t\t\t\t\tif (wyraz.equals(zmienne[i])) {\r\n\t\t\t\t\t\t\t\twyraz = wektorDanych[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twyraz = interpretujWyraz(wyraz);\r\n\r\n\t\t\t\t\tbw.write(wyraz);\r\n\t\t\t\t}\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.close();\r\n\t\t}\r\n\t}",
"public void obliczSzanseWykolejenia(Tramwaj tramwaj, Pogoda pogoda, Motorniczy motorniczy, Przystanek przystanek){\r\n RegulyWykolejen regulyWykolejen= new RegulyWykolejen();\r\n this.szansaWykolejenia = pogoda.getRyzyko() + przystanek.getStanTechnicznyPrzystanku() + tramwaj.getStanTechTramwaju() + regulyWykolejen.regulaWiek(motorniczy.getWiek()) + regulyWykolejen.regulaDoswiadczenie(motorniczy.getDoswiadczenie());\r\n }",
"public void ustawPojazdNaPoczatek()\n\t{\n\t\tSciezka pierwszaSc = droga.get(0);\n\t\tfinal double y = 10;\n\t\tpojazd.zmienPozycje(pierwszaSc.getCenterDownX(), y);\n\t}",
"public TrasaPunktowana(String start, String koniec, GrupaGorska gr, PodgrupaGorska pd, StopienTrudnosci st, boolean niepelnosprawny, int pktwej, int pktzej){\n miejscePoczatkowe = start;\n miejsceKoncowe = koniec;\n grupaGorska = gr;\n podgrupaGorska = pd;\n stopienTrudnosci = st;\n czyDlaNiepelnosprawnych = niepelnosprawny;\n punktyZaWejscie = pktwej;\n punktyZaZejscie = pktzej;\n }",
"public void DaneStartowe() {\n\t\tSystem.out.println(\"DaneStartowe\");\n\t\tPlansza.getNiewolnikNaPLanszy().setJedzenie(ZapisOdczyt.getPopulacjaStartowaNiewolnicy());\n\t\tPlansza.getNiewolnikNaPLanszy().setUbrania(ZapisOdczyt.getPopulacjaStartowaNiewolnicy());\n\t\tPlansza.getRzemieslnikNaPlanszy().setMaterialy(ZapisOdczyt.getPopulacjaStartowaRzemieslnicy());\n\t\tPlansza.getRzemieslnikNaPlanszy().setNarzedzia(ZapisOdczyt.getPopulacjaStartowaRzemieslnicy());\n\t\tPlansza.getArystokrataNaPlanszy().setZloto((int) (ZapisOdczyt.getPopulacjaStartowaArystokracja() + ZapisOdczyt.getArystokracjaWiekszaPopulacja()*ZapisOdczyt.getPopulacjaStartowaArystokracja()*0.01));\n\t\tPlansza.getArystokrataNaPlanszy().setTowary((int) (ZapisOdczyt.getPopulacjaStartowaArystokracja() + ZapisOdczyt.getArystokracjaWiekszaPopulacja()*ZapisOdczyt.getPopulacjaStartowaArystokracja()*0.01));\n\t}",
"public void pleitegeierSperren() {\n kontoMap.values().stream()\n .filter(konto -> konto.getKontostand() < 0)\n .forEach(Konto::sperren);\n }",
"private boolean pomjeri(int direkcija) {\t\r\n\t\t/**\r\n\t\t * Atribut predstavlja zadnje polje u smjeru direkcije u redu ili koloni (zavisno od toga da li je\r\n\t\t * pomjeranje horizontalno ili vertikalno).\r\n\t\t */\r\n\t\tint pocetna;\r\n\t\t/**\r\n\t\t * Atribut govori u kojem smjeru se pomjera trenutnaPozicija (smjer je suprotan direkciji poteza).\r\n\t\t */\r\n\t\tint pomak;\r\n\t\t/**\r\n\t\t * Atribut predstavlja prvo prazno polje na koje se moze pomjeriti iduce neprazno polje.\r\n\t\t */\r\n\t\tint trenutnaPozicija;\r\n\t\t/**\r\n\t\t * Atribut se postavlja na true ukoliko dodje do nekog pomjeranja (promjene u odnosu na prijasnje stanje tabele).\r\n\t\t */\r\n\t\tboolean bilo_promjene = false;\r\n\t\t\r\n\t\t// pomjeranje desno i lijevo\r\n\t\tif(direkcija == 1 || direkcija == 2) {\r\n\t\t\tpocetna = 6 - 3*direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 2*direkcija - 3; // pomak je ili -1 ili 1\r\n\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo pomjeranje polja\r\n\t\t\tfor(int i = 0 ; i < 4 ; i++) {\r\n\t\t\t\tfor(int j = pocetna ; j != pocetna + 4 * pomak ; j += pomak) {\r\n\t\t\t\t\tif(tabela[i][trenutnaPozicija] != 0) // ukoliko se na pocetku desi da to polje nije slobodno\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\telse if (tabela[i][j] != 0) { // pomjeri to polje u smjeru direkcija\r\n\t\t\t\t\t\ttabela[i][trenutnaPozicija] = tabela[i][j];\r\n\t\t\t\t\t\ttabela[i][j] = 0;\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// pomjeranje gore i dole\r\n\t\telse {\r\n\t\t\tpocetna = direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 1 - (2*direkcija)/3; // pomak je ili -1 ili 1\r\n\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo pomjeranje polja\r\n\t\t\tfor(int j = 0 ; j < 4 ; j++) {\r\n\t\t\t\tfor(int i = pocetna ; i != pocetna + 4 * pomak ; i += pomak) {\r\n\t\t\t\t\tif(tabela[trenutnaPozicija][j] != 0) // ukoliko se na pocetku desi da to polje nije slobodno\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\telse if (tabela[i][j] != 0) { // pomjeri to polje u smjeru direkcija\r\n\t\t\t\t\t\ttabela[trenutnaPozicija][j] = tabela[i][j];\r\n\t\t\t\t\t\ttabela[i][j] = 0;\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn bilo_promjene;\r\n\t}",
"public void urciStupneVrcholu(){\n\t\tfor(int i = 0;i < vrchP.length; i++){\n\t\t\tstupenVrcholu(vrchP[i].klic);\n\t\t}\n\t}",
"public void rozseparujDokladnie() {\r\n\t\tboolean wSpacjach, wWyrazie;\r\n\t\tString[] liniaRozseparowana = null;\r\n\t\tArrayList<Integer> lista = null;\r\n\t\tArrayList<String> lista2 = null;\r\n\r\n\t\tfor (String linia : calaZawartosc) {\r\n\t\t\twSpacjach = false;\r\n\t\t\twWyrazie = false;\r\n\r\n\t\t\tlista = new ArrayList<Integer>();\r\n\r\n\t\t\tfor (int i = 0; i < linia.length(); ++i) {\r\n\t\t\t\tif (Character.isWhitespace(linia.charAt(i))) {\r\n\t\t\t\t\tif (!wSpacjach) {\r\n\t\t\t\t\t\twSpacjach = true;\r\n\t\t\t\t\t\twWyrazie = false;\r\n\t\t\t\t\t\tlista.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!wWyrazie) {\r\n\t\t\t\t\t\twSpacjach = false;\r\n\t\t\t\t\t\twWyrazie = true;\r\n\t\t\t\t\t\tlista.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlista.add(linia.length());\r\n\r\n\t\t\tlista2 = new ArrayList<String>();\r\n\r\n\t\t\tfor (int i = 0; i < lista.size() - 1; ++i)\r\n\t\t\t\tlista2.add(linia.substring(lista.get(i), lista.get(i + 1)));\r\n\r\n\t\t\tliniaRozseparowana = new String[lista2.size()];\r\n\t\t\tfor (int i = 0; i < liniaRozseparowana.length; ++i) {\r\n\t\t\t\tliniaRozseparowana[i] = lista2.get(i);\r\n\t\t\t}\r\n\r\n\t\t\tcalaZawartoscRozsep.add(liniaRozseparowana);\r\n\t\t}\r\n\t}",
"public boolean souvislost(){\n\t\t\n\t\tif(pole.size() != pocetVrcholu){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t\t\n\t}",
"public void sprawdzBonusy()\n\t{\n\t\tif(aktualnyNumerSciezki != -1)\n\t\t{\n\t\t\tpojazd.sprawdzBonus(droga.get(aktualnyNumerSciezki));\n\t\t\twyswietleniePunktow.setText(\"\" + pojazd.pobierzPunkty());\n\t\t}\n\t}",
"public void zmiana_rozmiaru_okna()\n {\n b.dostosowanie_rozmiaru(getWidth(),getHeight());\n w.dostosowanie_rozmiaru(getWidth(),getHeight());\n\n for (Pilka np : p) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Naboj np : n) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Bonus np : bon) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n\n }",
"public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}",
"public void podstawZapiszDaneJedenPlik() throws IOException {\r\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(\"./wynik/wynik.\"\r\n\t\t\t\t+ rozszerzenieSzablonu));\r\n\t\tString[] wektorDanych;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\tfor (String[] s : calaZawartoscRozsep) {\r\n\t\t\t\tfor (String wyraz : s) {\r\n\t\t\t\t\tif (wyraz.equals(interpretujWyraz(wyraz)))\r\n\t\t\t\t\t\tfor (int i = 0; i < zmienne.length; ++i) {\r\n\t\t\t\t\t\t\tif (wyraz.equals(zmienne[i])) {\r\n\t\t\t\t\t\t\t\twyraz = wektorDanych[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twyraz = interpretujWyraz(wyraz);\r\n\r\n\t\t\t\t\tbw.write(wyraz);\r\n\t\t\t\t}\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.write(\"---------------------------------------------------\");\r\n\t\t\tbw.newLine();\r\n\t\t}\r\n\t\tbw.close();\r\n\t}",
"public static List<StronaWiersza> pobierzStronaWierszazBazy(StronaWiersza stronaWiersza, String wnma, StronaWierszaDAO stronaWierszaDAO, TransakcjaDAO transakcjaDAO) {\r\n List<StronaWiersza> listaStronaWierszazBazy =new ArrayList<>();\r\n// stare = pobiera tylko w walucie dokumentu rozliczeniowego \r\n// listaNowychRozrachunkow = stronaWierszaDAO.findStronaByKontoWnMaWaluta(stronaWiersza.getKonto(), stronaWiersza.getWiersz().getTabelanbp().getWaluta().getSymbolwaluty(), stronaWiersza.getWnma());\r\n// nowe pobiera wszystkie waluty \r\n listaStronaWierszazBazy = stronaWierszaDAO.findStronaByKontoWnMa(stronaWiersza.getKonto(), wnma);\r\n //stronaWierszaDAO.refresh(listaStronaWierszazBazy);\r\n if (listaStronaWierszazBazy != null && !listaStronaWierszazBazy.isEmpty()) {\r\n try {\r\n DateFormat formatter;\r\n formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n String datarozrachunku = null;\r\n if (stronaWiersza.getWiersz().getDataWalutyWiersza() != null) {\r\n datarozrachunku = stronaWiersza.getWiersz().getDokfk().getRok()+\"-\"+stronaWiersza.getWiersz().getDokfk().getMiesiac()+\"-\"+stronaWiersza.getWiersz().getDataWalutyWiersza();\r\n } else {\r\n datarozrachunku = stronaWiersza.getWiersz().getDokfk().getDatadokumentu();\r\n }\r\n Date dataR = formatter.parse(datarozrachunku);\r\n Iterator it = listaStronaWierszazBazy.iterator();\r\n while(it.hasNext()) {\r\n StronaWiersza stronaWierszaZbazy = (StronaWiersza) it.next();\r\n List<Transakcja> zachowaneTransakcje = transakcjaDAO.findByNowaTransakcja(stronaWierszaZbazy);\r\n for (Iterator<Transakcja> itx = stronaWierszaZbazy.getPlatnosci().iterator(); itx.hasNext();) {\r\n Transakcja transakcjazbazy = (Transakcja) itx.next();\r\n if (zachowaneTransakcje == null || zachowaneTransakcje.size() == 0) {\r\n itx.remove();\r\n } else if (!zachowaneTransakcje.contains(transakcjazbazy)) {\r\n itx.remove();\r\n }\r\n }\r\n for (Transakcja ta : zachowaneTransakcje) {\r\n if (!stronaWierszaZbazy.getPlatnosci().contains(ta)) {\r\n stronaWierszaZbazy.getPlatnosci().add(ta);\r\n }\r\n }\r\n if (Z.z(stronaWierszaZbazy.getPozostalo()) <= 0.0) {\r\n it.remove();\r\n } else {\r\n String dataplatnosci;\r\n if (stronaWierszaZbazy.getWiersz().getDataWalutyWiersza() != null) {\r\n dataplatnosci = stronaWierszaZbazy.getWiersz().getDokfk().getRok()+\"-\"+stronaWierszaZbazy.getWiersz().getDokfk().getMiesiac()+\"-\"+stronaWierszaZbazy.getWiersz().getDataWalutyWiersza();\r\n } else {\r\n dataplatnosci = stronaWierszaZbazy.getWiersz().getDokfk().getDatadokumentu();\r\n }\r\n Date dataP = formatter.parse(dataplatnosci);\r\n if (dataP.compareTo(dataR) > 0) {\r\n it.remove();\r\n }\r\n }\r\n }\r\n } catch (ParseException ex) {\r\n E.e(ex);\r\n }\r\n }\r\n List<StronaWiersza> stronywierszaBO = stronaWierszaDAO.findStronaByKontoWnMaBO(stronaWiersza.getKonto(), stronaWiersza.getWnma());\r\n if (stronywierszaBO != null && !stronywierszaBO.isEmpty()) {\r\n Iterator it = stronywierszaBO.iterator();\r\n while(it.hasNext()) {\r\n StronaWiersza p = (StronaWiersza) it.next();\r\n if (Z.z(p.getPozostalo()) <= 0.0) {\r\n it.remove();\r\n }\r\n }\r\n listaStronaWierszazBazy.addAll(stronywierszaBO);\r\n }\r\n if (listaStronaWierszazBazy == null) {\r\n return (new ArrayList<>());\r\n }\r\n return listaStronaWierszazBazy;\r\n //pobrano wiersze - a teraz z nich robie rozrachunki\r\n }",
"public void RuchyKlas() {\n\t\tSystem.out.println(\"RuchyKlas\");\n\t\tPlansza.getNiewolnikNaPLanszy().Ruch();\n\t\tPlansza.getRzemieslnikNaPlanszy().Ruch();\n\t\tPlansza.getArystokrataNaPlanszy().Ruch();\n\t}",
"private boolean spoji(int direkcija) {\r\n\t\tint pocetna;\r\n\t\tint pomak;\r\n\t\tboolean spojeno = false;\r\n\t\tboolean bilo_promjene = false;\r\n\t\t\r\n\t\t// pomjeranje desno i lijevo\r\n\t\tif(direkcija == 1 || direkcija == 2) {\r\n\t\t\tpocetna = 6 - 3*direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 2*direkcija - 3; // pomak je ili -1 ili 1\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo spajanje polja\r\n\t\t\tfor(int i = 0 ; i < 4 ; i++)\r\n\t\t\t\tfor(int j = pocetna ; j != pocetna + 3 * pomak ; j += pomak)\r\n\t\t\t\t\tif(spojeno)\r\n\t\t\t\t\t\tspojeno = false;\r\n\t\t\t\t\telse if(tabela[i][j] != 0 && tabela[i][j] == tabela[i][j + pomak]) {\r\n\t\t\t\t\t\ttabela[i][j] = 2 * tabela[i][j];\r\n\t\t\t\t\t\tif(!igrajPoslijePobjede && tabela[i][j] == 8) // ako je igrac pobijedio (po prvi put, tj. nije bio nastavak igre)\r\n\t\t\t\t\t\t\tpobjeda = true;\r\n\t\t\t\t\t\ttabela[i][j + pomak] = 0;\r\n\t\t\t\t\t\tspojeno = true;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t\tbroj_slobodnih++;\r\n\t\t\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// pomjeranje gore i dole\r\n\t\telse {\r\n\t\t\tpocetna = direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 1 - (2*direkcija)/3; // pomak je ili -1 ili 1\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo spajanje polja\r\n\t\t\tfor(int j = 0 ; j < 4 ; j++) {\r\n\t\t\t\tfor(int i = pocetna ; i != pocetna + 3 * pomak ; i += pomak)\r\n\t\t\t\t\tif(spojeno)\r\n\t\t\t\t\t\tspojeno = false;\r\n\t\t\t\t\telse if(tabela[i][j] != 0 && tabela[i][j] == tabela[i + pomak][j]) {\r\n\t\t\t\t\t\ttabela[i][j] = 2 * tabela[i][j];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!igrajPoslijePobjede && tabela[i][j] == 8) // ako je igrac pobijedio (po prvi put, tj. nije bio nastavak igre)\r\n\t\t\t\t\t\t\tpobjeda = true;\r\n\t\t\t\t\t\ttabela[i + pomak][j] = 0;\r\n\t\t\t\t\t\tspojeno = true;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t\tbroj_slobodnih++;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn bilo_promjene;\r\n\t}",
"public void testtraduciraOSM()\n\t\t{\n\t\t\tTipoNodoLeisure tipo1 = new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.6\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo2= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.7\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo3= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.8\")); //$NON-NLS-1$\n\t\t\tif (tipo1.traduciraOSM(tipo1.getValorTipo())!=tipo1.traduciraOSM(tipo1.getValorTipo()))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.9\")); //$NON-NLS-1$\n\t\t\tif (tipo1.traduciraOSM(tipo1.getValorTipo())!=tipo2.traduciraOSM(tipo2.getValorTipo()))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.10\")); //$NON-NLS-1$\n\t\t\tif (tipo1.traduciraOSM(tipo1.getValorTipo())==tipo3.traduciraOSM(tipo3.getValorTipo()))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.11\")); //$NON-NLS-1$\n\t\t}",
"private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}",
"float znajdzOstatecznaCene2()\n\t{\n\t\tArrayList<Float> cenyNaNajblizszySlot =znajdzOstatecznaCeneCenaNaNajblizszeSloty();\n\t\t\n\t\tfloat minimuCena =-1;\n\t\t\n\t\t//Stworzenie cen w raportowaniu\n\t\tint i=0;\n\t\twhile (i<cenyNaNajblizszySlot.size())\n\t\t{\n\t\t\trynekHistory.kontraktDodajCene(cenyNaNajblizszySlot.get(i));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\t//wyznacz liste ktora ma najwieksza wartosc funkcji rynkowej\n\t\t\n\t\tArrayList<Float> cenyZNajwiekszaFunkcjaRynkowa = new ArrayList<>();\n\t\tfloat maximumFunkcjiRynkowej=-1;\n\t\t\n\t\ti=0;\n\t\twhile (i<cenyNaNajblizszySlot.size())\n\t\t{\n\t\t\tfloat cena =cenyNaNajblizszySlot.get(i);\n\t\t\tfloat value =funkcjaRynku2(cena, false,true);\t\t\t\n\n\t\t\trynekHistory.kontraktDodajWartoscFunkcjiRynku(value, cena);\n\n\t\t\t\n\t\t\tif (value>maximumFunkcjiRynkowej)\n\t\t\t{\n\t\t\t\tcenyZNajwiekszaFunkcjaRynkowa.clear();\n\t\t\t\tcenyZNajwiekszaFunkcjaRynkowa.add(cena);\n\t\t\t\tmaximumFunkcjiRynkowej = value;\n\t\t\t}\n\t\t\telse if (value==maximumFunkcjiRynkowej)\n\t\t\t{\n\t\t\t\tcenyZNajwiekszaFunkcjaRynkowa.add(cena);\n\t\t\t} \n\t\t\t\n\t\t\t\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tminimuCena = cenyZNajwiekszaFunkcjaRynkowa.get(cenyZNajwiekszaFunkcjaRynkowa.size()/2);\n\t\t\n\t\treturn minimuCena;\n\n\t}",
"boolean sprawdz_przegrana(){\n for(int i=0;i<figura_jakas.getWspolzedne_figorki().size();i++)\n if(sprawdz_kolizje_z_innymi_klockami(0))\n return true;\n return false;\n }",
"private void zmienne_poziomu(int poziom)\n {\n liczba_zyc =Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc\"));\n liczba_naboi=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_naboi\"));\n liczba_zyc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc_wroga\"));\n liczba_pilek=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_pilek\"));\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_predkosc_wroga\"));\n bonusy_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_bonusy_poziomu\"));\n rozmiar_pilki=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_rozmiar_pilki\"));\n zmiana_ruchu_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_zmiana_ruchu_wroga\"));\n czas_gry=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_czas_gry\"));\n }",
"ArrayList<Float> pierwszaPredykcjaNormal()\n\t{\n\t\tif (Stale.cenyZGeneratora)\n\t\t{\n\t\t\tArrayList<Float> listaSumarycznejGeneracji = listaProsumentowWrap.getListaSumarycznejGeneracji(LokalneCentrum.getTimeIndex());\n\t\t\tArrayList<Float> listaSumarycznejKonsumpcji = listaProsumentowWrap.getListaSumarycznejKonsumpcji(LokalneCentrum.getTimeIndex());\n\n\t\t\treturn predictPrice(listaSumarycznejGeneracji,listaSumarycznejKonsumpcji);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tArrayList<Float> proposedPriceVector = pierwszaPredykcjaWezPredykcjeZListy();\n\t\t\t\n\t\t\t//jezeli brakuje elementow w plikyu do pelnej predykcji an horyzont czasowy to uuzplenij dnaymi z modelu\n\t\t\tif (proposedPriceVector.size()<Stale.horyzontCzasowy)\n\t\t\t{\n\t\t\t\tArrayList<Float> listaSumarycznejGeneracji = listaProsumentowWrap.getListaSumarycznejGeneracji(LokalneCentrum.getTimeIndex());\n\t\t\t\tArrayList<Float> listaSumarycznejKonsumpcji = listaProsumentowWrap.getListaSumarycznejKonsumpcji(LokalneCentrum.getTimeIndex());\n\t\t\t\tArrayList<Float> cenyZmodelu =predictPrice(listaSumarycznejGeneracji,listaSumarycznejKonsumpcji);\n\t\t\t\t\n\t\t\t\tproposedPriceVector = polaczListy(proposedPriceVector, cenyZmodelu);\n\t\t\t\t\n\t\t\t\tif (proposedPriceVector.size()!=Stale.horyzontCzasowy)\n\t\t\t\t{\n\t\t\t\t\tgetInput(\"ERROR in pierwszaPredykcjaNormal\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn proposedPriceVector;\n\t\t\t//podaj predykcje taka jak wynika z podanego pliku\n\t\t\t//getInput(\"Fill this part out - wczytaj rpedykcje z pliku!\");\n\t\t\t//return new ArrayList<Float>();\n\t\t}\n\t}",
"public static void main(String[] args) {\n System.out.println(\"Witam w grze papier kamień nożyce.\");\n // tworzymy obiekt scanera\n Scanner scanner = new Scanner(System.in);\n\n\n // tworzymy obiekt random\n Random generator = new Random();\n // tworzymy pętle while\n\n\n while (true) {\n System.out.println(\"Wybierz ruch: \" + \"P = papier || \" + \"K = kamień || \"\n + \"N = nożyce || \" + \"W = wyjście\");\n // pobieramy ruch od użytkownika\n String ruchUżytkownika = scanner.nextLine();\n ruchUżytkownika = ruchUżytkownika.toUpperCase();\n // tworzymy ruch komputera\n int intKomputera = generator.nextInt(3);\n String ruchKomputera = \"\";\n if (intKomputera == 0) {\n ruchKomputera = \"P\";\n } else if ( intKomputera== 1) {\n ruchKomputera = \"K\";\n } else if ( intKomputera== 2) {\n ruchKomputera = \"N\";\n }\n drukowanieruchu(ruchUżytkownika, ruchKomputera);\n if (ruchUżytkownika.equals(ruchKomputera)) {\n\n System.out.println(\"Wynik: Remis\");\n\n } else if (ruchUżytkownika.equals(\"K\")) {\n if (ruchKomputera.equals(\"N\"))\n System.out.println(\"Wygrałeś!\");\n else if (ruchKomputera.equals(\"P\"))\n System.out.println(\"Przegrałeś!\");\n } else if (ruchUżytkownika.equals(\"P\")) {\n if (ruchKomputera.equals(\"N\"))\n System.out.println(\"Przegrałeś!\");\n else if (ruchKomputera.equals(\"K\"))\n System.out.println(\"Wygrałeś!\");\n } else if (ruchUżytkownika.equals(\"N\")) {\n if (ruchKomputera.equals(\"P\"))\n System.out.println(\"Wygrałeś\");\n else if (ruchKomputera.equals(\"K\"))\n System.out.println(\"Przegrałeś\");\n } else {\n System.out.println(\"Dzięki za gre !\");\n break;\n }\n }\n\n\n }",
"public void dodaj(String ime, int starost, int pol)\n {\n // pre svega nam je potrebno da pronadjemo odgovarajuce mesto\n // za naseg novog sticenika, zbog toga sto oni moraju biti sortirani\n //\n // pre toga, proveravamo da li on vec postoji\n if(postoji(ime))\n return;\n\n Sticenik s = new Sticenik(ime, starost, pol);\n\n // prvo resavamo trivijalan slucaj, kada je lista prazna\n if(this.head == null)\n {\n s.next = this.head;\n this.head = s;\n return; // izlazimo iz metode, jer nema potrebe da proveravamo dalje\n }\n\n // posebno treba proveriti, u slucaju kada je novi sticenik stariji od prvog (head)\n // u listi\n // ovo radimo iz razloga, sto moramo da pomeramo head tj uvek dodajemo na pocetak\n if(this.head.starost >= starost)\n {\n s.next = this.head;\n this.head = s;\n return;\n }\n\n // u slucaju da se nas sticenik nalazi negde u sredini liste,\n // moramo da znamo gde je tacno, pa stoga pamtimo prethodnika\n // da bi mogli da ga uvezemo na odgovarajuce mesto\n Sticenik t = this.head; // trenutni\n Sticenik p = null; // prethodni\n\n // sada prolazimo kroz listu while petljom, dok ne naidjemo na sticenika koji je stariji od naseg\n // kada ga pronadjemo, hocemo da dodamo novog sticenika izmedju njega i prethodnika\n while(t.next != null && t.starost <= starost)\n {\n p = t;\n t = t.next;\n }\n\n // sada treba da proverimo da li je t == null\n // ako nije uvezujemo sticenika izmedju dva, a ako jeste\n // onda samo dodajemo sticenika na kraj\n if(t.next != null)\n {\n System.out.println(\"t: \" + t.next);\n p.next = s;\n s.next = t;\n }\n else\n {\n s.next = t.next;\n t.next = s;\n }\n }",
"public boolean czyKolizja()\n\t{\n\t\tif(aktualnyNumerSciezki == -1)\n\t\t\treturn false;\n\t\tSciezka s = droga.get(aktualnyNumerSciezki);\n\t\treturn s.czyKolizja(pojazd);\t\n\t}",
"public void uradiPotez(int direkcija) {\r\n\t\tboolean promjena1 = pomjeri(direkcija);\r\n\t\tboolean promjena2 = spoji(direkcija);\r\n\t\tif(promjena1 || promjena2) { //ukoliko nije bilo promjene ni u pomjeranju ni spajanju, ne generise novo polje\r\n\t\t\tpomjeri(direkcija);\r\n\t\t\tgenerisiPolje();\r\n\t\t}\r\n\t}",
"public void rozseparujWytnijBialeZnaki() {\r\n\t\tString[] bufor;\r\n\t\tString[] tablicaWynik;\r\n\t\tint licznik;\r\n\t\tint m;\r\n\t\tfor (String s : calaZawartosc) {\r\n\t\t\tbufor = s.split(\"[\\\\s]+\");\r\n\t\t\tlicznik = 0;\r\n\r\n\t\t\tfor (int i = 0; i < bufor.length; ++i)\r\n\t\t\t\tif (!bufor[i].equals(\"\")) {\r\n\t\t\t\t\t++licznik;\r\n\t\t\t\t}\r\n\r\n\t\t\ttablicaWynik = new String[2 * licznik];\r\n\r\n\t\t\tm = 0;\r\n\r\n\t\t\tfor (String str : bufor)\r\n\t\t\t\tif (!str.equals(\"\")) {\r\n\t\t\t\t\ttablicaWynik[m] = str;\r\n\t\t\t\t\ttablicaWynik[m + 1] = \" \";\r\n\t\t\t\t\t++m;\r\n\t\t\t\t\t++m;\r\n\t\t\t\t}\r\n\r\n\t\t\tcalaZawartoscRozsep.add(tablicaWynik);\r\n\t\t}\r\n\t}",
"public void zpracujObjednavky()\n\t{\n\t\tint idtmp = 0;\n\t\tfloat delkaCesty = 0;\n\t\t\n\t\tif (this.objednavky.isEmpty())\n\t\t{\n\t\t\treturn ;\n\t\t}\n\t\t\n\t\tNakladak nakl = (Nakladak) getVolneAuto();\n\t\t\n\t\tnakl.poloha[0] = this.poloha[0];\n\t\tnakl.poloha[1] = this.poloha[1];\n\t\tObjednavka ob = this.objednavky.remove();\n\n\t\t/*System.out.println();\n\t\tSystem.out.println(\"Objednavka hospody:\" + ob.id + \" se zpracuje pres trasu: \");\n\t\t */\n\t\tdelkaCesty += vyberCestu(this.id, ob.id, nakl);\n\t\t\n\t\twhile(nakl.pridejObjednavku(ob))\n\t\t{\n\t\t\tidtmp = ob.id;\n\t\t\t\n\t\t\tob = vyberObjednavku(ob.id);\n\t\t\tif (ob == null)\n\t\t\t{\n\t\t\t\tob=nakl.objednavky.getLast();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tobjednavky.remove(ob);\n\t\t\t\n\t\t\tdelkaCesty += vyberCestu(idtmp, ob.id, nakl);\n\t\t\t\n\t\t\tif((nakl.objem > 24)||(13-Simulator.getCas().hodina)*(nakl.RYCHLOST) + 100 < delkaCesty){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t/*\n\t\t\tif((Simulator.getCas().hodina > 12) && (delkaCesty > 80) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif((Simulator.getCas().hodina > 9) && (delkaCesty > 130) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}*/\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//cesta zpatky\n\t\tvyberCestu(ob.id, this.id, nakl);\n\t\tif (nakl.objem >= 1)\n\t\t{\n\t\t\tnakl.kDispozici = false;\n\t\t\tnakl.jede = true;\n\t\t\t//vytvoreni nove polozky seznamu pro statistiku\n\t\t\tnakl.novaStatCesta();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnakl.resetCesta();\n\t\t}\n\t}",
"private void dodajEpsilonPrijelaz(int pocetno, int sljedece) {\n String key = pocetno + \",$$\";\n if (!prijelazi.containsKey(key)) {\n prijelazi.put(key, new Integer(sljedece).toString());\n } else {\n String value = prijelazi.get(key) + \",\" + new Integer(sljedece).toString();\n prijelazi.put(key, value);\n }\n }",
"public void provocarEvolucion(Tribu tribuJugador, Tribu tribuDerrotada){\r\n System.out.println(\"\\n\");\r\n System.out.println(\"-------------------Fase de evolución ----------------------\");\r\n int indiceAtributo;\r\n int indiceAtributo2;\r\n double golpeViejo = determinarGolpe(tribuJugador);\r\n for(int i = 1; i <= 10 ; i++){\r\n System.out.println(\"Iteración número: \" + i);\r\n indiceAtributo = (int)(Math.random() * 8);\r\n indiceAtributo2 = (int)(Math.random() * 8);\r\n String nombreAtributo1 = determinarNombrePosicion(indiceAtributo);\r\n String nombreAtributo2 = determinarNombrePosicion(indiceAtributo2);\r\n if((tribuJugador.getArray()[indiceAtributo] < tribuDerrotada.getArray()[indiceAtributo] \r\n && (tribuJugador.getArray()[indiceAtributo2] < tribuDerrotada.getArray()[indiceAtributo2]))){\r\n System.out.println(\"Se cambió el atributo \" + nombreAtributo1 + \" de la tribu del jugador porque\"\r\n + \" el valor era \" + tribuJugador.getArray()[indiceAtributo] + \" y el de la tribu enemeiga era de \"\r\n + tribuDerrotada.getArray()[indiceAtributo] + \" esto permite hacer más fuerte la tribu del jugador.\");\r\n \r\n tribuJugador.getArray()[indiceAtributo] = tribuDerrotada.getArray()[indiceAtributo];\r\n \r\n System.out.println(\"Se cambió el atributo \" + nombreAtributo2 + \" de la tribu del jugador porque\"\r\n + \" el valor era \" + tribuJugador.getArray()[indiceAtributo2] + \" y el de la tribu enemeiga era de \"\r\n + tribuDerrotada.getArray()[indiceAtributo2] + \" esto permite hacer más fuerte la tribu del jugador.\");\r\n \r\n tribuJugador.getArray()[indiceAtributo2] = tribuDerrotada.getArray()[indiceAtributo2];\r\n }\r\n }\r\n double golpeNuevo = determinarGolpe(tribuJugador);\r\n if(golpeNuevo > golpeViejo){\r\n tribus.replace(tribuJugador.getNombre(), determinarGolpe(tribuJugador));\r\n System.out.println(\"\\nTribu evolucionada\");\r\n imprimirAtributos(tribuJugador);\r\n System.out.println(\"\\n\");\r\n System.out.println(tribus);\r\n }\r\n else{\r\n System.out.println(\"\\nTribu sin evolucionar\");\r\n System.out.println(\"La tribu no evolucionó porque no se encontraron atributos\"\r\n + \" que permitiesen crecer su golpe\");\r\n imprimirAtributos(tribuJugador);\r\n System.out.println(\"\\n\");\r\n System.out.println(tribus);\r\n }\r\n }",
"private void wczytaj_nowy_poziom(Graphics g)\n {\n while (((int) Math.round(czas_gry) == 0) || (liczba_zyc_wroga == 0)) {\n try{\n poziom++;\n liczba_punktow += punkty_poziomu;\n zmienne_poziomu(poziom);\n g.setColor(Color.BLACK);\n g.drawString(\"NOWY POZIOM: \" + poziom, (int) Math.round(getWidth() * 0.5), (int) Math.round(getHeight() * 0.5));\n gra = false;\n } catch (Exception a){\n informacja_dla_obserwatora(new Zdarzenie_panelu_gry(\"koniec_poziomow\",liczba_punktow));\n }\n }\n }",
"@org.junit.Test\n public void testObliczOdsetkiLokataRoczna() {\n \n OdsetkiStateLokataRoczna odsetki = injector.getInstance(OdsetkiStateLokataRoczna.class);\n BigDecimal stanKonta = new BigDecimal(1000);\n BigDecimal expResult = new BigDecimal(\"20.00\");\n \n LokataRoczna lokata = injector.getInstance(LokataRoczna.class);\n \n BigDecimal result = odsetki.obliczOdsetki(stanKonta, lokata);\n\n assertEquals(expResult, result);\n }",
"public Solicitud obtenerSolicitudDevolucion(DTOSolicitudValidacion dtoSolicitud)\n throws MareException{\n UtilidadesLog.info(\"DAOSolicitudes.obtenerSolicitudDevolucion(DTOSolicitudValidacion dtoSolicitud):Entrada\");\n Solicitud solicitudDevolucion = null;\n DTOSolicitudValidacion dtoDevolucionPeriodoOriginal = new DTOSolicitudValidacion();\n dtoDevolucionPeriodoOriginal.setOidSolicitud( dtoSolicitud.getOidSolicitud() );\n \n //Este metodo modificara el oidSolicitud y el periodo de la solicitud de devolucion al de la solicitud devuelta.\n this.rellenarDevoluciones( dtoDevolucionPeriodoOriginal );\n \n if( ! dtoDevolucionPeriodoOriginal.getOidSolicitud().\n equals( dtoSolicitud.getOidSolicitud() ) ){\n //Si son distintos quiere decir que es una devolucion de una solicitud que genero puntos. \n \n dtoDevolucionPeriodoOriginal.setFechaProceso( dtoSolicitud.getFechaProceso() );\n dtoDevolucionPeriodoOriginal.setGP( dtoSolicitud.getGP() );\n dtoDevolucionPeriodoOriginal.setIndNoConso( dtoSolicitud.getIndNoConso() );\n dtoDevolucionPeriodoOriginal.setIndOrdenCompra( dtoSolicitud.getIndOrdenCompra() );\n dtoDevolucionPeriodoOriginal.setIndPedGTZona( dtoSolicitud.getIndPedGTZona() );\n dtoDevolucionPeriodoOriginal.setIndSimulacion( dtoSolicitud.getIndSimulacion() );\n dtoDevolucionPeriodoOriginal.setIndUnionSolicitud( dtoSolicitud.getIndUnionSolicitud() );\n dtoDevolucionPeriodoOriginal.setNumDecimales( dtoSolicitud.getNumDecimales());\n dtoDevolucionPeriodoOriginal.setNumSolicitud( dtoSolicitud.getNumSolicitud() );\n dtoDevolucionPeriodoOriginal.setOidAcceso( dtoSolicitud.getOidAcceso() );\n dtoDevolucionPeriodoOriginal.setOidCanal( dtoSolicitud.getOidCanal() );\n dtoDevolucionPeriodoOriginal.setOidCliente( dtoSolicitud.getOidCliente() );\n dtoDevolucionPeriodoOriginal.setOidMarca( dtoSolicitud.getOidMarca() );\n dtoDevolucionPeriodoOriginal.setOidModulo( dtoSolicitud.getOidModulo() );\n dtoDevolucionPeriodoOriginal.setOidMoneda( dtoSolicitud.getOidMoneda() );\n //BELC300024526 - gPineda - 29/11/2006\n //dtoDevolucionPeriodoOriginal.setOidPeriodo( dtoSolicitud.getOidPeriodo() );\n dtoDevolucionPeriodoOriginal.setOidSolicitud( dtoSolicitud.getOidSolicitud() );\n dtoDevolucionPeriodoOriginal.setOidSubAcceso( dtoSolicitud.getOidSubAcceso() );\n dtoDevolucionPeriodoOriginal.setOidTipoSolPais( dtoSolicitud.getOidTipoSolPais() ); \n dtoDevolucionPeriodoOriginal.setOrden( dtoSolicitud.getOrden() ); \n dtoDevolucionPeriodoOriginal.setOrdenMonitor( dtoSolicitud.getOrdenMonitor() );\n dtoDevolucionPeriodoOriginal.setProceso( dtoSolicitud.getProceso() );\n dtoDevolucionPeriodoOriginal.setTipoCambio( dtoSolicitud.getTipoCambio() );\n dtoDevolucionPeriodoOriginal.setUbigeo( dtoSolicitud.getUbigeo() );\n dtoDevolucionPeriodoOriginal.setZona( dtoSolicitud.getZona() );\n //cvalenzu - 7/12/2006 - faltaba el pais\n dtoDevolucionPeriodoOriginal.setOidPais(dtoSolicitud.getOidPais());\n //cvalenzu - 7/12/2006 - faltaba el pais\n \n solicitudDevolucion = this.obtenerSolicitud( dtoDevolucionPeriodoOriginal );\n }\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 24/03/2010 \n UtilidadesLog.debug(\"solicitudDevolucion: \"+ solicitudDevolucion );\n \n UtilidadesLog.info(\"DAOSolicitudes.obtenerSolicitudDevolucion(DTOSolicitudValidacion dtoSolicitud):Salida\"); \n return solicitudDevolucion;\n }",
"public void dodajPrijelaz(int pocetno, int sljedece, String s) {\n String key = pocetno + \",\" + s;\n if (!prijelazi.containsKey(key)) {\n prijelazi.put(key, new Integer(sljedece).toString());\n } else {\n String value = prijelazi.get(key) + \",\" + Integer.toString(sljedece);\n prijelazi.put(key, value);\n }\n }",
"@Test\r\n\tpublic void testGetPeliBalorazioNormalizatuak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == -2.75);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.25);\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 0);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.75);\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 1.75);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t\r\n\t\t// Normalizazioa Zsore erabiliz egiten dugu\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Zscore());\r\n\t\t\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.0000\");\r\n\t\t\r\n\t\t// p1 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(df.format(bek.getBalioa(e1.getId())).equals(\"1,2247\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\"-1,6398\"));\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(df.format(bek.getBalioa(e1.getId())).equals(\"-1,2247\"));\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 1);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\",1491\"));\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 0);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == -1);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\",4472\"));\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\"1,0435\"));\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Batezbestekoa());\r\n\t\t\r\n\t}",
"public void w_plik (BufferedWriter wpl)\n\t{\n\ttry{\t\n\t\twpl.write(imienaz+\"\\n\");\n\t\twpl.write(rodzaj+\"\\n\");\n\t\twpl.write(Integer.toString(numer)+\"\\n\");\n\t\twpl.write(Integer.toString(powierzchnia)+\"\\n\");\n\t\twpl.write(Integer.toString(wartosc)+\"\\n\");\n\t\tif (altanka == true ) wpl.write(\"1\"+\"\\n\"); else wpl.write(\"0\"+\"\\n\");\n\t\tif (studnia == true ) wpl.write(\"1\"+\"\\n\"); else wpl.write(\"0\"+\"\\n\");\n\t\t}\n\tcatch (IOException e){System.out.println(\"Blad we/wy\");};\n\t}",
"public ArrayList<ArrayList<Float>> predykcjaCenNaRynkuLokalnym()\n\t{\n\t\tfloat cenaMinimalnaNaRynkuLokalnym= Stale.cenaMinimalnaNaRynkuLokalnym;\n\t\tfloat cenaMaksymalnaNaRynkuLokalnym = Stale.cenaDystrybutoraZewnetrznego;\n\t\t\n\t\t//tu siedzi to rozroznienie czy z generatora czy predykcja z poprzendiej symualcji\n\t\tArrayList<Float> normalnaPredykcja = pierwszaPredykcja();\n\t\tpriceVectorsList.add(normalnaPredykcja);\n\t\t\n\t\tArrayList<ArrayList<Float>> listaPredykcjiCen= new ArrayList<ArrayList<Float>>();\n\t\t\n\t\t\n\t\t//nizsza \n\t\tArrayList<Float> predykcjaZNizszaCena=new ArrayList<Float>(normalnaPredykcja);\t\t\n\t\tArrayList<Float> predykcjaZWyzszaCena=new ArrayList<Float>(normalnaPredykcja);\n\t\t\n\t\tfloat nizszaCena =(normalnaPredykcja.get(0)+cenaMinimalnaNaRynkuLokalnym)/2 ;\n\t\tfloat wyzszaCena=(normalnaPredykcja.get(0)+cenaMaksymalnaNaRynkuLokalnym)/2;\n\t\t\n\t\tpredykcjaZNizszaCena.set(0, nizszaCena);\n\t\tpredykcjaZWyzszaCena.set(0, wyzszaCena);\n\t\t\n\t\tlistaPredykcjiCen.add(predykcjaZNizszaCena);\n\t\tlistaPredykcjiCen.add(normalnaPredykcja);\n\t\tlistaPredykcjiCen.add(predykcjaZWyzszaCena);\n\t\t\n\t\t//reporting - zapisz zadeklarowan cene\n\t\trynekHistory.dodajZadeklarowanaCene(normalnaPredykcja.get(0));\n\t\t\n\t\t\n\t\treturn listaPredykcjiCen;\t\n\t}",
"@Override\n public ArrayList<String> kaikkiMahdollisetSiirrot(int x, int y, Ruutu[][] ruudukko) {\n ArrayList<String> siirrot = new ArrayList<>();\n if (x - 1 >= 0 && y - 2 >= 0 && (ruudukko[x - 1][y - 2].getNappula() == null || !onkoSamaVari(ruudukko[x - 1][y - 2].getNappula()))) {\n siirrot.add(\"\" + (x - 1) + (y - 2));\n }\n if (x - 2 >= 0 && y - 1 >= 0 && (ruudukko[x - 2][y - 1].getNappula() == null || !onkoSamaVari(ruudukko[x - 2][y - 1].getNappula()))) {\n siirrot.add(\"\" + (x - 2) + (y - 1));\n }\n if (x - 1 >= 0 && y + 2 <= 7 && (ruudukko[x - 1][y + 2].getNappula() == null || !onkoSamaVari(ruudukko[x - 1][y + 2].getNappula()))) {\n siirrot.add(\"\" + (x - 1) + (y + 2));\n }\n if (x - 2 >= 0 && y + 1 <= 7 && (ruudukko[x - 2][y + 1].getNappula() == null || !onkoSamaVari(ruudukko[x - 2][y + 1].getNappula()))) {\n siirrot.add(\"\" + (x - 2) + (y + 1));\n }\n if (x + 1 <= 7 && y - 2 >= 0 && (ruudukko[x + 1][y - 2].getNappula() == null || !onkoSamaVari(ruudukko[x + 1][y - 2].getNappula()))) {\n siirrot.add(\"\" + (x + 1) + (y - 2));\n }\n if (x + 2 <= 7 && y - 1 >= 0 && (ruudukko[x + 2][y - 1].getNappula() == null || !onkoSamaVari(ruudukko[x + 2][y - 1].getNappula()))) {\n siirrot.add(\"\" + (x + 2) + (y - 1));\n }\n if (x + 1 <= 7 && y + 2 <= 7 && (ruudukko[x + 1][y + 2].getNappula() == null || !onkoSamaVari(ruudukko[x + 1][y + 2].getNappula()))) {\n siirrot.add(\"\" + (x + 1) + (y + 2));\n }\n if (x + 2 <= 7 && y + 1 <= 7 && (ruudukko[x + 2][y + 1].getNappula() == null || !onkoSamaVari(ruudukko[x + 2][y + 1].getNappula()))) {\n siirrot.add(\"\" + (x + 2) + (y + 1));\n }\n return siirrot;\n }",
"public void dodajZmijuPocetak() {\n\t\tthis.zmija.add(new Cvor(1,4));\n\t\tthis.zmija.add(new Cvor(1,3));\n\t\tthis.zmija.add(new Cvor(1,2));\n\t\t\n\t\tint i = this.zmija.get(0).i;\n\t\tint j = this.zmija.get(0).j;\n\t\tthis.tabla[i][j] = 'O';\n\t\t\n\t\tfor (int k = 1; k < this.zmija.size(); k++) {\n\t\t\ti = this.zmija.get(k).i;\n\t\t\tj = this.zmija.get(k).j;\n\t\t\tthis.tabla[i][j] = 'o';\n\t\t}\t\n\t}",
"private int obliczDowoz() {\n int x=this.klient.getX();\n int y=this.klient.getY();\n double odl=Math.sqrt((Math.pow((x-189),2))+(Math.pow((y-189),2)));\n int kilometry=(int)(odl*0.5); //50 gr za kilometr\n return kilometry;\n }",
"ArrayList<Float> pierwszaPredykcja()\n\t{\n\t\tif (Stale.scenariusz<100)\n\t\t{\n\t\t\treturn pierwszaPredykcjaNormal();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//dla scenariusza testowego cnea predykcji jest ustawiana na 0.30\n\t\t\tArrayList<Float> L1 = new ArrayList<>();\n\t\t\tL1.add(0.30f);\n\t\t\treturn L1;\n\t\t}\n\t}",
"public boolean borraLocalidad(String p){\r\n boolean devolver = false;\r\n Localidad2 key = null;\r\n TreeSet<Localidad2> cercanas = new TreeSet<Localidad2>(); //Value\r\n\t\tTreeSet<Localidad2> borrar = new TreeSet<Localidad2>();\r\n\t\tTreeSet<Localidad2> borrar2 = new TreeSet<Localidad2>();\r\n\t\tfor (Map.Entry<Localidad2, TreeSet<Localidad2>> entrada : ti.entrySet()) {\r\n\t key = entrada.getKey();\r\n\t if(p.equals(key.getNombre())){\r\n\t \tborrar.add(key);\r\n\t \tfor (Map.Entry<Localidad2, TreeSet<Localidad2>> entrada2 : ti.entrySet()) {\r\n\t \t\tcercanas = entrada2.getValue();\r\n\t\t \tfor(Localidad2 loc: cercanas){\r\n\t\t \t\tif(p.equals(loc.getNombre())){\r\n\t\t \t\t\tborrar2.add(loc);\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t \tIterator<Localidad2> it2 = borrar2.iterator();\r\n\t\t\t\t\twhile(it2.hasNext()) {\r\n\t\t\t\t\t\tcercanas.remove(it2.next());\r\n\t\t\t\t\t}\r\n\t \t}\r\n\t \tdevolver = true;\r\n\t }\r\n\t \r\n\t \t}\r\n\t\tIterator<Localidad2> it = borrar.iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tti.remove(it.next());\r\n\t\t}\r\n\t\treturn devolver;\r\n }",
"public JLabel etykietaWyswietlaniaPunktow()\n\t{\n\t\treturn wyswietleniePunktow;\n\t}",
"public static void trazenjeVozila(Iznajmljivac o) {\n\t\tLocalDate pocetniDatum = UtillMethod.unosDatum(\"pocetni\");\n\t\tLocalDate krajnjiDatum = UtillMethod.unosDatum(\"krajnji\");\n\t\tSystem.out.println(\"------------------------------------\");\n\t\tSystem.out.println(\"Provera dostupnosti vozila u toku...\\n\");\n\t\tArrayList<Vozilo> dostupnaVoz = new ArrayList<Vozilo>();\n\t\tint i = 0;\n\t\tfor (Vozilo v : Main.getVozilaAll()) {\n\t\t\tif (!postojiLiRezervacija(v, pocetniDatum, krajnjiDatum) && !v.isVozObrisano()) {\n\t\t\t\tSystem.out.println(i + \"-\" + v.getVrstaVozila() + \"-\" + \"Registarski broj\" + \"-\" + v.getRegBR()\n\t\t\t\t\t\t+ \"-Potrosnja na 100km-\" + v.getPotrosnja100() + \"litara\");\n\t\t\t\ti++;\n\t\t\t\tdostupnaVoz.add(v);\n\t\t\t}\n\t\t}\n\t\tif (i > 0) {\n\t\t\tSystem.out.println(\"------------------------------------------------\");\n\t\t\tSystem.out.println(\"Ukucajte kilometrazu koju planirate da predjete:\");\n\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\tint km1 = (int) km;\n\t\t\tporedjenjeVozila d1 = new poredjenjeVozila(km1);\n\t\t\tCollections.sort(dostupnaVoz,d1);\n\t\t\tint e = 0;\n\t\t\tfor(Vozilo v : dostupnaVoz) {\n\t\t\t\tdouble temp = cenaTroskaVoz(v, km, v.getGorivaVozila().get(0));\n\t\t\t\tSystem.out.println(e + \" - \" + v.getVrstaVozila()+ \"-Registarski broj: \"+ v.getRegBR()+\" | \"+ \"Cena na dan:\"+v.getCenaDan() +\" | Broj sedista:\"+ v.getBrSedist()+ \" | Broj vrata:\"+ v.getBrVrata() + \"| Cena troskova puta:\" + temp + \" Dinara\");\n\t\t\t\te++;\n\t\t\t}\n\t\t\tSystem.out.println(\"---------------------------------------\");\n\t\t\tSystem.out.println(\"Unesite redni broj vozila kojeg zelite:\");\n\t\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\t\tif (redniBroj < dostupnaVoz.size()) {\n\t\t\t\tDateTimeFormatter formatters = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\t\t\t\tString pocetni = pocetniDatum.format(formatters);\n\t\t\t\tString krajnji = krajnjiDatum.format(formatters);\n\t\t\t\tdouble cena = UtillMethod.cenaIznaj(pocetniDatum, krajnjiDatum, dostupnaVoz.get(redniBroj));\n\t\t\t\tRezervacija novaRez = new Rezervacija(dostupnaVoz.get(redniBroj), o, cena, false, pocetni, krajnji);\n\t\t\t\tMain.getRezervacijeAll().add(novaRez);\n\t\t\t\tSystem.out.println(\"Uspesno ste napravili rezervaciju!\");\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t\tSystem.out.println(novaRez);\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Nema dostupnih vozila za rezervaaciju.\");\n\t\t}\n\t}",
"@Override\n public void popuniPolja(OpstaDomenskaKlasa odk) {\n if (odk instanceof NekretninaZaIzdavanje) {\n nekretnina.popuniPolja(odk);\n nekretnina.setVisible(true);\n SwingUtilities.getWindowAncestor(this).pack();\n SwingUtilities.getWindowAncestor(this).setLocationRelativeTo(null);\n if (!txtBrojMeseci.getText().trim().equals(\"\")) {\n double kirija;\n try {\n kirija = nekretnina.vratiCenu();\n txtUkupnoZaUplatu.setText(kirija * Integer.parseInt(txtBrojMeseci.getText().trim()) + \"\");\n } catch (Exception ex) {\n }\n }\n } else if (odk instanceof Klijent) {\n klijent.popuniPolja(odk);\n klijent.setVisible(true);\n SwingUtilities.getWindowAncestor(this).pack();\n SwingUtilities.getWindowAncestor(this).setLocationRelativeTo(null);\n } else if (odk instanceof UgovorOZakupuNekretnine) {\n UgovorOZakupuNekretnine ugovor = (UgovorOZakupuNekretnine) odk;\n txtIDUgovora.setText(ugovor.getIdUgovoraOZakupu() + \"\");\n txtMestoSklapanja.setText(ugovor.getMestoSklapanja());\n txtUkupnoZaUplatu.setText(ugovor.getUkupnoZaUplatu() + \"\");\n GregorianCalendar gc = new GregorianCalendar();\n gc.setTime(ugovor.getDatumDo());\n cmbDatumDo.setEnabled(true);\n cmbDatumDo.setSelectedDate(gc);\n cmbDatumDo.setEnabled(false);\n gc.setTime(ugovor.getDatumOd());\n cmbDatumOd.setSelectedDate(gc);\n gc.setTime(ugovor.getDatumSklapanja());\n cmbDatumSklapanja.setSelectedDate(gc);\n nekretnina.popuniPolja(ugovor.getNekretnina());\n klijent.popuniPolja(ugovor.getKlijent());\n\n LocalDate d1 = LocalDate.of(cmbDatumOd.getSelectedDate().get(Calendar.YEAR), cmbDatumOd.getSelectedDate().get(Calendar.MONTH) + 1, cmbDatumOd.getSelectedDate().get(Calendar.DAY_OF_MONTH));\n cmbDatumDo.setEnabled(true);\n LocalDate d2 = LocalDate.of(cmbDatumDo.getSelectedDate().get(Calendar.YEAR), cmbDatumDo.getSelectedDate().get(Calendar.MONTH) + 1, cmbDatumDo.getSelectedDate().get(Calendar.DAY_OF_MONTH));\n cmbDatumDo.setEnabled(false);\n Period diff = Period.between(d1, d2);\n\n txtBrojMeseci.setText(diff.getMonths() + \"\");\n }\n }",
"public boolean potezDole() {\n\t\t//koordinate glave\n\t\tint i = this.zmija.get(0).i;\n\t\tint j = this.zmija.get(0).j;\n\t\t\n\t\tthis.smjer ='s';\n\t\t\n\t\tif (i+1 < this.visinaTable) {\n\t\t\tif ((this.tabla[i+1][j] == '#')||(this.tabla[i+1][j] == 'o')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse if (this.tabla[i+1][j] == '*') {\n\t\t\t\t\n\t\t\t\tthis.pojedi(i+1, j);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tthis.pomjeri(i+1, j);\n\n\t\t\t}\n\t\t}\n\t\telse if (i+1 == this.visinaTable) {\n\t\t\tif ((this.tabla[0][j] == '#')||(this.tabla[0][j] == 'o'))\n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[0][j] == '*')\n\t\t\t\tthis.pojedi(0, j);\n\t\t\telse\n\t\t\t\tthis.pomjeri(0, j);\n\t\t}\t\n\t\treturn true;\n\t}",
"void accept(String w[][]){\r\n for (int i = 0; i < 20; i++) {\r\n b_pos[i] = -1;\r\n s_pos[i] = -1;\r\n }\r\n\r\n // board 4x4\r\n for(int i = 0; i < 5 ; ++i){\r\n for (int j = 0; j < 5; j++) {\r\n w[i][j]=\"\"; // W = world\r\n }\r\n }\r\n\r\n int count = 1;\r\n System.out.println(\"\\n\\n ~~~~~~~~~~~ Wumpus World Problem ~~~~~~~~~~~~\\n\\n\");\r\n\r\n System.out.println(\"Posisi Sebagai Berikut\");\r\n\r\n //memebuat peta\r\n for (int i = 1; i <= 4; i++) {\r\n System.out.println(\"\\n-----------------------------------------------------------------\");\r\n System.out.print(\"|\\t\"); // \\t = tab\r\n\r\n for (int j = 1; j <= 4; j++) {\r\n System.out.print((count++)+\"\\t|\\t\");\r\n }\r\n }\r\n\r\n System.out.println(\"\\n-----------------------------------------------------------------\");\r\n System.out.println(\"\\nAgent Mulai dari 13 (1,1)\");\r\n w[4][1]=\"A\";\r\n System.out.println(\"Masukkan banyak lubang\");\r\n jumlah_lubang = scan.nextInt();\r\n pos = new int[jumlah_lubang];\r\n System.out.println(\"\\nMasukkan Posisi dari pit.\" +\r\n \"\\nDengan syarat sebagai berikut:\" +\r\n \"\\n1. Posisi pit tidak boleh sama dengan agent\" +\r\n \"\\n2. Posisi pit tidak boleh sama dengan Wumpus\" +\r\n \"\\n3. Posisi pit tidak boleh sama dengan gold\");\r\n System.out.println(\"\\nMasukkan posisi pit\");\r\n for (int i = 0; i < jumlah_lubang; i++) {\r\n pos[i] = scan.nextInt(); // insert posisi pits ke board\r\n show_sense(pos[i],1,w);\r\n }\r\n\r\n //get Wumpus position\r\n System.out.println(\"\\nMasukkan posisi dari Wumpus\");\r\n pos_wumpus = scan.nextInt();\r\n show_sense(pos_wumpus,2,w);\r\n\r\n //get gold position\r\n System.out.println(\"\\nMasukkan posisi Gold\");\r\n gold_post = scan.nextInt();\r\n\r\n // Insert Pit, Gold, Wumpus\r\n insert(w);\r\n \r\n }",
"private Zivocich vytvorZivocicha() {\r\n final String[] zFarba = {\"cervena\", \"zelena\", \"modra\", \"zlta\", \"zlto-zelena\"};\r\n Zivocich zviera = null;\r\n double kolkoVazi = 0.0;\r\n\r\n //-- Vygenerujeme zviera\r\n int vygenerovane = 1 + generator.nextInt(4); //cislo <1,4>\r\n\r\n switch (vygenerovane) {\r\n case 1: //blcha \r\n double kolkoDoskoci=3 * generator.nextDouble() ; //cislo <0;2.99>\r\n double kolkoVyskoci=3 * generator.nextDouble() ; //cislo <0;2.99>\r\n zviera=new Blcha(6,kolkoDoskoci,kolkoVyskoci);\r\n break;\r\n case 2: //simpanz\r\n kolkoVazi=3 + (97 * generator.nextDouble()); //cislo <3;99.9>\r\n boolean cviceny;\r\n cviceny=generator.nextBoolean(); \r\n zviera=new Simpanz(kolkoVazi,cviceny);\r\n break;\r\n case 3: //papagaj\r\n kolkoVazi = 0.1 + (5*generator.nextDouble()); // cislo <0.1; 6>\r\n String farba = zFarba[generator.nextInt(5)]; // farba zo zoznamu\r\n zviera = new Papagaj(\"Ara\", 2, kolkoVazi, farba); \r\n break;\r\n case 4: //slon\r\n kolkoVazi=20 + (480*generator.nextDouble()); //cislo <20;500> \r\n int pocet=generator.nextInt(50); //pocet zubov bude <0,49>\r\n zviera=new Slon(kolkoVazi,pocet);\r\n break;\r\n } //------------------------------------------------------------- switch --\r\n return zviera;\r\n }",
"public static void TroskoviPredjenogPuta() {\n\t\tUtillMethod.izlistavanjeVozila();\n\t\tSystem.out.println(\"Unesite redni broj vozila za koje zelite da racunate predjeni put!\");\n\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\tif (redniBroj < Main.getVozilaAll().size()) {\n\t\t\tif (!Main.getVozilaAll().get(redniBroj).isVozObrisano()) {\n\t\t\t\tSystem.out.println(\"Unesite broj kilometara koje ste presli sa odgovarajucim vozilom\");\n\t\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\t\tVozilo v = Main.getVozilaAll().get(redniBroj);\n\t\t\t\tdouble rezultat;\n\t\t\t\tif(v.getGorivaVozila().size()>1) {\n\t\t\t\t\tGorivo g = UtillMethod.izabirGoriva();\n\t\t\t\t\trezultat = cenaTroskaVoz(v,km,g);\n\t\t\t\t}else {\n\t\t\t\t\t rezultat = cenaTroskaVoz(v,km,v.getGorivaVozila().get(0));\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Cena troskova za predjeni put je \" + rezultat + \"Dinara!\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Ovo vozilo je obrisano i ne moze da se koristi!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t}\n\t}",
"public PentagoMove alphabetaw(PentagoBoardState boardState){\n PentagoBoardState pbs = (PentagoBoardState) boardState.clone();\n ArrayList<PentagoMove> legalmoves = pbs.getAllLegalMoves();\n\n PentagoMove bestmove = legalmoves.get(0);\n PentagoMove bestopponentmove = new PentagoMove(0,0,0,0,0);\n int bestmovescore = -9999999;\n int bestwhitescore = 0;\n //ArrayList<Integer> scores = new ArrayList<Integer>();\n for(int i = 0;i<legalmoves.size()-1;i++){\n\n PentagoBoardState newboard = (PentagoBoardState) pbs.clone();\n //System.out.println( pbs.getTurnPlayer() + \"BEFORE PROCESS\");\n PentagoMove next = legalmoves.get(i);\n\n newboard.processMove(next);\n\n int score = evaluate(newboard);\n //scores.add(score);\n //System.out.println( pbs.getTurnPlayer() + \" AFTER PROCES\");\n\n if(score > 100000){\n newboard.getWinner();\n newboard.printBoard();\n System.out.println(\"FOUND A WINNER\" + score);\n return next;\n }\n\n\n PentagoMove currentopponentmove;\n ArrayList<PentagoMove> opponentlegalmoves = newboard.getAllLegalMoves();\n if (opponentlegalmoves.size()!=0){\n currentopponentmove = opponentlegalmoves.get(0);\n }\n\n int minopponentmovescore = 999999;\n int thismovescore = -9999;\n ArrayList<PentagoMove> bestopponentmoves = new ArrayList<PentagoMove>();\n PentagoMove currentbestopponentmove = new PentagoMove(0,0,0,0,0);\n\n for(int a = 0;a<opponentlegalmoves.size()-1;a++){\n\n PentagoBoardState pbsopponent = (PentagoBoardState) newboard.clone();\n //System.out.println( pbs.getTurnPlayer() + \"BEFORE PROCESS\");\n PentagoMove opponentnext = opponentlegalmoves.get(a);\n\n pbsopponent.processMove(opponentnext);\n //System.out.println( pbs.getTurnPlayer() + \" AFTER PROCES\");\n //pbs.printBoard();\n\n int opponentscore = evaluate(pbsopponent);\n\n\n\n\n\n if (minopponentmovescore>opponentscore){\n //currentopponentmove = opponentnext;\n minopponentmovescore = opponentscore;\n bestopponentmoves.add(opponentnext);\n currentbestopponentmove = opponentnext;\n }\n\n\n }\n bestopponentmove = currentbestopponentmove;\n //lvl 3\n /*\n\n int lvl3minscore =99999;\n PentagoMove currentmaxmove;\n for (int r = 0;r<bestopponentmoves.size()-1;r++) {\n PentagoBoardState pbsopponent = (PentagoBoardState) newboard.clone();\n pbsopponent.processMove(bestopponentmoves.get(r));\n\n ArrayList<PentagoMove> maxlegalmoves = pbsopponent.getAllLegalMoves();\n if (maxlegalmoves.size() != 0) {\n currentmaxmove = maxlegalmoves.get(0);\n }\n int opponentscore = evaluate(pbsopponent);\n int findminmaxmovescore = -99999;\n for (int s = 0; s < maxlegalmoves.size() - 1; s++) {\n\n PentagoBoardState maxboard = (PentagoBoardState) pbsopponent.clone();\n //System.out.println( pbs.getTurnPlayer() + \"BEFORE PROCESS\");\n PentagoMove maxnext = maxlegalmoves.get(s);\n\n maxboard.processMove(maxnext);\n //System.out.println( pbs.getTurnPlayer() + \" AFTER PROCES\");\n //pbs.printBoard();\n\n int maxnextscore = evaluate(pbsopponent);\n if (findminmaxmovescore < maxnextscore) {\n currentmaxmove = maxnext;\n findminmaxmovescore = maxnextscore;\n }\n }\n if (thismovescore<findminmaxmovescore){\n //currentopponentmove = opponentnext;\n thismovescore = findminmaxmovescore;\n }\n\n //opponentscore = maxmovescore;\n }\n\n //end experiment\n\n\n\n\n if (mycolour ==1){\n lvl3minscore =minopponentmovescore;\n }\n */\n if (minopponentmovescore>bestmovescore){//minopponentmovescore\n System.out.println(\"max player move score: \"+score + \"Min : \" + minopponentmovescore);\n bestmovescore = minopponentmovescore;\n bestmove = next;\n bestwhitescore = score;\n\n }\n else if (minopponentmovescore == bestmovescore){\n if (score > bestwhitescore){\n System.out.println(\"max player move score: \"+score + \"Min : \" + minopponentmovescore);\n bestmovescore = minopponentmovescore;\n bestmove = next;\n bestwhitescore = score;\n }\n\n\n\n }\n\n\n }\n System.out.println(\"final max player move score: \"+ bestmovescore + \"\\n My best move: \"+bestmove.toPrettyString() + \"\\n My best move: \"+ bestopponentmove.toPrettyString());\n return bestmove;\n }",
"public boolean odigraj(Koordinati poteza) {\n if (this.jeVeljavnaPoteza(poteza)) {\n plosca[poteza.getX()][poteza.getY()] = igralecNaPotezi.getPolje();\n // Potezo dodamo v odigranePoteze.\n\t\t\tthis.odigranePoteze.add(poteza);\n igralecNaPotezi = igralecNaPotezi.nasprotnik();\n return true;\n } else return false;\n }",
"public boolean potezLijevo() {\n\t\t//koordinate glave\n\t\tint i = this.zmija.get(0).i;\n\t\tint j = this.zmija.get(0).j;\n\t\t\n\t\tthis.smjer='a';\n\t\t\n\t\tif (j-1 >= 0) {\n\t\t\tif ((this.tabla[i][j-1] == '#')||(this.tabla[i][j-1] == 'o'))\n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[i][j-1] == '*') \n\t\t\t\tthis.pojedi(i, j-1);\n\t\t\telse \n\t\t\t\tthis.pomjeri(i, j-1);\n\t\t}\n\t\telse if (j-1 < 0 ) {\n\t\t\tif ((this.tabla[i][this.sirinaTable-1] == '#')||(this.tabla[i][this.sirinaTable-1] == 'o')) \n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[i][this.sirinaTable-1] == '*') \n\t\t\t\tthis.pojedi(i, this.sirinaTable-1);\n\t\t\telse \n\t\t\t\tthis.pomjeri(i, this.sirinaTable-1);\n\t\t}\n\t\treturn true;\n\t}",
"public void isiPilihanDokter() {\n String[] list = new String[]{\"\"};\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(list));\n\n /*Mengambil data pilihan spesialis*/\n String nama = (String) pilihPoliTujuan.getSelectedItem();\n String kodeSpesialis = ss.serviceGetIDSpesialis(nama);\n\n /* Mencari dokter where id_spesialis = pilihSpesialis */\n tmd.setData(ds.serviceGetAllDokterByIdSpesialis(kodeSpesialis));\n int b = tmd.getRowCount();\n\n /* Menampilkan semua nama berdasrkan pilihan sebelumnya */\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(ds.serviceTampilNamaDokter(kodeSpesialis, b)));\n }",
"public static void main(String [] agrs){\n\r\n\r\n Kaczka gumowa = new GumowaKaczka();\r\n gumowa.ustawKwakanieInterfejs(2);\r\n gumowa.ustawLatanieInterfejs(new SzybkieLatanie());\r\n gumowa.wyswietl();\r\n System.out.println(gumowa.kwacz());\r\n System.out.println(gumowa.lec());\r\n Kaczka dzika = new DzikaKaczka();\r\n // dzika.ustawLatanieInterfejs(1);\r\n dzika.wyswietl();\r\n System.out.println(dzika.lec());\r\n System.out.println(dzika.kwacz());\r\n\r\n\r\n// Polecenie[] polecenieWlacz;\r\n// Polecenie[] polecanieWylacz;\r\n// Polecenie polecenieWycofaj;\r\n//\r\n// polecanieWylacz = new Polecenie[7];\r\n// polecenieWlacz = new Polecenie[7];\r\n//\r\n// Swiatlo swiatlo = new Swiatlo();\r\n// polecanieWylacz[0] = new PolecenieWylaczSwiatlo(swiatlo);\r\n// polecenieWlacz[0] = new PolecenieWlaczSwiatlo(swiatlo);\r\n//\r\n//\r\n//\r\n//\r\n// polecenieWlacz[0].wykonaj();\r\n// polecanieWylacz[0].wykonaj();\r\n// polecenieWlacz[0].wykonaj();\r\n// polecenieWycofaj = polecanieWylacz[0];\r\n//// polecenieWycofaj = polecenieWlacz[0];\r\n// polecenieWycofaj.wykonaj();\r\n// polecenieWycofaj.wykonaj();\r\n//// polecenieWycofaj.wycofaj();\r\n//\r\n// WiezaStereo wiezaStereo = new WiezaStereo();\r\n//\r\n// polecenieWlacz[1] = new PolecenieWiezaStereoWlaczCD(wiezaStereo);\r\n//\r\n// polecenieWlacz[1].wykonaj();\r\n\r\n\r\n\r\n }",
"private String vylozZvieraZVozidla() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz index zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Zivocich ziv = zoo.vylozZivocicha(pozicia-1);\r\n if (ziv == null) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n }\r\n zoo.pridajZivocicha(ziv);\r\n return \"Zviera \" + ziv\r\n + \"\\n\\tbolo vylozene z prepravneho vozidla\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"public boolean czyJestWykolejenie(){\r\n int losowy = (int) (Math.random() * 130) ;\r\n if (losowy <= szansaWykolejenia){\r\n System.out.println(\"Nastapilo wykolejenie tramwaju!\");\r\n return true;\r\n }\r\n else {\r\n System.out.println(\"Brak wykolejenia\");\r\n return false;\r\n }\r\n }",
"public void testDecisionEnPasillosDoblar(){\r\n\t\tdireccionActual = Direccion.ARRIBA;\r\n\t\tDireccion futura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, cinco, direccionActual);\r\n\t\tassertEquals(Direccion.DERECHA,futura);\r\n\r\n\t\tdireccionActual = Direccion.IZQUIERDA;\r\n\t\tfutura=cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, cinco, direccionActual);\r\n\t\tassertEquals(Direccion.ABAJO,futura);\r\n\t\t\r\n\t\tdireccionActual = Direccion.IZQUIERDA;\r\n\t\tfutura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, tres, direccionActual);\r\n\t\tassertEquals(Direccion.ARRIBA, futura);\r\n\t\t\r\n\t\tdireccionActual = Direccion.DERECHA;\r\n\t\tfutura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, seis, direccionActual);\r\n\t\tassertEquals(Direccion.ARRIBA, futura);\r\n\t}",
"public void teken(){\n removeAll();\n \n //eerste tekening\n if(tekenEerste != false){\n tekenMuur();\n tekenSleutel();\n veld[9][9] = 6;\n tekenEerste = false;\n tekenBarricade();\n }\n \n //methode die de speler de waarde van de sleutel geeft aanroepen\n sleutelWaarde();\n \n //de methode van het spel einde aanroepen\n einde();\n \n //vernieuwd veld aanroepen\n veld = speler.nieuwVeld(veld);\n \n //het veld tekenen\n for(int i = 0; i < coordinaten.length; i++) {\n for(int j = 0; j < coordinaten[1].length; j++){\n switch (veld[i][j]) {\n case 1: //de sleutels\n if(i == sleutel100.getY() && j == sleutel100.getX()){\n coordinaten[i][j] = new SleutelVakje(100);\n }\n else if (i == sleutel1002.getY() && j == sleutel1002.getX()){\n coordinaten[i][j] = new SleutelVakje(100);\n }\n else if (i == sleutel200.getY() && j == sleutel200.getX()){\n coordinaten[i][j] = new SleutelVakje(200);\n }\n else if (i == sleutel300.getY() && j == sleutel300.getX()){\n coordinaten[i][j] = new SleutelVakje(300);\n } break;\n case 2: //de muren\n coordinaten[i][j] = new MuurVakje();\n break;\n // de barricades\n case 3:\n coordinaten[i][j] = new BarricadeVakje(100);\n break;\n case 4:\n coordinaten[i][j] = new BarricadeVakje(200);\n break;\n case 5:\n coordinaten[i][j] = new BarricadeVakje(300);\n break;\n case 6: // het eindveld vakje\n coordinaten[i][j] = new EindveldVakje();\n break;\n default: // het normale vakje\n coordinaten[i][j] = new CoordinaatVakje();\n break;\n }\n //de speler\n coordinaten[speler.getY()][speler.getX()] = new SpelerVakje();\n \n //het veld aan de JPanel toevoegen\n add(coordinaten[i][j]);\n }\n }\n System.out.println(\"Speler waarde = \" + speler.getSleutelWaarde());\n revalidate();\n repaint();\n }",
"public void dodajPrijelaz(int pocetno, int sljedece, char znak) {\n dodajPrijelaz(pocetno, sljedece, Character.toString(znak));\n }",
"public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}",
"public static void MostrarPerroSegunEstadia(Perro BaseDeDatosPerros[], int codPerro){\n String razaDeceada, razaPerro;\r\n int diasDeEstadia; \r\n razaDeceada=IngresarRazaCorrecta();\r\n \r\n for (int i = 0; i < codPerro; i++) {\r\n razaPerro=BaseDeDatosPerros[i].getRaza();\r\n diasDeEstadia=BaseDeDatosPerros[i].getCantDias();\r\n if (razaDeceada.equalsIgnoreCase(razaPerro)&&(diasDeEstadia>20)) {\r\n System.out.println(\"____________________________________________\");\r\n System.out.println(BaseDeDatosPerros[i].toString());\r\n System.out.println(\"____________________________________________\");\r\n \r\n }\r\n }\r\n \r\n }",
"public void rellenarDevoluciones(DTOSolicitudValidacion dtoSolicitud)\n throws MareException{\n UtilidadesLog.info(\"DAOSolicitudes.rellenarDevoluciones(DTOSolicitudValidacion dtoSolicitud):Entrada\");\n Long oidConsolidado = null, oidPeriodo = null;\n RecordSet rs;\n StringBuffer query = new StringBuffer();\n\n query.append(\" SELECT MAX(SOL_ORIG.OID_SOLI_CABE) OID_SOLI_CABE, MAX(SOL_ORIG.PERD_OID_PERI) PERD_OID_PERI \");\n\n query.append(\" FROM PED_SOLIC_CABEC SOL_DEVO, \");\n query.append(\" PED_SOLIC_CABEC SOL_ORIG, \");\n query.append(\" PED_SOLIC_CABEC SOL_DEVUELTA, \");\n query.append(\" INC_SOLIC_CONCU_PUNTA SCP, \");\n query.append(\" PED_TIPO_SOLIC_PAIS PTSP, \");\n query.append(\" PED_TIPO_SOLIC PTS \");\n \n query.append(\" WHERE SOL_DEVO.OID_SOLI_CABE = \" + dtoSolicitud.getOidSolicitud().toString() );\n query.append(\" AND SOL_DEVO.SOCA_OID_DOCU_REFE = SOL_ORIG.OID_SOLI_CABE \");\n query.append(\" AND SOL_ORIG.OID_SOLI_CABE = SOL_DEVUELTA.SOCA_OID_SOLI_CABE \");\n query.append(\" AND SOL_DEVUELTA.OID_SOLI_CABE = SCP.SOCA_OID_SOLI_CABE \");\n query.append(\" AND SOL_DEVO.TSPA_OID_TIPO_SOLI_PAIS = PTSP.OID_TIPO_SOLI_PAIS \");\n query.append(\" AND PTSP.TSOL_OID_TIPO_SOLI = PTS.OID_TIPO_SOLI \");\n query.append(\" AND PTS.IND_DEVO = 1 \");\n \n try {\n rs = BelcorpService.getInstance().dbService.executeStaticQuery(query.toString());\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n if(! rs.esVacio() ){\n oidConsolidado = rs.getValueAt(0,\"OID_SOLI_CABE\" )!=null?\n new Long( ((BigDecimal)rs.getValueAt(0,\"OID_SOLI_CABE\" ) ).longValue() ):null;\n }\n \n if( oidConsolidado != null ){\n oidPeriodo = rs.getValueAt(0,\"PERD_OID_PERI\" )!=null?\n new Long( ((BigDecimal)rs.getValueAt(0,\"PERD_OID_PERI\" ) ).longValue() ):null; \n \n dtoSolicitud.setOidSolicitud( oidConsolidado );\n dtoSolicitud.setOidPeriodo( oidPeriodo );\n }\n\n UtilidadesLog.info(\"DAOSolicitudes.rellenarDevoluciones(DTOSolicitudValidacion dtoSolicitud):Salida\");\n }",
"public void sleutelWaarde(){\n if(sleutel100.getX() == speler.getX() && sleutel100.getY() == speler.getY() && veld[speler.getY()][speler.getX()] == 1){\n speler.setSleutelWaarde(sleutel100.getWaarde());\n }\n else if(sleutel1002.getX() == speler.getX() && sleutel1002.getY() == speler.getY() && veld[speler.getY()][speler.getX()] == 1){\n speler.setSleutelWaarde(sleutel1002.getWaarde());\n }\n else if(sleutel200.getX() == speler.getX() && sleutel200.getY() == speler.getY() && veld[speler.getY()][speler.getX()] == 1){\n speler.setSleutelWaarde(sleutel200.getWaarde());\n }\n else if(sleutel300.getX() == speler.getX() && sleutel300.getY() == speler.getY() && veld[speler.getY()][speler.getX()] == 1){\n speler.setSleutelWaarde(sleutel300.getWaarde());\n }\n }",
"private void sonucYazdir() {\n\t\talinanPuan = (int)(((float)alinanPuan / (float)toplamPuan) * 100);\n\t\tSystem.out.println(\"\\nSınav Bitti..!\\n\" + soruSayisi + \" sorudan \" + dogruSayaci + \" tanesine\"\n\t\t\t\t\t\t+ \" doğru cevap verdiniz.\\nPuan: \" + alinanPuan + \"/\" + toplamPuan);\n\t}",
"@Test\r\n\tpublic void testGetPeliBalorazioak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 4);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.5);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 3);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 2);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 3.5);\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 3.5);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 1);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 4);\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 3.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 5);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\r\n\t}",
"private Pares(PLoc p, PLoc s, int d){\n\t\t\tprimero=p;\n\t\t\tsegundo=s;\n\t\t\tdistancia=d;\n\t\t}",
"public void skratiListu() {\n if (!jePrazna()) {\n int n = Svetovid.in.readInt(\"Unesite broj elemenata za skracivanje: \");\n obrniListu(); //Zato sto se trazi odsecanje poslednjih n elemenata\n while (prvi != null && n > 0) {\n prvi = prvi.veza;\n n--;\n }\n obrniListu(); //Vraca listu u prvobitni redosled\n }\n }",
"private String nalozZvieraNaVozidlo() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz cislo zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Prepravitelny z = (Prepravitelny) zoo.getZvierataZOO(pozicia - 1);\r\n zoo.nalozZivocicha(z);\r\n zoo.odstranZivocicha(pozicia - 1);\r\n return \"Zviera \" + z + \"\\n\\tbolo nalozene na prepravne vozidlo\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nemozno prepravit\\n\\t\";\r\n } catch (NullPointerException exNP) {\r\n return \"Zviera c. \" + pozicia + \" nie je v ZOO\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"public static void llenarSoriana(){\r\n Producto naranja1 = new Producto (\"naranja\", \"el huertito\", 25, 0);\r\n Nodo<Producto> nTemp1 = new Nodo(naranja1);\r\n listaSoriana.agregarNodo(nTemp1);\r\n \r\n Producto naranja2 = new Producto (\"naranja\", \"el ranchito\", 34, 0);\r\n Nodo<Producto> nTemp2 = new Nodo (naranja2);\r\n listaSoriana.agregarNodo(nTemp2);\r\n \r\n Producto manzana3 = new Producto (\"manzana\", \"el rancho de don chuy\", 24, 0);\r\n Nodo<Producto> nTemp3 = new Nodo (manzana3);\r\n listaSoriana.agregarNodo(nTemp3);\r\n \r\n Producto manzana4 = new Producto (\"manzana\", \"la costeña\", 15, 0);\r\n Nodo<Producto> nTemp4 = new Nodo(manzana4);\r\n listaSoriana.agregarNodo(nTemp4);\r\n \r\n Producto platano5 = new Producto (\"platano\", \"el Huertito\", 26, 0);\r\n Nodo<Producto> nTemp5 = new Nodo (platano5);\r\n listaSoriana.agregarNodo(nTemp5);\r\n \r\n Producto platano6 = new Producto (\"platano\", \"granjita dorada\", 36, 0);\r\n Nodo<Producto> nTemp6 = new Nodo (platano6);\r\n listaSoriana.agregarNodo (nTemp6);\r\n \r\n Producto pera7 = new Producto (\"pera\", \"el rancho de don chuy\", 38, 0);\r\n Nodo<Producto> nTemp7 = new Nodo (pera7);\r\n listaSoriana.agregarNodo(nTemp7);\r\n \r\n Producto pera8 = new Producto (\"pera\", \"la costeña\", 8,0);\r\n Nodo<Producto> nTemp8 = new Nodo (pera8);\r\n listaSoriana.agregarNodo(nTemp8);\r\n \r\n Producto durazno9 = new Producto (\"durazno\", \"el huertito\", 12.50, 0);\r\n Nodo<Producto> nTemp9 = new Nodo (durazno9);\r\n listaSoriana.agregarNodo(nTemp9);\r\n \r\n Producto fresa10 = new Producto (\"fresa\", \"el rancho de don chuy\", 35.99,0);\r\n Nodo<Producto> nTemp10 = new Nodo (fresa10);\r\n listaSoriana.agregarNodo(nTemp10);\r\n \r\n Producto fresa11 = new Producto (\"fresa\", \"grajita dorada\", 29.99,0);\r\n Nodo<Producto> nTemp11 = new Nodo (fresa11);\r\n listaSoriana.agregarNodo(nTemp11);\r\n \r\n Producto melon12 = new Producto (\"melon\", \"la costeña\", 18.50, 0);\r\n Nodo<Producto> nTemp12 = new Nodo (melon12);\r\n listaSoriana.agregarNodo(nTemp12);\r\n \r\n Producto melon13 = new Producto (\"melon\", \"el huertito\", 8.50, 0);\r\n Nodo<Producto> nTemp13 = new Nodo (melon13);\r\n listaSoriana.agregarNodo(nTemp13);\r\n \r\n Producto elote14 = new Producto (\"elote\", \"el ranchito\", 6, 0);\r\n Nodo<Producto> nTemp14 = new Nodo (elote14);\r\n listaSoriana.agregarNodo(nTemp14);\r\n \r\n Producto elote15 = new Producto (\"elote\", \"moctezuma\", 12, 0);\r\n Nodo<Producto> nTemp15 = new Nodo (elote15);\r\n listaSoriana.agregarNodo(nTemp15);\r\n \r\n Producto aguacate16 = new Producto (\"aguacate\", \"la costeña\", 35, 0);\r\n Nodo<Producto> nTemp16 = new Nodo (aguacate16);\r\n listaSoriana.agregarNodo(nTemp16);\r\n \r\n Producto cebolla17 = new Producto (\"cebolla\", \"granjita dorada\", 8.99, 0);\r\n Nodo<Producto> nTemp17 = new Nodo (cebolla17);\r\n listaSoriana.agregarNodo(nTemp17);\r\n \r\n Producto tomate18 = new Producto (\"tomate\", \"el costeñito feliz\", 10.50, 0);\r\n Nodo<Producto> nTemp18 = new Nodo (tomate18);\r\n listaSoriana.agregarNodo(nTemp18);\r\n \r\n Producto tomate19 = new Producto (\"tomate\", \"el ranchito\", 8.99, 0);\r\n Nodo<Producto> nTemp19 = new Nodo (tomate19);\r\n listaSoriana.agregarNodo(nTemp19);\r\n \r\n Producto limon20 = new Producto (\"limon\", \"la costeña\", 3.50, 0);\r\n Nodo<Producto> nTemp20 = new Nodo (limon20);\r\n listaSoriana.agregarNodo(nTemp20);\r\n \r\n Producto limon21 = new Producto (\"limon\", \"el ranchito\", 10.99, 0);\r\n Nodo<Producto> nTemp21 = new Nodo (limon21);\r\n listaSoriana.agregarNodo(nTemp21);\r\n \r\n Producto papas22 = new Producto (\"papas\", \"la costeña\", 11, 0);\r\n Nodo<Producto> nTemp22 = new Nodo(papas22);\r\n listaSoriana.agregarNodo(nTemp22);\r\n \r\n Producto papas23 = new Producto (\"papas\", \"granjita dorada\", 4.99, 0);\r\n Nodo<Producto> nTemp23 = new Nodo(papas23);\r\n listaSoriana.agregarNodo(nTemp23);\r\n \r\n Producto chile24 = new Producto (\"chile\", \"el rancho de don chuy\", 2.99, 0);\r\n Nodo<Producto> nTemp24 = new Nodo (chile24);\r\n listaSoriana.agregarNodo(nTemp24);\r\n \r\n Producto chile25 = new Producto (\"chile\",\"la costeña\", 12, 0);\r\n Nodo<Producto> nTemp25 = new Nodo (chile25);\r\n listaSoriana.agregarNodo(nTemp25);\r\n \r\n Producto jamon26 = new Producto (\"jamon\",\"fud\", 25, 1);\r\n Nodo<Producto> nTemp26 = new Nodo(jamon26);\r\n listaSoriana.agregarNodo(nTemp26);\r\n \r\n Producto jamon27 = new Producto(\"jamon\", \"kir\", 13.99, 1);\r\n Nodo<Producto> nTemp27 = new Nodo(jamon27);\r\n listaSoriana.agregarNodo(nTemp27);\r\n \r\n Producto peperoni28 = new Producto (\"peperoni28\", \"fud\", 32, 1);\r\n Nodo<Producto> nTemp28 = new Nodo (peperoni28);\r\n listaSoriana.agregarNodo(nTemp28);\r\n \r\n Producto salchicha29 = new Producto (\"salchicha\", \" san rafael\", 23.99, 1);\r\n Nodo<Producto> nTemp29 = new Nodo (salchicha29);\r\n listaSoriana.agregarNodo(nTemp29); \r\n \r\n Producto huevos30 = new Producto (\"huevos\", \"san rafael\", 30.99, 1);\r\n Nodo<Producto> nTemp30 = new Nodo (huevos30);\r\n listaSoriana.agregarNodo(nTemp30);\r\n \r\n Producto chuletas31 = new Producto (\"chuletas\", \"la res dorada\", 55, 1);\r\n Nodo<Producto> nTemp31 = new Nodo (chuletas31);\r\n listaSoriana.agregarNodo(nTemp31);\r\n \r\n Producto carnemolida32 = new Producto (\"carne molida\", \"san rafael\", 34, 1);\r\n Nodo<Producto> nTemp32 = new Nodo (carnemolida32);\r\n listaSoriana.agregarNodo(nTemp32);\r\n \r\n Producto carnemolida33 = new Producto (\"carne molida\", \"la res dorada\", 32.99, 1);\r\n Nodo<Producto> nTemp33 = new Nodo (carnemolida33);\r\n listaSoriana.agregarNodo(nTemp33);\r\n \r\n Producto pollo34 = new Producto (\"pollo\", \"pollito feliz\", 38, 1);\r\n Nodo<Producto> nTemp34 = new Nodo (pollo34);\r\n listaSoriana.agregarNodo(nTemp34);\r\n \r\n Producto pescado35 = new Producto (\"pescado\", \"pescadito\", 32.99, 1);\r\n Nodo<Producto> nTemp35 = new Nodo (pescado35);\r\n listaSoriana.agregarNodo(nTemp35);\r\n \r\n Producto quesolaurel36 = new Producto (\"queso\", \"laurel\", 23.50, 1);\r\n Nodo<Producto> nTemp36 = new Nodo (quesolaurel36);\r\n listaSoriana.agregarNodo(nTemp36);\r\n \r\n Producto leche37 = new Producto (\"leche\", \"nutrileche\", 12.99, 1);\r\n Nodo<Producto> nTemp37 = new Nodo (leche37);\r\n listaSoriana.agregarNodo(nTemp37);\r\n \r\n Producto lechedeslactosada38 = new Producto (\"leche deslactosada\", \"lala\", 17.50, 1);\r\n Nodo<Producto> nTemp38 = new Nodo (lechedeslactosada38);\r\n listaSoriana.agregarNodo(nTemp38);\r\n \r\n Producto panblanco39 = new Producto (\"pan blanco\", \"bombo\", 23.99, 2);\r\n Nodo<Producto> nTemp39 = new Nodo (panblanco39);\r\n listaSoriana.agregarNodo(nTemp39);\r\n \r\n Producto atun40 = new Producto (\"atun\", \"la aleta feliz\", 12, 2);\r\n Nodo<Producto> nTemp40 = new Nodo (atun40);\r\n listaSoriana.agregarNodo(nTemp40);\r\n \r\n Producto atun41 = new Producto (\"atun\", \"el barco\", 10.99, 2);\r\n Nodo<Producto> nTemp41 = new Nodo (atun41);\r\n listaSoriana.agregarNodo(nTemp41);\r\n \r\n Producto arroz42 = new Producto (\"arroz\", \"mi marca\", 12.50, 2);\r\n Nodo<Producto> nTemp42 = new Nodo (arroz42);\r\n listaSoriana.agregarNodo(nTemp42);\r\n \r\n Producto arroz43 = new Producto (\"arroz\", \"soriana\", 9.99, 2);\r\n Nodo<Producto> nTemp43 = new Nodo (arroz43);\r\n listaSoriana.agregarNodo(nTemp43);\r\n \r\n Producto frijol44 = new Producto (\"frijol\", \"mi marca\", 10.99, 2);\r\n Nodo<Producto> nTemp44 = new Nodo (frijol44);\r\n listaSoriana.agregarNodo(nTemp44);\r\n \r\n Producto frijol45 = new Producto (\"frijol\", \"soriana\", 15.99, 2);\r\n Nodo<Producto> nTemp45 = new Nodo (frijol45);\r\n listaSoriana.agregarNodo(nTemp45);\r\n \r\n Producto azucar46 = new Producto (\"azucar\", \"mi marca\", 12.50, 2);\r\n Nodo<Producto> nTemp46 = new Nodo (azucar46);\r\n listaSoriana.agregarNodo(nTemp46);\r\n \r\n Producto azucar47 = new Producto (\"azucar\", \"zulka\", 15.99, 2);\r\n Nodo<Producto> nTemp47 = new Nodo (azucar47);\r\n listaSoriana.agregarNodo(nTemp47);\r\n \r\n Producto servilletas48 = new Producto (\"servilletas\", \"esponjosas\",10.50, 2);\r\n Nodo<Producto> nTemp48 = new Nodo (servilletas48);\r\n listaSoriana.agregarNodo(nTemp48);\r\n \r\n Producto sal49 = new Producto (\"sal\", \"mar azul\", 3.99, 2);\r\n Nodo<Producto> nTemp49 = new Nodo (sal49);\r\n listaSoriana.agregarNodo(nTemp49);\r\n \r\n Producto aceitedecocina50 = new Producto (\"aceite de cocina\", \"123\", 15.99, 2);\r\n Nodo<Producto> nTemp50 = new Nodo (aceitedecocina50);\r\n listaSoriana.agregarNodo(nTemp50);\r\n \r\n Producto caffe51 = new Producto (\"caffe\", \"nescafe\", 23, 2);\r\n Nodo<Producto> nTemp51 = new Nodo (caffe51);\r\n listaSoriana.agregarNodo(nTemp51);\r\n \r\n Producto puredetomate52 = new Producto (\"pure de tomate\", \" la costeña\", 12.99, 2);\r\n Nodo<Producto> nTemp52 = new Nodo (puredetomate52);\r\n listaSoriana.agregarNodo(nTemp52);\r\n \r\n Producto lentejas53 = new Producto (\"lentejas\", \"la granjita\", 8.99, 2);\r\n Nodo<Producto> nTemp53 = new Nodo (lentejas53);\r\n listaSoriana.agregarNodo(nTemp53);\r\n \r\n Producto zuko54 = new Producto (\"zuko\", \"zuko\", 2.99, 2);\r\n Nodo<Producto> nTemp54 = new Nodo (zuko54);\r\n listaSoriana.agregarNodo(nTemp54);\r\n \r\n Producto champu55 = new Producto (\"champu\", \"loreal\", 32, 3);\r\n Nodo<Producto> nTemp55 = new Nodo (champu55);\r\n listaSoriana.agregarNodo(nTemp55);\r\n \r\n Producto champu56 = new Producto (\"champu\", \"el risueño\", 29.99, 3);\r\n Nodo<Producto> nTemp56 = new Nodo (champu56);\r\n listaSoriana.agregarNodo(nTemp56);\r\n \r\n Producto desodorante57 = new Producto (\"desodorante\", \"nivea\", 23.50, 3);\r\n Nodo<Producto> nTemp57 = new Nodo (desodorante57);\r\n listaSoriana.agregarNodo(nTemp57);\r\n \r\n Producto pastadedientes58 = new Producto(\"pasta de dientes\", \"colgate\", 17.50, 3);\r\n Nodo<Producto> nTemp58 = new Nodo (pastadedientes58);\r\n listaSoriana.agregarNodo(nTemp58);\r\n \r\n Producto pastadedientes59 = new Producto (\"pasta de dientes\", \"el diente blanco\", 29, 3);\r\n Nodo<Producto> nTemp59 = new Nodo (pastadedientes59);\r\n listaSoriana.agregarNodo(nTemp59);\r\n \r\n Producto rastrillos60 = new Producto (\"rastrillos\", \"el filosito\", 33.99, 3);\r\n Nodo<Producto> nTemp60 = new Nodo (rastrillos60);\r\n listaSoriana.agregarNodo(nTemp60);\r\n \r\n Producto rastrillos61 = new Producto (\"rastrillos\", \"barba de oro\", 23.99, 3);\r\n Nodo<Producto> nTemp61 = new Nodo (rastrillos61);\r\n listaSoriana.agregarNodo(nTemp61);\r\n \r\n Producto hilodental62 = new Producto (\"hilo dental\", \"el diente blanco\", 32.99, 3);\r\n Nodo<Producto> nTemp62 = new Nodo (hilodental62);\r\n listaSoriana.agregarNodo(nTemp62);\r\n \r\n Producto cepillodedientes63 = new Producto (\"cepillo de dientes\", \"OBBM\", 17.99, 3);\r\n Nodo<Producto> nTemp63 = new Nodo (cepillodedientes63);\r\n listaSoriana.agregarNodo(nTemp63);\r\n \r\n Producto cloro64 = new Producto (\"cloro\", \"cloralex\", 23.50, 3);\r\n Nodo<Producto> nTemp64 = new Nodo (cloro64);\r\n listaSoriana.agregarNodo(nTemp64);\r\n \r\n Producto acondicionador65 = new Producto (\"acondicionador\", \"sedal\", 28.99, 3);\r\n Nodo<Producto> nTemp65 = new Nodo (acondicionador65);\r\n listaSoriana.agregarNodo(nTemp65);\r\n \r\n Producto acondicionador66 = new Producto (\"acondicionador\", \"pantene\", 23.99, 3);\r\n Nodo<Producto> nTemp66 = new Nodo (acondicionador66);\r\n listaSoriana.agregarNodo(nTemp66);\r\n \r\n Producto pinol67 = new Producto(\"pinol\", \"mi piso limpio\", 15, 3);\r\n Nodo<Producto> nTemp67 = new Nodo (pinol67);\r\n listaSoriana.agregarNodo(nTemp67);\r\n \r\n Producto pinol68 = new Producto (\"pinol\", \"eficaz\", 18.99, 3);\r\n Nodo<Producto> nTemp68 = new Nodo (pinol68);\r\n listaSoriana.agregarNodo(nTemp68);\r\n \r\n Producto tortillas69 = new Producto (\"tortillas\", \"maizena\", 8.99, 2);\r\n Nodo<Producto> nTemp69 = new Nodo (tortillas69);\r\n listaSoriana.agregarNodo(nTemp69);\r\n \r\n Producto cremaparacuerpo70 = new Producto (\"crema para cuerpo\", \"dove\", 13.50, 3);\r\n Nodo<Producto> nTemp70 = new Nodo (cremaparacuerpo70);\r\n listaSoriana.agregarNodo(nTemp70);\r\n \r\n Producto maizoro71 = new Producto (\"maizoro\", \"special k\", 35.99, 2);\r\n Nodo<Producto> nTemp71 = new Nodo (maizoro71);\r\n listaSoriana.agregarNodo(nTemp71);\r\n \r\n Producto maizoro72 = new Producto (\"maizoro\",\"azucaradas\", 43, 2);\r\n Nodo<Producto> nTemp72 = new Nodo (maizoro72);\r\n listaSoriana.agregarNodo(nTemp72);\r\n \r\n Producto zanahoria73 = new Producto (\"zanahoria\", \"el huertito\", 12.99, 0);\r\n Nodo<Producto> nTemp73 = new Nodo (zanahoria73);\r\n listaSoriana.agregarNodo(nTemp73);\r\n \r\n Producto maizoro74 = new Producto (\"maizoro\", \"cherrios\", 45, 2);\r\n Nodo<Producto> nTemp74 = new Nodo (maizoro74);\r\n listaSoriana.agregarNodo(nTemp74);\r\n \r\n Producto mayonesa75 = new Producto (\"mayonesa\", \"helmans\", 23, 2);\r\n Nodo<Producto> nTemp75 = new Nodo (mayonesa75);\r\n listaSoriana.agregarNodo(nTemp75);\r\n }",
"public void ucitajPotez(Potez potez) {\n\t\tint red = potez.vratiRed();\n\t\tint kolona = potez.vratiKolonu();\n\t\ttabla[red][kolona] = potez.vratiRezultat();\n\n\t\tif (potez.vratiRezultat() == Polje1.potopljen) {\n\t\t\tint gornjiRed, gornjaKolona;\n\t\t\tboolean cont1 = false;\n\t\t\tboolean cont2 = false;\n\t\t\tboolean redar = false;\n\t\t\tboolean kolonar = false;\n\t\t\twhile (redar == false) {\n\t\t\t\tif (red == 0) {\n\t\t\t\t\tgornjiRed = 0;\n\t\t\t\t\tcont1 = true;\n\t\t\t\t} else {\n\t\t\t\t\tgornjiRed = red - 1;\n\t\t\t\t}\n\t\t\t\tif (red == 9) {\n\t\t\t\t\tcont2 = true;\n\t\t\t\t}\n\t\t\t\tif (tabla[gornjiRed][kolona] == Polje1.pogodjen && cont1 == false) {\n\t\t\t\t\ttabla[gornjiRed][kolona] = Polje1.potopljen;\n\t\t\t\t\tred--;\n\t\t\t\t} else {\n\t\t\t\t\tcont1 = true;\n\t\t\t\t\tgornjiRed++;\n\t\t\t\t}\n\t\t\t\tif (cont1 == true) {\n\t\t\t\t\tif (tabla[gornjiRed][kolona] == Polje1.pogodjen || tabla[gornjiRed][kolona] == Polje1.potopljen) {\n\t\t\t\t\t\ttabla[gornjiRed][kolona] = Polje1.potopljen;\n\t\t\t\t\t\tred++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcont2 = true;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (cont1 == true && cont2 == true)\n\t\t\t\t\tredar = true;\n\t\t\t}\n\t\t\tcont1 = false;\n\t\t\tcont2 = false;\n\t\t\tred = potez.vratiRed();\n\t\t\twhile (kolonar == false) {\n\t\t\t\tif (kolona == 0) {\n\t\t\t\t\tgornjaKolona = 0;\n\t\t\t\t\tcont1 = true;\n\t\t\t\t} else {\n\t\t\t\t\tgornjaKolona = kolona - 1;\n\t\t\t\t}\n\t\t\t\tif (kolona == 9) {\n\t\t\t\t\tcont2 = true;\n\t\t\t\t}\n\t\t\t\tif (tabla[red][gornjaKolona] == Polje1.pogodjen && cont1 == false) {\n\t\t\t\t\ttabla[red][gornjaKolona] = Polje1.potopljen;\n\t\t\t\t\tkolona--;\n\t\t\t\t} else {\n\t\t\t\t\tcont1 = true;\n\t\t\t\t\tgornjaKolona++;\n\t\t\t\t}\n\t\t\t\tif (cont1 == true) {\n\t\t\t\t\tif (tabla[red][gornjaKolona] == Polje1.pogodjen || tabla[red][gornjaKolona] == Polje1.potopljen) {\n\t\t\t\t\t\ttabla[red][gornjaKolona] = Polje1.potopljen;\n\t\t\t\t\t\tkolona++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcont2 = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (cont1 == true && cont2 == true)\n\t\t\t\t\tkolonar = true;\n\n\t\t\t}\n\n\t\t}\n\n\n\t}",
"public QwirkleSpiel()\n {\n beutel=new Beutel(3); //erzeuge Beutel mit 3 Steinfamilien\n spielfeld=new List<Stein>();\n\n rote=new ArrayList<Stein>(); //Unterlisten, die zum leichteren Durchsuchen des Spielfelds angelegt werden\n blaue=new ArrayList<Stein>();\n gruene=new ArrayList<Stein>();\n gelbe=new ArrayList<Stein>();\n violette=new ArrayList<Stein>();\n orangene=new ArrayList<Stein>();\n kreise=new ArrayList<Stein>();\n kleeblaetter=new ArrayList<Stein>();\n quadrate=new ArrayList<Stein>();\n karos=new ArrayList<Stein>();\n kreuze=new ArrayList<Stein>();\n sterne=new ArrayList<Stein>();\n\n erstelleListenMap();\n }",
"@Override\n\tpublic double getPowierzchnia() {\n\t\treturn szer*wys;\n\t}",
"private SolmuKaksiKolme succSolmu2(SolmuKaksiKolme s) {\n //seuraaja ei tarpeen\n if (s.getOikea() == null) {\n return null;\n }\n\n SolmuKaksiKolme it = s.getOikea();\n\n while (it.getVasen() != null) {\n it = it.getVasen();\n }\n return it;\n }",
"public Pont ertesit(Pont innenlep, Szereplo sz);",
"public static Nodo buscarSolucionPorAmplitud(Nodo inicio, int[][] solucion) {\n\t\tArrayList<Nodo> abiertos = new ArrayList<Nodo>();\n\t\tabiertos.add(inicio);\n\t\tint cont = 0;\n\t\tArrayList<Nodo> visitados = new ArrayList<Nodo>();\n\t\twhile(abiertos.size()!=0) {\n\t\t\tSystem.out.println(\"Visitados\");\n\t\t\tSystem.out.println(\"#################################\");\n\t\t\tfor(Nodo n : visitados) {\n\t\t\t\timprimirEstado(n.getEstado());\n\t\t\t\tSystem.out.println(\"Costo de este nodo: \" + n.getCosto());\n\t\t\t\tSystem.out.println(\"---------------\");\n\t\t\t}\n\t\t\tSystem.out.println(\"#################################\");\n\t\t\tNodo revisar = abiertos.remove(0);\n\t\t\trevisar.setCosto(calcularCosto(revisar.getEstado(), solucion));\n\t\t\timprimirEstado(revisar.getEstado());\n\t\t\tint[] pcero = ubicarPosicionCero(revisar.getEstado());\n\t\t\tSystem.out.println(\"Iteracion # \" + ++cont);\n\t\t\tif(Arrays.deepEquals(revisar.getEstado(), solucion)) {\n\t\t\t\tSystem.out.println(\"***** SOLUCION ENCONTRADA *****\");\n\t\t\t\treturn revisar;\n\n\t\t\t}\n\n\t\t\tArrayList<Nodo> hijos = new ArrayList<Nodo>();\n\t\t\tvisitados.add(revisar);\n\t\t\tif(pcero[0]!=0) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint arriba = hijo.getEstado()[pcero[0]-1][pcero[1]];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = arriba;\n\t\t\t\thijo.getEstado()[pcero[0]-1][pcero[1]] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[0]!=2) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint abajo = hijo.getEstado()[pcero[0]+1][pcero[1]];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = abajo;\n\t\t\t\thijo.getEstado()[pcero[0]+1][pcero[1]] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[1]!=0) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint izq = hijo.getEstado()[pcero[0]][pcero[1]-1];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = izq;\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]-1] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[1]!=2) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint der = hijo.getEstado()[pcero[0]][pcero[1]+1];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = der;\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]+1] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\trevisar.setHijos(hijos);\n\t\t}\n\t\treturn null;\n\n\t}",
"public DLQL_SuaMon() {\n initComponents();\n try {\n cbbLoai = con.GetAllLoaiMonAn();\n DefaultComboBoxModel md = new DefaultComboBoxModel();\n cbxLoaiMon.setModel(md);\n for (int i = 0; i < cbbLoai.size(); i++) {\n cbxLoaiMon.addItem(cbbLoai.get(i).getTenLoai());\n }\n cbxLoaiMon.setSelectedItem(con.GetLoaiByMa(StoreData.currentMonAn.getMaLoai()).getTenLoai());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Không LOAD được combo Loại\");\n }\n txtTenMon.setText(StoreData.currentMonAn.getTenMon());\n txtDonGia.setText(Integer.toString(StoreData.currentMonAn.getDonGia()));\n txtDVT.setText(StoreData.currentMonAn.getdVT());\n }",
"private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}",
"public static ArrayList<Vkladi> rascetObsciBalans() {\r\n\t\tArrayList<Vkladi> foundVkladi = new ArrayList<Vkladi>();\r\n\r\n\t\tint t = 0;\r\n\t\tfor (Vkladi vkla : vklad) {\r\n\r\n\t\t\tt = t + vkla.getPribil();\r\n\t\t}\r\n\t\tint z = 0;\r\n\t\tfor (Krediti kredit : kred) {\r\n\r\n\t\t\tz = z + kredit.getDolg();\r\n\t\t}\r\n\t\tint y = 0;\r\n\t\ty = z + t;\r\n\t\tSystem.out.println(\"Symarnii balanse Scetov= \" + y + \"$\");\r\n\t\treturn foundVkladi;\r\n\t}",
"private void consultPluviometer() {\r\n\t\tResourceBundle bundle = ControladorContexto.getBundle(\"mensaje\");\r\n\t\tResourceBundle bundleLifeCycle = ControladorContexto\r\n\t\t\t\t.getBundle(\"messageLifeCycle\");\r\n\t\tValidacionesAction validate = ControladorContexto\r\n\t\t\t\t.getContextBean(ValidacionesAction.class);\r\n\t\tpluviometerPojoSubList = new ArrayList<PluviometerPojo>();\r\n\t\tList<SelectItem> parameters = new ArrayList<SelectItem>();\r\n\t\tStringBuilder consult = new StringBuilder();\r\n\t\tStringBuilder unionSearchMessages = new StringBuilder();\r\n\t\tString searchMessages = \"\";\r\n\t\ttry {\r\n\t\t\tadvancedSearch(consult, parameters, bundle, unionSearchMessages);\r\n\t\t\tList<Pluviometer> pluviometerList = pluviometerDao\r\n\t\t\t\t\t.consultPluviometer(consult, parameters);\r\n\t\t\tpluviometerPojoList = new ArrayList<PluviometerPojo>();\r\n\t\t\tif (pluviometerList != null) {\r\n\t\t\t\tfor (Pluviometer pluviometer : pluviometerList) {\r\n\t\t\t\t\tDate date = pluviometer.getDateRecord();\r\n\t\t\t\t\tif (pluviometerPojo == null\r\n\t\t\t\t\t\t\t|| !((date.after(pluviometerPojo.getStartWeek()) && date\r\n\t\t\t\t\t\t\t\t\t.before(pluviometerPojo.getEndWeek())))) {\r\n\t\t\t\t\t\tpluviometerPojo = new PluviometerPojo();\r\n\t\t\t\t\t\tpluviometerPojo.setWeek(ControladorFechas\r\n\t\t\t\t\t\t\t\t.getNumberWeek(pluviometer.getDateRecord()));\r\n\t\t\t\t\t\tpluviometerPojo.setStartWeek(ControladorFechas\r\n\t\t\t\t\t\t\t\t.diaInicialSemana(pluviometer.getDateRecord()));\r\n\t\t\t\t\t\tpluviometerPojo.setEndWeek(ControladorFechas\r\n\t\t\t\t\t\t\t\t.diaFinalSemana(pluviometer.getDateRecord()));\r\n\t\t\t\t\t\tpluviometerPojo.setTotal(0);\r\n\t\t\t\t\t\tpluviometerPojo.setVector(new int[7]);\r\n\t\t\t\t\t\tpluviometerPojoList.add(pluviometerPojo);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tint numberDay = ControladorFechas.getNumberDay(date);\r\n\t\t\t\t\tif (numberDay != 1) {\r\n\t\t\t\t\t\tnumberDay = numberDay - 1;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnumberDay = 7;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpluviometerPojo.setVectorPos(numberDay - 1,\r\n\t\t\t\t\t\t\tpluviometer.getReading());\r\n\t\t\t\t\tpluviometerPojo.setTotal(pluviometerPojo.getTotal()\r\n\t\t\t\t\t\t\t+ pluviometer.getReading());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlong amount = (long) pluviometerPojoList.size();\r\n\t\t\tpagination.paginar(amount);\r\n\t\t\tint totalReg = pagination.getRango();\r\n\t\t\tint start = pagination.getInicio();\r\n\t\t\tint rank = start + totalReg;\r\n\t\t\tif (pluviometerPojoList.size() < rank) {\r\n\t\t\t\trank = pluviometerPojoList.size();\r\n\t\t\t}\r\n\t\t\tthis.pluviometerPojoSubList = pluviometerPojoList.subList(start,\r\n\t\t\t\t\trank);\r\n\t\t\tif ((pluviometerPojoList == null || pluviometerPojoList.size() <= 0)\r\n\t\t\t\t\t&& !\"\".equals(unionSearchMessages.toString())) {\r\n\t\t\t\tsearchMessages = MessageFormat\r\n\t\t\t\t\t\t.format(bundle\r\n\t\t\t\t\t\t\t\t.getString(\"message_no_existen_registros_criterio_busqueda\"),\r\n\t\t\t\t\t\t\t\tunionSearchMessages);\r\n\t\t\t} else if (pluviometerPojoList == null\r\n\t\t\t\t\t|| pluviometerPojoList.size() <= 0) {\r\n\t\t\t\tControladorContexto.mensajeInformacion(null,\r\n\t\t\t\t\t\tbundle.getString(\"message_no_existen_registros\"));\r\n\t\t\t} else if (!\"\".equals(unionSearchMessages.toString())) {\r\n\t\t\t\tsearchMessages = MessageFormat\r\n\t\t\t\t\t\t.format(bundle\r\n\t\t\t\t\t\t\t\t.getString(\"message_existen_registros_criterio_busqueda\"),\r\n\t\t\t\t\t\t\t\tbundleLifeCycle.getString(\"rain_gauge_label_s\"),\r\n\t\t\t\t\t\t\t\tunionSearchMessages);\r\n\t\t\t}\r\n\t\t\tvalidate.setMensajeBusqueda(searchMessages);\r\n\t\t} catch (Exception e) {\r\n\t\t\tControladorContexto.mensajeError(e);\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tclass Ulamek{\r\n\t\t\tprivate int licznik, mianownik;\r\n\r\n\t\t\tpublic void ustawLicznik (int l){\r\n\t\t\t\tlicznik=l;\r\n\t\t\t}\r\n\t\t\tpublic void ustawMianownik (int m){\r\n\t\t\t\tmianownik=m;\r\n\t\t\t}\r\n\t\t\tpublic void ustawUlamek (int u1, int u2){\r\n\t\t\t\tlicznik=u1;\r\n\t\t\t\tmianownik=u2;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpublic void wyswietl (){\r\n\t\t\t\t\r\n\t\t\t\tint przod, reszta, przod_dlugosc, mianownik_dlugosc, licznik_dlugosc;\r\n\t\t\t\tString przod_zamiana, mianownik_string, licznik_string;\r\n\t\t\t\tdouble wynik;\r\n\t\t\t\t\r\n\t\t\t\tif (mianownik!=0 && licznik !=0){\r\n\t\t\t\tprzod=licznik/mianownik;\r\n\t\t\t\treszta=licznik-(przod*mianownik);\r\n\t\t\t\tprzod_zamiana=\"\"+przod;\r\n\t\t\t\tprzod_dlugosc=przod_zamiana.length();\r\n\t\t\t\twynik=1.0*licznik/mianownik;\r\n\t\t\t\t\r\n\t\t\t\tif(reszta!=0){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tint licznik = 0;\r\n\t\t\t\t\tdo{\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t licznik++;\r\n\t\t\t\t\t}while (licznik!=przod_dlugosc);\r\n\t\t\t\tSystem.out.println(reszta);\r\n\t\t\t}\r\n\r\n\t\t\t\t//zamiana na stringa i liczenie\r\n\t\t\t\tmianownik_string=\"\"+mianownik;\r\n\t\t\t\tmianownik_dlugosc=mianownik_string.length();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//brak calości\r\n\t\t\t\tif(przod==0){\r\n\t\t\t\tSystem.out.print(\" \"+\" \"+\" \");\r\n\t\t\t\tint licznik3 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t licznik3++;\r\n\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t System.out.print(\" = \"+wynik);\r\n\r\n\t\t\t System.out.println();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\r\n\r\n\t\t\t\tif(przod!=0){\r\n\t\t\t\tSystem.out.print(\" \"+przod+\" \");\r\n\t\t\t\tint licznik3 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t\tif(reszta!=0){\r\n\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t}\r\n\t\t\t\t licznik3++;\r\n\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t System.out.print(\" = \"+wynik);\r\n\r\n\t\t\t System.out.println();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(reszta!=0){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tint licznik2 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t\tif(reszta!=0){\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t licznik2++;\r\n\t\t\t\t\t\r\n\t\t\t\t}while (licznik2!=przod_dlugosc);\r\n\t\t\t\tSystem.out.println(mianownik);\r\n\t\t\t System.out.println();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//jezeli blad \r\n\t\t\t\t\tmianownik_string=\"\"+mianownik;\r\n\t\t\t\t\tmianownik_dlugosc=mianownik_string.length();\r\n\t\t\t\t\tlicznik_string=\"\"+licznik;\r\n\t\t\t\t\tlicznik_dlugosc=licznik_string.length();\r\n\t\t\t\t\tif(licznik_dlugosc>mianownik_dlugosc){\r\n\t\t\t\t\t\tmianownik_dlugosc=licznik_dlugosc;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//gora\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t//if(licznik==0){\r\n\t\t\t\t\t//System.out.print(\" \");\r\n\t\t\t\t\t//}\r\n\r\n\t\t\t\t\tSystem.out.println(licznik);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//srodek\r\n\t\t\t\t\tSystem.out.print(\" \"+\" \"+\" \");\r\n\t\t\t\t\t\r\n\t\t\t\t\tint licznik3 = 0;\r\n\t\t\t\t\tdo{\r\n\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t licznik3++;\r\n\t\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t\t System.out.print(\" = \"+\"ERR\");\r\n\r\n\t\t\t\t System.out.println();\r\n\t\t\t\t\t\r\n\t\t\t\t //dol\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t\t\tSystem.out.println(mianownik);\r\n\t\t\t\t\t System.out.println();\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t Ulamek u1=new Ulamek();\r\n\t\t Ulamek u2=new Ulamek();\r\n\r\n\t\t u1.ustawLicznik(3);\r\n\t\t u1.ustawMianownik(5);\r\n\r\n\t\t u2.ustawLicznik(142);\r\n\t\t u2.ustawMianownik(8);\r\n\r\n\t\t u1.wyswietl();\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t \r\n\t\t u2.wyswietl();\r\n\r\n\r\n\r\n\r\n\t\t u2.ustawUlamek(100,0);\r\n\r\n\r\n\t\t u2.wyswietl();\r\n\r\n\t}",
"public void determinarEstadoSalud(){\n \n for (int i = 0; i < listaEmpleados.size(); i++) {\n //Este for chequea si tiene alguna enfermedad preexistente -> asigna puntajes de acuerdo\n for (int j = 0; j < factoresRiesgo.length; j++) {\n \n if(listaEmpleados.get(i).getFactoresRiesgo().contains(factoresRiesgo[j])){ \n listaEmpleados.get(i).setEstadoSalud(30);\n }\n }\n //Verifica el rango de edad de la persona -> asigna puntajes de acuerdo\n if(listaEmpleados.get(i).getEdad() >= 70){\n listaEmpleados.get(i).setEstadoSalud(listaEmpleados.get(i).getEstadoSalud()+50);\n }\n if(listaEmpleados.get(i).getEdad() >= 40 && listaEmpleados.get(i).getEdad() < 70 ){\n listaEmpleados.get(i).setEstadoSalud(listaEmpleados.get(i).getEstadoSalud()+30);\n }\n if(listaEmpleados.get(i).getEdad() >= 20 && listaEmpleados.get(i).getEdad() < 40 ){\n listaEmpleados.get(i).setEstadoSalud(listaEmpleados.get(i).getEstadoSalud()+10);\n }\n //Los hombre tienen mas probabilidades de morir por la mayoria de enfermedad, incluyendo el covid-19\n if(listaEmpleados.get(i).getSexo().equals(\"hombre\")){\n listaEmpleados.get(i).setEstadoSalud(listaEmpleados.get(i).getEstadoSalud()+15);\n \n }\n //Verifica los diferentes puntajes y almacena los empleados en diferentes arraylist dependiendo su prioridad\n \n if(listaEmpleados.get(i).getEstadoSalud() >= 80){\n EmpleadosPrioridadAlta.add(listaEmpleados.get(i)); \n }\n \n if(listaEmpleados.get(i).getEstadoSalud() >= 60 && listaEmpleados.get(i).getEstadoSalud() < 80){\n EmpleadosPrioridadMediaAlta.add(listaEmpleados.get(i));\n }\n \n if(listaEmpleados.get(i).getEstadoSalud() >= 35 && listaEmpleados.get(i).getEstadoSalud() < 60){\n EmpleadosPrioridadMedia.add(listaEmpleados.get(i));\n }\n \n if(listaEmpleados.get(i).getEstadoSalud() >= 0 && listaEmpleados.get(i).getEstadoSalud() < 35){\n EmpleadosPrioridadBaja.add(listaEmpleados.get(i));\n }\n \n } \n \n }",
"private void filtrirajPoParametrima(SelectConditionStep<?> select,\n UniverzalniParametri parametri) {\n if (parametri.getRobaKategorije() != null\n && parametri.getRobaKategorije().isGrupaPretraga() == true) {\n select.and(ROBA.GRUPAID.in(parametri.getRobaKategorije().getFieldName()));\n } else if (parametri.getRobaKategorije() != null\n && parametri.getRobaKategorije().isPodgrupaPretraga() == true) {\n select.and(ROBA.PODGRUPAID.in(parametri.getPodGrupe().stream().map(PodGrupa::getPodGrupaId)\n .collect(Collectors.toList())));\n }\n\n if (!StringUtils.isEmpty(parametri.getProizvodjac())) {\n select.and(ROBA.PROID.eq(parametri.getProizvodjac()));\n }\n\n if (!StringUtils.isEmpty(parametri.getPodgrupaZaPretragu())) {\n List<Integer> podgrupe = parametri.getPodGrupe().stream().filter(\n podGrupa -> podGrupa.getNaziv().equalsIgnoreCase(parametri.getPodgrupaZaPretragu()))\n .map(PodGrupa::getPodGrupaId).collect(Collectors.toList());\n if (!podgrupe.isEmpty()) {\n select.and(ROBA.PODGRUPAID.in(podgrupe));\n }\n }\n if (parametri.isNaStanju()) {\n select.and(ROBA.STANJE.greaterThan(new BigDecimal(0)));\n }\n }",
"public void wczytaj() {\n\t\tTowar t=new Towar();\n\t\tString nazwa;\n\t\tDouble ilosc;\n\t\tDouble cena;\n\t\tDouble wartosc;\n\t\tScanner odczyt=new Scanner(System.in);\n\t\tSystem.out.println(\"Ile towarow chcesz dodac\");\n\t\tint n=odczyt.nextInt();\n\t\tlista=new ArrayList<Towar>(n);\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tSystem.out.println(\"Podaj nazwe\");\n\t\t\tnazwa=odczyt.next();\t\t\t \n\t\t\tSystem.out.println(\"Podaj ilosc\");\n\t\t\tilosc=odczyt.nextDouble();\t\t\t \n\t\t\tSystem.out.println(\"Podaj cene\");\n\t\t\tcena=odczyt.nextDouble();\t\t\t \n\t\t\tSystem.out.println(\"Podaj wartosc\");\n\t\t\twartosc=odczyt.nextDouble();\n\t\t\tt=new Towar(nazwa,ilosc,cena,wartosc);\n\t\t\tlista.add(t);\n\t}\n\t\t\n\t\t\n\t}",
"boolean potvrdiUnos(){\r\n\t\tboolean odluka = false;\r\n\t\tboolean test = true;\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\t//trazenje od korisnika da odabere opciju\r\n\t\tdo{\r\n\t\t\tSystem.out.println(\"Izvrsiti?(DA/NE)\");\r\n\t\t\tString karakter = in.next();\r\n\t\t\tif(karakter.equals(\"DA\") || karakter.equals(\"da\")){\r\n\t\t\t\todluka = true;\r\n\t\t\t\ttest = false;\r\n\t\t\t}\r\n\t\t\tif(karakter.equals(\"NE\") || karakter.equals(\"ne\")){\r\n\t\t\t\ttest = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}while(test);\r\n\t\treturn odluka;\r\n\t}",
"void rozpiszKontraktyPart2NoEV(int index,float wolumenHandlu, float sumaKupna,float sumaSprzedazy )\n\t{\n\t\tArrayList<Prosument> listaProsumentowTrue =listaProsumentowWrap.getListaProsumentow();\n\t\t\n\n\t\tint a=0;\n\t\twhile (a<listaProsumentowTrue.size())\n\t\t{\n\t\t\t\t\t\t\n\t\t\t// ustala bianrke kupuj\n\t\t\t// ustala clakowita sprzedaz (jako consumption)\n\t\t\t//ustala calkowite kupno (jako generacje)\n\t\t\tDayData constrainMarker = new DayData();\n\t\t\t\n\t\t\tArrayList<Point> L1\t=listaFunkcjiUzytecznosci.get(a);\n\t\t\t\n\t\t\t//energia jaka zadeklarowal prosument ze sprzeda/kupi\n\t\t\tfloat energia = L1.get(index).getIloscEnergiiDoKupienia();\n\t\t\t\n\t\t\tif (energia>0)\n\t\t\t{\n\t\t\t\tfloat iloscEnergiiDoKupienia = energia/sumaKupna*wolumenHandlu;\n\t\t\t\t\n\t\t\t\tconstrainMarker.setKupuj(1);\n\t\t\t\tconstrainMarker.setGeneration(iloscEnergiiDoKupienia);\n\t\t\t\t\n\t\t\t\trynekHistory.ustawBetaDlaWynikowHandlu(iloscEnergiiDoKupienia,a);\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfloat iloscEnergiiDoSprzedania = energia/sumaSprzedazy*wolumenHandlu;\n\n\t\t\t\t\n\t\t\t\tconstrainMarker.setKupuj(0);\n\t\t\t\tconstrainMarker.setConsumption(iloscEnergiiDoSprzedania);\n\t\t\t\t\n\t\t\t\trynekHistory.ustawBetaDlaWynikowHandlu(iloscEnergiiDoSprzedania,a);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tArrayList<Float> priceVector = priceVectorsList.get(priceVectorsList.size()-1);\n\t\t\t\n\t\t\t//poinformuj prosumenta o wyniakch handlu i dostosuj go do wynikow\n\t\t\tlistaProsumentowTrue.get(a).getKontrakt(priceVector,constrainMarker);\n\t\t\t\n\t\t\ta++;\n\t\t}\n\t}",
"@Test\r\n public void testCalculerValeurTerrainAgricole() {\n Lot lot1 = new Lot(\"Lot1\", 2, 0, 300, \"14-02-2019\");\r\n Lot lot2 = new Lot(\"Lot2\", 2, 0, 600, \"12-06-2019\");\r\n Lot lot3 = new Lot(\"Lot3\", 2, 0, 1500, \"04-02-2019\");\r\n List<Lot> lots = new ArrayList();\r\n lots.add(lot1);\r\n lots.add(lot2);\r\n lots.add(lot3);\r\n // Terrain (typeTerrain, prix_min2, prix_min2, listLot)\r\n Terrain terrain = new Terrain(0, 50.00, 75.00, lots);\r\n Agricole.calculerValeurTerrainAgricole(terrain);\r\n // valFonciereAttendue = 50.0*300 + 50.0*600 + 50.0*1500 + 733.77 +\r\n // nbreDroitPassage = 500-(2*(5/100*300*50)) + 500-(2*(5/100*600*50))+\r\n // 500-(2*(5/100*1500*50)\r\n double valFonciereAttendue = 110233.8;\r\n double taxeScolaireAttendue=1322.85;\r\n double taxeMunicipaleAttendue = 2755.85;\r\n boolean resultat = valFonciereAttendue == terrain.getValeur_fonciere_totale()\r\n && taxeScolaireAttendue == terrain.getTaxe_scolaire()\r\n && taxeMunicipaleAttendue == terrain.getTaxe_municipale();\r\n assertTrue(\"valfoncièreAttendue: \" + valFonciereAttendue+\", vs valeur obtenue: \"+terrain.getValeur_fonciere_totale()\r\n + \"\\ntaxe scolaire attendue: \" + taxeScolaireAttendue+\", vs valeur obtenue: \"+terrain.getTaxe_scolaire()\r\n + \"\\ntaxe muninipale attendue: \" + taxeMunicipaleAttendue+\", vs valeur obtenue: \"+terrain.getTaxe_municipale(), \r\n resultat); \r\n \r\n }",
"public void aktualisiere(PhysicalObject po){\n\t\tthis.po=po;\n\t\tKipper kipperObj= (Kipper) po;\t\t\n\t\tx = kipperObj.getX();\n\t\ty = kipperObj.getY();\n\t\tbreite=kipperObj.getBreite();\n\t\tlaenge=kipperObj.getLaenge();\n\t\twinkel=kipperObj.getWinkel();\n\t\tlkwfahrt=kipperObj.isFahrt();\t\t\n\t\tif (kipperObj.getMaterialListe().size() == 1) {\n\t\t\tmatRatio=kipperObj.getMaterialListe().get(0).getVolumen()/kipperObj.getMaxVolumen();\t\n\t\t\tif(matRatio > 1)\n\t\t\t\tmatRatio=1;\n\t\t}\t\t\n\t}"
]
| [
"0.6618446",
"0.6302622",
"0.6142502",
"0.5897853",
"0.5800527",
"0.5788575",
"0.57520497",
"0.5750701",
"0.5698028",
"0.5644027",
"0.5611908",
"0.5591729",
"0.55636525",
"0.5544171",
"0.54995185",
"0.54791355",
"0.54693854",
"0.5446539",
"0.5399032",
"0.53752416",
"0.5299137",
"0.5287982",
"0.52795404",
"0.52512616",
"0.5132617",
"0.5127955",
"0.5117001",
"0.511571",
"0.50815743",
"0.50762165",
"0.5047438",
"0.50332236",
"0.502577",
"0.5023538",
"0.50219107",
"0.5016502",
"0.4999235",
"0.49502423",
"0.49324676",
"0.49245125",
"0.49091157",
"0.49075952",
"0.49075568",
"0.48900077",
"0.48857546",
"0.48827285",
"0.48798504",
"0.48567435",
"0.48537165",
"0.4850695",
"0.4847442",
"0.48310634",
"0.48216346",
"0.48192218",
"0.48189595",
"0.48158988",
"0.48072258",
"0.48031884",
"0.4796269",
"0.4789412",
"0.47826648",
"0.4780849",
"0.4759097",
"0.4752715",
"0.47485602",
"0.47444025",
"0.47412103",
"0.47264254",
"0.471946",
"0.47145048",
"0.4689481",
"0.46837386",
"0.46667635",
"0.46589425",
"0.46534285",
"0.46469057",
"0.46459767",
"0.46450406",
"0.46359244",
"0.4635737",
"0.4632737",
"0.4632554",
"0.46292603",
"0.4628245",
"0.4625609",
"0.46252897",
"0.46226096",
"0.462068",
"0.46145728",
"0.46133852",
"0.4613263",
"0.46131048",
"0.4610156",
"0.46093085",
"0.4603768",
"0.4603412",
"0.4598191",
"0.45952868",
"0.45883587",
"0.45838615"
]
| 0.63299644 | 1 |
Metoda wybiera losowe pole dostepne do ostrzelania na planszy przeciwnika i zwraca obiekt typu Pozycja zawierajacy te wspolrzedne. | private Pozycja losujPole(Plansza oPlanszaPrzeciwnika)
{
try
{
Pozycja oWylosowanePole = new Pozycja(2);
int iWylosowanePole = oRand.nextInt( oPlanszaPrzeciwnika.getIloscNieznanych() ) + 1;
//obliczenie x i y dla wylosowanego pola
int iX = 0;
int iY = 0;
while (iWylosowanePole > 0)
{
if (oPlanszaPrzeciwnika.getPole(iX, iY) == PlanszaTypPola.PLANSZA_POLE_PUSTE || oPlanszaPrzeciwnika.getPole(iX, iY) == PlanszaTypPola.PLANSZA_STATEK)
--iWylosowanePole;
if (iWylosowanePole > 0)
{
++iX;
if (iX == oPlanszaPrzeciwnika.getSzerokosc())
{
++iY;
iX = 0;
}
}
}
oWylosowanePole.setX(iX);
oWylosowanePole.setY(iY);
return oWylosowanePole;
}
catch (ParametrException e)
{
throw new ProgramistaException(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void AwansSpoleczny() {\n\t\tSystem.out.println(\"AwansSpoleczny\");\n\t\tif(Plansza.getNiewolnikNaPLanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getNiewolnikNaPLanszy() instanceof Niewolnicy) {\n\t\t\tPlansza.setNiewolnikNaPlanszy(new Mieszczanie(Plansza.getNiewolnikNaPLanszy()));\n\t\t}\n\t\t\t\n\t\tif(Plansza.getRzemieslnikNaPlanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getRzemieslnikNaPlanszy() instanceof Rzemieslnicy) {\n\t\t\tPlansza.setRzemieslnikNaPlanszy(new Handlarze(Plansza.getRzemieslnikNaPlanszy()));\n\t\t}\n\t\t\t\n\t\tif(Plansza.getArystokrataNaPlanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getArystokrataNaPlanszy() instanceof Arystokracja) {\n\t\t\tPlansza.setArystokrataNaPlanszy(new Szlachta(Plansza.getArystokrataNaPlanszy()));\n\t\t}\n\t}",
"public void obliczSzanseWykolejenia(Tramwaj tramwaj, Pogoda pogoda, Motorniczy motorniczy, Przystanek przystanek){\r\n RegulyWykolejen regulyWykolejen= new RegulyWykolejen();\r\n this.szansaWykolejenia = pogoda.getRyzyko() + przystanek.getStanTechnicznyPrzystanku() + tramwaj.getStanTechTramwaju() + regulyWykolejen.regulaWiek(motorniczy.getWiek()) + regulyWykolejen.regulaDoswiadczenie(motorniczy.getDoswiadczenie());\r\n }",
"public void ustawPojazdNaPoczatek()\n\t{\n\t\tSciezka pierwszaSc = droga.get(0);\n\t\tfinal double y = 10;\n\t\tpojazd.zmienPozycje(pierwszaSc.getCenterDownX(), y);\n\t}",
"public void pobierzukladprzegladRZiSBO() {\r\n if (uklad.getUklad() == null) {\r\n uklad = ukladBRDAO.findukladBRPodatnikRokPodstawowy(wpisView.getPodatnikObiekt(), wpisView.getRokWpisuSt());\r\n }\r\n List<PozycjaRZiSBilans> pozycje = UkladBRBean.pobierzpozycje(pozycjaRZiSDAO, pozycjaBilansDAO, uklad, \"\", \"r\");\r\n UkladBRBean.czyscPozycje(pozycje);\r\n rootProjektRZiS.getChildren().clear();\r\n List<StronaWiersza> zapisy = StronaWierszaBean.pobraniezapisowwynikoweBO(stronaWierszaDAO, wpisView);\r\n try {\r\n PozycjaRZiSFKBean.ustawRoota(rootProjektRZiS, pozycje, zapisy);\r\n level = PozycjaRZiSFKBean.ustawLevel(rootProjektRZiS, pozycje);\r\n Msg.msg(\"i\", \"Pobrano układ \");\r\n } catch (Exception e) {\r\n E.e(e);\r\n rootProjektRZiS.getChildren().clear();\r\n Msg.msg(\"e\", e.getLocalizedMessage());\r\n }\r\n }",
"public Pojazd dostepDoPojazdu()\n\t{\n\t\treturn pojazd;\n\t}",
"public void setPozycja(PozycjaZamowienia pozycja){\n\t\tthis.pozycja = pozycja;\n\t}",
"public void Zabojstwa() {\n\t\tSystem.out.println(\"Zabojstwa\");\n\t\tfor(int i=0;i<Plansza.getNiebezpieczenstwoNaPlanszy().size();i++) {\n\t\t\tfor(GenerujNiebezpieczenstwo niebez : Plansza.getNiebezpieczenstwoNaPlanszy()) {\n\n\t\t\t\tif(niebez.getZabojca() instanceof DzikieZwierzeta) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getUbrania() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getNiewolnikNaPLanszy().getJedzenie() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setUbrania(Plansza.getNiewolnikNaPLanszy().getUbrania() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setJedzenie(Plansza.getNiewolnikNaPLanszy().getJedzenie() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setLicznikNiebezpieczenstw(Plansza.getNiewolnikNaPLanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Bandyci) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getMaterialy() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getRzemieslnikNaPlanszy().getNarzedzia() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tif(GeneratorRandom.RandomOd0(101) <= ZapisOdczyt.getRzemieslnicySzansa()) {\n\t\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setMaterialy(Plansza.getRzemieslnikNaPlanszy().getMaterialy() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setNarzedzia(Plansza.getRzemieslnikNaPlanszy().getNarzedzia() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getRzemieslnikNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Zlodzieje) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getTowary() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getArystokrataNaPlanszy().getZloto() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setTowary(Plansza.getArystokrataNaPlanszy().getTowary() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setZloto(Plansza.getArystokrataNaPlanszy().getZloto() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getArystokrataNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"protected boolean strzalSasiadujacy(StatekIterator oStatkiPrzeciwnika)\n\t\t{\n\t\t//przygotowanie kontenera przechowujacego do 4 sasiednich pol, ktore nadaja sie do kolejnego strzalu\n\t\tArrayList<Pozycja> oSasiedniePola = new ArrayList<Pozycja>(4);\n\t\t//petla wyszukujaca we wczesniejszych trafieniach pola do oddania kolejnego strzalu\n\t\twhile (oUzyteczneTrafienia.size() > 0)\n\t\t\t{\n\t\t\t//wylosowanie pola do przetestowania\n\t\t\tint iLosowanePole = oRand.nextInt(oUzyteczneTrafienia.size());\n\t\t\tPozycja oWybranePole = oUzyteczneTrafienia.get(iLosowanePole);\n\t\t\t\n\t\t\ttry\n\t\t\t\t{\n\t\t\t\t//wczytanie wspolrzednych 4 sasiadow i sprawdzenie, czy sa to pola puste, lub zawierajace statek\n\t\t\t\tfor (int i = -1; i <= 1; ++i)\n\t\t\t\t\tfor (int j = -1; j <= 1; ++j)\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\toWybranePole.getX() + i >= 0 && oWybranePole.getX() + i < oStatkiPrzeciwnika.getPlansza().getSzerokosc()\n\t\t\t\t\t\t\t&& oWybranePole.getY() + j >= 0 && oWybranePole.getY() + j < oStatkiPrzeciwnika.getPlansza().getWysokosc()\n\t\t\t\t\t\t\t&& (i + j == -1 || i + j == 1)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (oStatkiPrzeciwnika.getPlansza().getPole(oWybranePole.getX() + i, oWybranePole.getY() + j) == PlanszaTypPola.PLANSZA_POLE_PUSTE\n\t\t\t\t\t\t\t\t|| oStatkiPrzeciwnika.getPlansza().getPole(oWybranePole.getX() + i, oWybranePole.getY() + j) == PlanszaTypPola.PLANSZA_STATEK\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tPozycja oPrawidlowe = new Pozycja(2);\n\t\t\t\t\t\t\t\toPrawidlowe.setX(oWybranePole.getX() + i);\n\t\t\t\t\t\t\t\toPrawidlowe.setY(oWybranePole.getY() + j);\n\t\t\t\t\t\t\t\toSasiedniePola.add(oPrawidlowe);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (bProsteLinie == true)\n\t\t\t\t\t{\n\t\t\t\t\tboolean bPionowy = false;\n\t\t\t\t\tboolean bPoziomy = false;\n\t\t\t\t\tfor (int i = -1; i <= 1; ++i)\n\t\t\t\t\t\tfor (int j = -1; j <= 1; ++j)\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\toWybranePole.getX() + i >= 0 && oWybranePole.getX() + i < oStatkiPrzeciwnika.getPlansza().getSzerokosc()\n\t\t\t\t\t\t\t\t&& oWybranePole.getY() + j >= 0 && oWybranePole.getY() + j < oStatkiPrzeciwnika.getPlansza().getWysokosc()\n\t\t\t\t\t\t\t\t&& (i + j == -1 || i + j == 1)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (oStatkiPrzeciwnika.getPlansza().getPole(oWybranePole.getX() + i, oWybranePole.getY() + j) == PlanszaTypPola.PLANSZA_STRZAL_CELNY)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (i == 0)\n\t\t\t\t\t\t\t\t\t\tbPionowy = true;\n\t\t\t\t\t\t\t\t\tif (j == 0)\n\t\t\t\t\t\t\t\t\t\tbPoziomy = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\tif (bPionowy == true && bPoziomy == true)\n\t\t\t\t\t\tthrow new ProgramistaException();\n\t\t\t\t\tif (bPionowy == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfor (int i = oSasiedniePola.size() - 1; i >= 0; --i)\n\t\t\t\t\t\t\tif (oSasiedniePola.get(i).getX() != oWybranePole.getX())\n\t\t\t\t\t\t\t\toSasiedniePola.remove(i);\n\t\t\t\t\t\t}\n\t\t\t\t\tif (bPoziomy == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfor (int i = oSasiedniePola.size() - 1; i >= 0; --i)\n\t\t\t\t\t\t\tif (oSasiedniePola.get(i).getY() != oWybranePole.getY())\n\t\t\t\t\t\t\t\toSasiedniePola.remove(i);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (oSasiedniePola.size() > 0)\n\t\t\t\t\t{\n\t\t\t\t\t//sa pola prawidlowe do oddania kolejnego strzalu\n\t\t\t\t\tint iWylosowanySasiad = oRand.nextInt(oSasiedniePola.size());\n\t\t\t\t\t//oddanie strzalu na wspolrzedne weybranego pola\n\t\t\t\t\tboolean bStrzal;\n\t\t\t\t\tbStrzal = oStatkiPrzeciwnika.strzal(oSasiedniePola.get(iWylosowanySasiad).getX(), oSasiedniePola.get(iWylosowanySasiad).getY());\n\t\t\t\t\tif (bStrzal == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t//zapisanie celnego strzalu w tablicy trafien\n\t\t\t\t\t\tPozycja oTrafienie = new Pozycja(2);\n\t\t\t\t\t\toTrafienie.setX( oSasiedniePola.get(iWylosowanySasiad).getX() );\n\t\t\t\t\t\toTrafienie.setY( oSasiedniePola.get(iWylosowanySasiad).getY() );\n\t\t\t\t\t\toUzyteczneTrafienia.add(oTrafienie);\n\t\t\t\t\t\t}\n\t\t\t\t\treturn bStrzal;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t//brak prawidlowych pol. usuniecie trafienia z listy i przejscie do kolejnej iteracji petli wyszukujacej\n\t\t\t\t\toUzyteczneTrafienia.remove(iLosowanePole);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tcatch (ParametrException e)\n\t\t\t\t{\n\t\t\t\tthrow new ProgramistaException(e);\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\treturn strzalLosowy(oStatkiPrzeciwnika);\n\t\t}",
"public boolean Wygrana() {\n\t\tSystem.out.println(\"Wygrana\");\n\t\tif(SprawdzanieWygranej.WygranaNiewolnikow()) {\n\t\t\tZapisOdczyt.setWygranaKlasa(Plansza.getNiewolnikNaPLanszy());\n\t\t\tZapisOdczyt.setWygranaKlasaPopulacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t\n\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getPopulacja() >= Plansza.getArystokrataNaPlanszy().getPopulacja()) {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getRzemieslnikNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getArystokrataNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getArystokrataNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getRzemieslnikNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\tif(SprawdzanieWygranej.WygranaRzemieslnikow()) {\n\t\t\tZapisOdczyt.setWygranaKlasa(Plansza.getRzemieslnikNaPlanszy());\n\t\t\tZapisOdczyt.setWygranaKlasaPopulacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t\n\t\t\tif(Plansza.getNiewolnikNaPLanszy().getPopulacja() >= Plansza.getArystokrataNaPlanszy().getPopulacja()) {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getNiewolnikNaPLanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getArystokrataNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getArystokrataNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getNiewolnikNaPLanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\tif(SprawdzanieWygranej.WygranaArystokracji()) {\n\t\t\tZapisOdczyt.setWygranaKlasa(Plansza.getArystokrataNaPlanszy());\n\t\t\tZapisOdczyt.setWygranaKlasaPopulacja(Plansza.getArystokrataNaPlanszy().getPopulacja());\n\t\t\t\n\t\t\tif(Plansza.getNiewolnikNaPLanszy().getPopulacja() >= Plansza.getRzemieslnikNaPlanszy().getPopulacja()) {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getNiewolnikNaPLanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getRzemieslnikNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tZapisOdczyt.setMiejsce2(Plansza.getRzemieslnikNaPlanszy());\n\t\t\t\tZapisOdczyt.setMiejsce2Populacja(Plansza.getRzemieslnikNaPlanszy().getPopulacja());\n\t\t\t\tZapisOdczyt.setMiejsce3(Plansza.getNiewolnikNaPLanszy());\n\t\t\t\tZapisOdczyt.setMiejsce3Populacja(Plansza.getNiewolnikNaPLanszy().getPopulacja());\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public void setPolaznik(Polaznik polaznik) {\n this.polaznik = polaznik;\n }",
"protected boolean strzalLosowy(StatekIterator oStatkiPrzeciwnika)\n\t\t{\n\t\ttry\n\t\t\t{\n\t\t\tPozycja oWylosowanePole = losujPole(oStatkiPrzeciwnika.getPlansza());\n\t\t\tboolean bTrafienie = oStatkiPrzeciwnika.strzal(oWylosowanePole.getX(), oWylosowanePole.getY());\n\t\t\tif (bTrafienie == true)\n\t\t\t\t{\n\t\t\t\t//zapisanie celnego strzalu w tablicy trafien\n\t\t\t\tPozycja oTrafienie = new Pozycja(2);\n\t\t\t\toTrafienie.setX(oWylosowanePole.getX());\n\t\t\t\toTrafienie.setY(oWylosowanePole.getY());\n\t\t\t\toUzyteczneTrafienia.add(oTrafienie);\n\t\t\t\t}\n\t\t\treturn bTrafienie;\n\t\t\t}\n\t\tcatch (ParametrException e)\n\t\t\t{\n\t\t\tthrow new ProgramistaException(e);\n\t\t\t}\n\t\t}",
"public KlijentPovezanaOsobaRs procitajSvePovezaneOsobePOVIJEST(KlijentPovezanaOsobaVo value) {\r\n return null;\r\n }",
"public void ZbierzTowaryKlas() {\n\t\tSystem.out.println(\"ZbierzTowaryKlas\");\n\t\tfor(int i=0;i<Plansza.getTowarNaPlanszy().size();i++) {\n\t\t\tfor(Towar towar : Plansza.getTowarNaPlanszy()) {\n\t\t\t\t\n\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getNiewolnikNaPLanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getNiewolnikNaPLanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\t//Szansa Niewolnika na zdobycie dwoch razy wiecej towarow\n\t\t\t\t\t\tif(GeneratorRandom.RandomOd0(101) <= ZapisOdczyt.getNiewolnicySzansa()) {\n\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setLicznikTowarow(Plansza.getNiewolnikNaPLanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getRzemieslnikNaPlanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getRzemieslnikNaPlanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setLicznikTowarow(Plansza.getRzemieslnikNaPlanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getArystokrataNaPlanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getArystokrataNaPlanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setLicznikTowarow(Plansza.getArystokrataNaPlanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private Zivocich vytvorZivocicha() {\r\n final String[] zFarba = {\"cervena\", \"zelena\", \"modra\", \"zlta\", \"zlto-zelena\"};\r\n Zivocich zviera = null;\r\n double kolkoVazi = 0.0;\r\n\r\n //-- Vygenerujeme zviera\r\n int vygenerovane = 1 + generator.nextInt(4); //cislo <1,4>\r\n\r\n switch (vygenerovane) {\r\n case 1: //blcha \r\n double kolkoDoskoci=3 * generator.nextDouble() ; //cislo <0;2.99>\r\n double kolkoVyskoci=3 * generator.nextDouble() ; //cislo <0;2.99>\r\n zviera=new Blcha(6,kolkoDoskoci,kolkoVyskoci);\r\n break;\r\n case 2: //simpanz\r\n kolkoVazi=3 + (97 * generator.nextDouble()); //cislo <3;99.9>\r\n boolean cviceny;\r\n cviceny=generator.nextBoolean(); \r\n zviera=new Simpanz(kolkoVazi,cviceny);\r\n break;\r\n case 3: //papagaj\r\n kolkoVazi = 0.1 + (5*generator.nextDouble()); // cislo <0.1; 6>\r\n String farba = zFarba[generator.nextInt(5)]; // farba zo zoznamu\r\n zviera = new Papagaj(\"Ara\", 2, kolkoVazi, farba); \r\n break;\r\n case 4: //slon\r\n kolkoVazi=20 + (480*generator.nextDouble()); //cislo <20;500> \r\n int pocet=generator.nextInt(50); //pocet zubov bude <0,49>\r\n zviera=new Slon(kolkoVazi,pocet);\r\n break;\r\n } //------------------------------------------------------------- switch --\r\n return zviera;\r\n }",
"protected boolean strzalWielokrotny(StatekIterator oStatkiPrzeciwnika, int iIloscPowtorzen)\n\t\t{\n\t\ttry\n\t\t\t{\n\t\t\tPozycja oWylosowanePole = null;\n\t\t\tPlansza oPlansza = oStatkiPrzeciwnika.getPlansza();\n\t\t\tfor (int i = 1; i <= iIloscPowtorzen; ++i)\n\t\t\t\t{\n\t\t\t\toWylosowanePole = losujPole(oPlansza);\n\t\t\t\tif (oPlansza.getPole(oWylosowanePole.getX(), oWylosowanePole.getY()) == PlanszaTypPola.PLANSZA_STATEK || i == iIloscPowtorzen)\n\t\t\t\t\t{\n\t\t\t\t\tboolean bStrzal;\n\t\t\t\t\tbStrzal = oStatkiPrzeciwnika.strzal(oWylosowanePole.getX(), oWylosowanePole.getY());\n\t\t\t\t\tif (bStrzal == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t//zapisanie celnego strzalu w tablicy trafien\n\t\t\t\t\t\tPozycja oTrafienie = new Pozycja(2);\n\t\t\t\t\t\toTrafienie.setX( oWylosowanePole.getX() );\n\t\t\t\t\t\toTrafienie.setY( oWylosowanePole.getY() );\n\t\t\t\t\t\toUzyteczneTrafienia.add(oTrafienie);\n\t\t\t\t\t\t}\n\t\t\t\t\treturn bStrzal;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tcatch (ParametrException e)\n\t\t\t{\n\t\t\tthrow new ProgramistaException(e);\n\t\t\t}\n\t\t//petla musi zwrocic strzal. skoro doszlo tutaj - wywal wyjatek\n\t\tthrow new ProgramistaException();\n\t\t}",
"private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}",
"public void realizacjap34() {\n System.out.println(\"REALIZACJA PUNKTU 3\\n\");\n\n System.out.println(\"\\nWyszukiwanie osob po imieniu (Piotr) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzOsobyPoImieniu(Listy.osoby, \"Piotr\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po nazwisku (Oleszczuk) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzOsobyPoNazwisku(Listy.osoby, \"Oleszczuk\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy mniejszym niz 10============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyMniejszymNiz(Listy.osoby, 10).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy większym niz 10============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyWiekszymNiz(Listy.osoby, 10).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy równym 5============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyRownym(Listy.osoby, 5).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin mniejszej niz 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachMniejszychNiz(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin wiekszej niz 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachWiekszychNiz(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin równej 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachRownych(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji wiekszej niz 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiWiekszejNiz(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji mniejszej niz 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiMniejszejNiz(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji rownej 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiRownej(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stanowisku (Adiunkt) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStanowisku(Listy.osoby, \"Adiunkt\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie studenta po numerze indeksu (123456) ============================================================================\\n\");\n System.out.println(NarzedziaWyszukiwania.znajdzStudentaPoIndeksie(Listy.osoby, \"123456\"));\n\n System.out.println(\"\\nWyszukiwanie studentów po roku studiów (1) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzStudentowPoRokuStudiow(Listy.osoby, 1).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie studentów po kierunku (Informatyka Stosowana) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzStudentowPoKierunku(Listy.osoby, \"Informatyka Stosowana\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie kursu po nazwie (Analiza Matematyczna 1) ============================================================================\\n\");\n System.out.println(NarzedziaWyszukiwania.znajdzKursPoNazwie(Listy.kursy, \"Analiza Matematyczna 1\"));\n\n System.out.println(\"\\nWyszukiwanie kursów po liczbie ects (5) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzKursyPoECTS(Listy.kursy, 5).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie kursów po prowadzacym+\"+Listy.osoby.get(0).getImie()+\" \"+Listy.osoby.get(0).getNazwisko()+\" ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzKursyPoProwadzacym(Listy.kursy, Listy.osoby.get(0)).forEach(System.out::println);\n\n\n //REALIZACJA PUNKTU 4\n System.out.println(\"=====================================================================================================================\");\n System.out.println(\"REALIZACJA PUNKTU 4\");\n System.out.println(\"=====================================================================================================================\\n\");\n System.out.println(\"Kursy:\\n\");\n for (Kurs kurs : Listy.kursy) {\n System.out.println(kurs.toString());\n }\n\n System.out.println(\"\\nOsoby:\\n\");\n for (Osoba osoba : Listy.osoby) {\n System.out.println(\"OSOBA====================================================================================================\");\n System.out.println(osoba.toString());\n System.out.println();\n }\n }",
"public void DaneStartowe() {\n\t\tSystem.out.println(\"DaneStartowe\");\n\t\tPlansza.getNiewolnikNaPLanszy().setJedzenie(ZapisOdczyt.getPopulacjaStartowaNiewolnicy());\n\t\tPlansza.getNiewolnikNaPLanszy().setUbrania(ZapisOdczyt.getPopulacjaStartowaNiewolnicy());\n\t\tPlansza.getRzemieslnikNaPlanszy().setMaterialy(ZapisOdczyt.getPopulacjaStartowaRzemieslnicy());\n\t\tPlansza.getRzemieslnikNaPlanszy().setNarzedzia(ZapisOdczyt.getPopulacjaStartowaRzemieslnicy());\n\t\tPlansza.getArystokrataNaPlanszy().setZloto((int) (ZapisOdczyt.getPopulacjaStartowaArystokracja() + ZapisOdczyt.getArystokracjaWiekszaPopulacja()*ZapisOdczyt.getPopulacjaStartowaArystokracja()*0.01));\n\t\tPlansza.getArystokrataNaPlanszy().setTowary((int) (ZapisOdczyt.getPopulacjaStartowaArystokracja() + ZapisOdczyt.getArystokracjaWiekszaPopulacja()*ZapisOdczyt.getPopulacjaStartowaArystokracja()*0.01));\n\t}",
"public static void TroskoviPredjenogPuta() {\n\t\tUtillMethod.izlistavanjeVozila();\n\t\tSystem.out.println(\"Unesite redni broj vozila za koje zelite da racunate predjeni put!\");\n\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\tif (redniBroj < Main.getVozilaAll().size()) {\n\t\t\tif (!Main.getVozilaAll().get(redniBroj).isVozObrisano()) {\n\t\t\t\tSystem.out.println(\"Unesite broj kilometara koje ste presli sa odgovarajucim vozilom\");\n\t\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\t\tVozilo v = Main.getVozilaAll().get(redniBroj);\n\t\t\t\tdouble rezultat;\n\t\t\t\tif(v.getGorivaVozila().size()>1) {\n\t\t\t\t\tGorivo g = UtillMethod.izabirGoriva();\n\t\t\t\t\trezultat = cenaTroskaVoz(v,km,g);\n\t\t\t\t}else {\n\t\t\t\t\t rezultat = cenaTroskaVoz(v,km,v.getGorivaVozila().get(0));\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Cena troskova za predjeni put je \" + rezultat + \"Dinara!\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Ovo vozilo je obrisano i ne moze da se koristi!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t}\n\t}",
"private void zmienne_poziomu(int poziom)\n {\n liczba_zyc =Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc\"));\n liczba_naboi=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_naboi\"));\n liczba_zyc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc_wroga\"));\n liczba_pilek=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_pilek\"));\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_predkosc_wroga\"));\n bonusy_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_bonusy_poziomu\"));\n rozmiar_pilki=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_rozmiar_pilki\"));\n zmiana_ruchu_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_zmiana_ruchu_wroga\"));\n czas_gry=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_czas_gry\"));\n }",
"private void wczytajPlanszeZdalnie()\n\t{\n\t\tPobraniePlanszy pobranie = new PobraniePlanszy(pojazd.ktoryPoziom(), this, port, host);\n\t\tThread zadanie = new Thread(pobranie);\n\t\tzadanie.start();\t\n\t}",
"public void naplnVrcholy() {\r\n System.out.println(\"Zadajte pocet vrcholov: \");\r\n pocetVrcholov = skener.nextInt();\r\n for (int i=0; i < pocetVrcholov; i++) {\r\n nekonecno = (int)(Double.POSITIVE_INFINITY);\r\n if(i==0) { //pre prvy vrchol potrebujeme nastavit vzdialenost 0 \r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu, 0, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n } else { //ostatne budu mat nekonecno alebo v tomto pripade 9999 (lebo tuto hodnotu v mensich grafoch nepresiahnem)\r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu,nekonecno, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n }\r\n }\r\n }",
"public static void trazenjeVozila(Iznajmljivac o) {\n\t\tLocalDate pocetniDatum = UtillMethod.unosDatum(\"pocetni\");\n\t\tLocalDate krajnjiDatum = UtillMethod.unosDatum(\"krajnji\");\n\t\tSystem.out.println(\"------------------------------------\");\n\t\tSystem.out.println(\"Provera dostupnosti vozila u toku...\\n\");\n\t\tArrayList<Vozilo> dostupnaVoz = new ArrayList<Vozilo>();\n\t\tint i = 0;\n\t\tfor (Vozilo v : Main.getVozilaAll()) {\n\t\t\tif (!postojiLiRezervacija(v, pocetniDatum, krajnjiDatum) && !v.isVozObrisano()) {\n\t\t\t\tSystem.out.println(i + \"-\" + v.getVrstaVozila() + \"-\" + \"Registarski broj\" + \"-\" + v.getRegBR()\n\t\t\t\t\t\t+ \"-Potrosnja na 100km-\" + v.getPotrosnja100() + \"litara\");\n\t\t\t\ti++;\n\t\t\t\tdostupnaVoz.add(v);\n\t\t\t}\n\t\t}\n\t\tif (i > 0) {\n\t\t\tSystem.out.println(\"------------------------------------------------\");\n\t\t\tSystem.out.println(\"Ukucajte kilometrazu koju planirate da predjete:\");\n\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\tint km1 = (int) km;\n\t\t\tporedjenjeVozila d1 = new poredjenjeVozila(km1);\n\t\t\tCollections.sort(dostupnaVoz,d1);\n\t\t\tint e = 0;\n\t\t\tfor(Vozilo v : dostupnaVoz) {\n\t\t\t\tdouble temp = cenaTroskaVoz(v, km, v.getGorivaVozila().get(0));\n\t\t\t\tSystem.out.println(e + \" - \" + v.getVrstaVozila()+ \"-Registarski broj: \"+ v.getRegBR()+\" | \"+ \"Cena na dan:\"+v.getCenaDan() +\" | Broj sedista:\"+ v.getBrSedist()+ \" | Broj vrata:\"+ v.getBrVrata() + \"| Cena troskova puta:\" + temp + \" Dinara\");\n\t\t\t\te++;\n\t\t\t}\n\t\t\tSystem.out.println(\"---------------------------------------\");\n\t\t\tSystem.out.println(\"Unesite redni broj vozila kojeg zelite:\");\n\t\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\t\tif (redniBroj < dostupnaVoz.size()) {\n\t\t\t\tDateTimeFormatter formatters = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\t\t\t\tString pocetni = pocetniDatum.format(formatters);\n\t\t\t\tString krajnji = krajnjiDatum.format(formatters);\n\t\t\t\tdouble cena = UtillMethod.cenaIznaj(pocetniDatum, krajnjiDatum, dostupnaVoz.get(redniBroj));\n\t\t\t\tRezervacija novaRez = new Rezervacija(dostupnaVoz.get(redniBroj), o, cena, false, pocetni, krajnji);\n\t\t\t\tMain.getRezervacijeAll().add(novaRez);\n\t\t\t\tSystem.out.println(\"Uspesno ste napravili rezervaciju!\");\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t\tSystem.out.println(novaRez);\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Nema dostupnih vozila za rezervaaciju.\");\n\t\t}\n\t}",
"private void poczatkowe_zmienne()\n {\n konfiguracja.loadProperties();\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(\"predkosc_wroga\"));\n czas_watku=Integer.parseInt(konfiguracja.properties.getProperty(\"czas_watku\"));\n punkty_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(\"punkty_poziomu\"));\n zmienne_poziomu(poziom);\n }",
"public void podstawZapiszDaneWielePlikow() throws IOException {\r\n\t\tBufferedWriter bw = null; // tutaj zaSztywno\r\n\t\tString[] wektorDanych;\r\n\t\tString nazwaPlikuWynikowego = null;\r\n\t\tint licznik = 0;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\t++licznik;\r\n\t\t\tnazwaPlikuWynikowego = \"./wynik/wynik\" + Integer.toString(licznik)\r\n\t\t\t\t\t+ \".\" + rozszerzenieSzablonu;\r\n\t\t\tbw = new BufferedWriter(new FileWriter(nazwaPlikuWynikowego));\r\n\t\t\tfor (String[] s : calaZawartoscRozsep) {\r\n\t\t\t\tfor (String wyraz : s) {\r\n\t\t\t\t\tif (wyraz.equals(interpretujWyraz(wyraz)))\r\n\t\t\t\t\t\tfor (int i = 0; i < zmienne.length; ++i) {\r\n\t\t\t\t\t\t\tif (wyraz.equals(zmienne[i])) {\r\n\t\t\t\t\t\t\t\twyraz = wektorDanych[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twyraz = interpretujWyraz(wyraz);\r\n\r\n\t\t\t\t\tbw.write(wyraz);\r\n\t\t\t\t}\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.close();\r\n\t\t}\r\n\t}",
"public void zmiana_rozmiaru_okna()\n {\n b.dostosowanie_rozmiaru(getWidth(),getHeight());\n w.dostosowanie_rozmiaru(getWidth(),getHeight());\n\n for (Pilka np : p) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Naboj np : n) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Bonus np : bon) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n\n }",
"private void pokupiIzPoljaIKreirajServisera() {\n\t\tServiser noviServiser;\n\t\tif(izmena == false) {\n\t\t\tString ime = rssv.getTfIme().getText();\n\t\t\tString prezime = rssv.getTfPrezime().getText();\n\t\t\tString JMBG = rssv.getTfJMBG().getText();\n\t\t\tPol pol = rssv.getPolBox().getSelectionModel().getSelectedItem();\n\t\t\tString adresa = rssv.getTfAdresa().getText();\n\t\t\tString brojTelefona = rssv.getTfBrojTelefona().getText();\n\t\t\tString korisnickoIme = rssv.getTfKorisnickoIme().getText();\n\t\t\tString lozinka = rssv.getTfLozinka().getText();\n\t\t\tSpecijalizacija specijalizacija = rssv.getSpecijalizacijaBox().getSelectionModel().getSelectedItem();\n\t\t\t\t\n\t\t\ttry {\n\t\t\t\tdouble plata = Double.valueOf(rssv.getTfPlata().getText());\n\t\t\t\tnoviServiser = new Serviser(ime, prezime, JMBG, pol, adresa, brojTelefona, korisnickoIme, lozinka, specijalizacija, plata);\n\t\t\t\trssv.getTabela().getItems().add(noviServiser);\n\t\t\t\tServiserController.upisiServiseraUFajl(noviServiser);\n\t\t\t\trssv.resetujPolja();\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\trssv.izbaciPorukuOGresci(e.getMessage());\n\t\t\t} catch (Exception e) {\n\t\t\t\trssv.izbaciPorukuOGresci(e.getMessage());\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\tString ime = rssv.getTfIme().getText();\n\t\t\tString prezime = rssv.getTfPrezime().getText();\n\t\t\tString JMBG = rssv.getTfJMBG().getText();\n\t\t\tPol pol = rssv.getPolBox().getSelectionModel().getSelectedItem();\n\t\t\tString adresa = rssv.getTfAdresa().getText();\n\t\t\tString brojTelefona = rssv.getTfBrojTelefona().getText();\n\t\t\tString korisnickoIme = rssv.getTfKorisnickoIme().getText();\n\t\t\tString lozinka = rssv.getTfLozinka().getText();\n\t\t\tSpecijalizacija specijalizacija = rssv.getSpecijalizacijaBox().getSelectionModel().getSelectedItem();\n\t\t\t\n\t\t\ttry {\n\t\t\t\tdouble plata = Double.valueOf(rssv.getTfPlata().getText());\n\t\t\t\tnoviServiser = new Serviser(tempServiser.getOznaka(), ime, prezime, JMBG, pol, adresa, brojTelefona, korisnickoIme, lozinka, false, specijalizacija, plata);\n\t\t\t\tServiserController.izbrisiIzUcitanihServiseraSaOznakom(tempServiser.getOznaka());\n\t\t\t\trssv.getTabela().getItems().add(noviServiser);\n\t\t\t\tServiserController.upisiServiseraUFajl(noviServiser);\n\t\t\t\trssv.getTabela().getItems().remove(tempServiser);\n\t\t\t\tServiserController.sacuvajIzmeneUFajl();\n\t\t\t\trssv.resetujPolja();\n\t\t\t\t\n\t\t\t\tizmena = false;\n\t\t\t\ttempServiser = null;\n\t\t\t\t\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public TrasaPunktowana(String start, String koniec, GrupaGorska gr, PodgrupaGorska pd, StopienTrudnosci st, boolean niepelnosprawny, int pktwej, int pktzej){\n miejscePoczatkowe = start;\n miejsceKoncowe = koniec;\n grupaGorska = gr;\n podgrupaGorska = pd;\n stopienTrudnosci = st;\n czyDlaNiepelnosprawnych = niepelnosprawny;\n punktyZaWejscie = pktwej;\n punktyZaZejscie = pktzej;\n }",
"public boolean souvislost(){\n\t\t\n\t\tif(pole.size() != pocetVrcholu){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t\t\n\t}",
"private String nalozZvieraNaVozidlo() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz cislo zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Prepravitelny z = (Prepravitelny) zoo.getZvierataZOO(pozicia - 1);\r\n zoo.nalozZivocicha(z);\r\n zoo.odstranZivocicha(pozicia - 1);\r\n return \"Zviera \" + z + \"\\n\\tbolo nalozene na prepravne vozidlo\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nemozno prepravit\\n\\t\";\r\n } catch (NullPointerException exNP) {\r\n return \"Zviera c. \" + pozicia + \" nie je v ZOO\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"public void w_plik (BufferedWriter wpl)\n\t{\n\ttry{\t\n\t\twpl.write(imienaz+\"\\n\");\n\t\twpl.write(rodzaj+\"\\n\");\n\t\twpl.write(Integer.toString(numer)+\"\\n\");\n\t\twpl.write(Integer.toString(powierzchnia)+\"\\n\");\n\t\twpl.write(Integer.toString(wartosc)+\"\\n\");\n\t\tif (altanka == true ) wpl.write(\"1\"+\"\\n\"); else wpl.write(\"0\"+\"\\n\");\n\t\tif (studnia == true ) wpl.write(\"1\"+\"\\n\"); else wpl.write(\"0\"+\"\\n\");\n\t\t}\n\tcatch (IOException e){System.out.println(\"Blad we/wy\");};\n\t}",
"public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}",
"public void sprawdzBonusy()\n\t{\n\t\tif(aktualnyNumerSciezki != -1)\n\t\t{\n\t\t\tpojazd.sprawdzBonus(droga.get(aktualnyNumerSciezki));\n\t\t\twyswietleniePunktow.setText(\"\" + pojazd.pobierzPunkty());\n\t\t}\n\t}",
"double objetosc() {\n return dlugosc * wysokosc * szerokosc; //zwraca obliczenie poza metode\r\n }",
"public void RuchyKlas() {\n\t\tSystem.out.println(\"RuchyKlas\");\n\t\tPlansza.getNiewolnikNaPLanszy().Ruch();\n\t\tPlansza.getRzemieslnikNaPlanszy().Ruch();\n\t\tPlansza.getArystokrataNaPlanszy().Ruch();\n\t}",
"public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}",
"ArrayList<Float> pierwszaPredykcjaNormal()\n\t{\n\t\tif (Stale.cenyZGeneratora)\n\t\t{\n\t\t\tArrayList<Float> listaSumarycznejGeneracji = listaProsumentowWrap.getListaSumarycznejGeneracji(LokalneCentrum.getTimeIndex());\n\t\t\tArrayList<Float> listaSumarycznejKonsumpcji = listaProsumentowWrap.getListaSumarycznejKonsumpcji(LokalneCentrum.getTimeIndex());\n\n\t\t\treturn predictPrice(listaSumarycznejGeneracji,listaSumarycznejKonsumpcji);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tArrayList<Float> proposedPriceVector = pierwszaPredykcjaWezPredykcjeZListy();\n\t\t\t\n\t\t\t//jezeli brakuje elementow w plikyu do pelnej predykcji an horyzont czasowy to uuzplenij dnaymi z modelu\n\t\t\tif (proposedPriceVector.size()<Stale.horyzontCzasowy)\n\t\t\t{\n\t\t\t\tArrayList<Float> listaSumarycznejGeneracji = listaProsumentowWrap.getListaSumarycznejGeneracji(LokalneCentrum.getTimeIndex());\n\t\t\t\tArrayList<Float> listaSumarycznejKonsumpcji = listaProsumentowWrap.getListaSumarycznejKonsumpcji(LokalneCentrum.getTimeIndex());\n\t\t\t\tArrayList<Float> cenyZmodelu =predictPrice(listaSumarycznejGeneracji,listaSumarycznejKonsumpcji);\n\t\t\t\t\n\t\t\t\tproposedPriceVector = polaczListy(proposedPriceVector, cenyZmodelu);\n\t\t\t\t\n\t\t\t\tif (proposedPriceVector.size()!=Stale.horyzontCzasowy)\n\t\t\t\t{\n\t\t\t\t\tgetInput(\"ERROR in pierwszaPredykcjaNormal\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn proposedPriceVector;\n\t\t\t//podaj predykcje taka jak wynika z podanego pliku\n\t\t\t//getInput(\"Fill this part out - wczytaj rpedykcje z pliku!\");\n\t\t\t//return new ArrayList<Float>();\n\t\t}\n\t}",
"boolean sprawdz_przegrana(){\n for(int i=0;i<figura_jakas.getWspolzedne_figorki().size();i++)\n if(sprawdz_kolizje_z_innymi_klockami(0))\n return true;\n return false;\n }",
"public void uradiPotez(int direkcija) {\r\n\t\tboolean promjena1 = pomjeri(direkcija);\r\n\t\tboolean promjena2 = spoji(direkcija);\r\n\t\tif(promjena1 || promjena2) { //ukoliko nije bilo promjene ni u pomjeranju ni spajanju, ne generise novo polje\r\n\t\t\tpomjeri(direkcija);\r\n\t\t\tgenerisiPolje();\r\n\t\t}\r\n\t}",
"public void zpracujObjednavky()\n\t{\n\t\tint idtmp = 0;\n\t\tfloat delkaCesty = 0;\n\t\t\n\t\tif (this.objednavky.isEmpty())\n\t\t{\n\t\t\treturn ;\n\t\t}\n\t\t\n\t\tNakladak nakl = (Nakladak) getVolneAuto();\n\t\t\n\t\tnakl.poloha[0] = this.poloha[0];\n\t\tnakl.poloha[1] = this.poloha[1];\n\t\tObjednavka ob = this.objednavky.remove();\n\n\t\t/*System.out.println();\n\t\tSystem.out.println(\"Objednavka hospody:\" + ob.id + \" se zpracuje pres trasu: \");\n\t\t */\n\t\tdelkaCesty += vyberCestu(this.id, ob.id, nakl);\n\t\t\n\t\twhile(nakl.pridejObjednavku(ob))\n\t\t{\n\t\t\tidtmp = ob.id;\n\t\t\t\n\t\t\tob = vyberObjednavku(ob.id);\n\t\t\tif (ob == null)\n\t\t\t{\n\t\t\t\tob=nakl.objednavky.getLast();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tobjednavky.remove(ob);\n\t\t\t\n\t\t\tdelkaCesty += vyberCestu(idtmp, ob.id, nakl);\n\t\t\t\n\t\t\tif((nakl.objem > 24)||(13-Simulator.getCas().hodina)*(nakl.RYCHLOST) + 100 < delkaCesty){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t/*\n\t\t\tif((Simulator.getCas().hodina > 12) && (delkaCesty > 80) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif((Simulator.getCas().hodina > 9) && (delkaCesty > 130) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}*/\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//cesta zpatky\n\t\tvyberCestu(ob.id, this.id, nakl);\n\t\tif (nakl.objem >= 1)\n\t\t{\n\t\t\tnakl.kDispozici = false;\n\t\t\tnakl.jede = true;\n\t\t\t//vytvoreni nove polozky seznamu pro statistiku\n\t\t\tnakl.novaStatCesta();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnakl.resetCesta();\n\t\t}\n\t}",
"public PregledPoruka() {\n preuzmiMape();\n preuzmiPoruke();\n }",
"public ListaBrojeva izdvojElmenteNaParnimPozicijama() {\n if (prvi != null) {\n ListaBrojeva parni = new ListaBrojeva();\n \n Element tek = prvi;\n Element preth = null;\n Element parniKraj = null;\n int br = 0;\n \n while (tek.veza != null) {\n preth = tek;\n tek = tek.veza;\n \n if (br % 2 != 0) {\n preth.veza = tek.veza;\n if (parni.prvi == null) {\n parni.prvi = tek;\n parniKraj = tek;\n tek.veza = null; \n } else {\n parniKraj.veza = tek;\n tek.veza = null;\n parniKraj = parniKraj.veza;\n }\n tek = preth;\n }\n br++;\n }\n /*prvi element iz liste je paran, ali je preskocen, \n tako da ga sad izbacujemo iz liste i dodajemo u novu*/\n Element pom = prvi;\n prvi = prvi.veza;\n pom.veza = parni.prvi;\n parni.prvi = pom;\n return parni;\n }\n return null;\n }",
"void rozpiszKontraktyPart2NoEV(int index,float wolumenHandlu, float sumaKupna,float sumaSprzedazy )\n\t{\n\t\tArrayList<Prosument> listaProsumentowTrue =listaProsumentowWrap.getListaProsumentow();\n\t\t\n\n\t\tint a=0;\n\t\twhile (a<listaProsumentowTrue.size())\n\t\t{\n\t\t\t\t\t\t\n\t\t\t// ustala bianrke kupuj\n\t\t\t// ustala clakowita sprzedaz (jako consumption)\n\t\t\t//ustala calkowite kupno (jako generacje)\n\t\t\tDayData constrainMarker = new DayData();\n\t\t\t\n\t\t\tArrayList<Point> L1\t=listaFunkcjiUzytecznosci.get(a);\n\t\t\t\n\t\t\t//energia jaka zadeklarowal prosument ze sprzeda/kupi\n\t\t\tfloat energia = L1.get(index).getIloscEnergiiDoKupienia();\n\t\t\t\n\t\t\tif (energia>0)\n\t\t\t{\n\t\t\t\tfloat iloscEnergiiDoKupienia = energia/sumaKupna*wolumenHandlu;\n\t\t\t\t\n\t\t\t\tconstrainMarker.setKupuj(1);\n\t\t\t\tconstrainMarker.setGeneration(iloscEnergiiDoKupienia);\n\t\t\t\t\n\t\t\t\trynekHistory.ustawBetaDlaWynikowHandlu(iloscEnergiiDoKupienia,a);\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfloat iloscEnergiiDoSprzedania = energia/sumaSprzedazy*wolumenHandlu;\n\n\t\t\t\t\n\t\t\t\tconstrainMarker.setKupuj(0);\n\t\t\t\tconstrainMarker.setConsumption(iloscEnergiiDoSprzedania);\n\t\t\t\t\n\t\t\t\trynekHistory.ustawBetaDlaWynikowHandlu(iloscEnergiiDoSprzedania,a);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tArrayList<Float> priceVector = priceVectorsList.get(priceVectorsList.size()-1);\n\t\t\t\n\t\t\t//poinformuj prosumenta o wyniakch handlu i dostosuj go do wynikow\n\t\t\tlistaProsumentowTrue.get(a).getKontrakt(priceVector,constrainMarker);\n\t\t\t\n\t\t\ta++;\n\t\t}\n\t}",
"@org.junit.Test\n public void testObliczOdsetkiLokataRoczna() {\n \n OdsetkiStateLokataRoczna odsetki = injector.getInstance(OdsetkiStateLokataRoczna.class);\n BigDecimal stanKonta = new BigDecimal(1000);\n BigDecimal expResult = new BigDecimal(\"20.00\");\n \n LokataRoczna lokata = injector.getInstance(LokataRoczna.class);\n \n BigDecimal result = odsetki.obliczOdsetki(stanKonta, lokata);\n\n assertEquals(expResult, result);\n }",
"private int generujViacZvierat(int pocet){\r\n int poc = 0;\r\n for (int i = 0; i < pocet; i++) {\r\n if (zoo.pridajZivocicha(vytvorZivocicha())) poc++;\r\n }\r\n return poc;\r\n }",
"public void podstawZapiszDaneJedenPlik() throws IOException {\r\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(\"./wynik/wynik.\"\r\n\t\t\t\t+ rozszerzenieSzablonu));\r\n\t\tString[] wektorDanych;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\tfor (String[] s : calaZawartoscRozsep) {\r\n\t\t\t\tfor (String wyraz : s) {\r\n\t\t\t\t\tif (wyraz.equals(interpretujWyraz(wyraz)))\r\n\t\t\t\t\t\tfor (int i = 0; i < zmienne.length; ++i) {\r\n\t\t\t\t\t\t\tif (wyraz.equals(zmienne[i])) {\r\n\t\t\t\t\t\t\t\twyraz = wektorDanych[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twyraz = interpretujWyraz(wyraz);\r\n\r\n\t\t\t\t\tbw.write(wyraz);\r\n\t\t\t\t}\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.write(\"---------------------------------------------------\");\r\n\t\t\tbw.newLine();\r\n\t\t}\r\n\t\tbw.close();\r\n\t}",
"public String getPn() { return this.pn; }",
"public void AktualizacjaPopulacjiKlas() {\n\t\tSystem.out.println(\"AktualizacjaPopulacjiKlas\");\n\t\tif(Plansza.getNiewolnikNaPLanszy().getJedzenie() >= Plansza.getNiewolnikNaPLanszy().getUbrania()) {\n\t\t\tPlansza.getNiewolnikNaPLanszy().setPopulacja(Plansza.getNiewolnikNaPLanszy().getUbrania());\n\t\t}\n\t\telse {\n\t\t\tPlansza.getNiewolnikNaPLanszy().setPopulacja(Plansza.getNiewolnikNaPLanszy().getJedzenie());\n\t\t}\n\t\t\n\t\tif(Plansza.getRzemieslnikNaPlanszy().getNarzedzia() >= Plansza.getRzemieslnikNaPlanszy().getMaterialy()) {\n\t\t\tPlansza.getRzemieslnikNaPlanszy().setPopulacja(Plansza.getRzemieslnikNaPlanszy().getMaterialy());\n\t\t}\n\t\telse {\n\t\t\tPlansza.getRzemieslnikNaPlanszy().setPopulacja(Plansza.getRzemieslnikNaPlanszy().getNarzedzia());\n\t\t}\n\t\t\n\t\tif(Plansza.getArystokrataNaPlanszy().getTowary() >= Plansza.getArystokrataNaPlanszy().getZloto()) {\n\t\t\tPlansza.getArystokrataNaPlanszy().setPopulacja(Plansza.getArystokrataNaPlanszy().getZloto());\n\t\t}\n\t\telse {\n\t\t\tPlansza.getArystokrataNaPlanszy().setPopulacja(Plansza.getArystokrataNaPlanszy().getTowary());\n\t\t}\n\t}",
"public void aktualisiere(PhysicalObject po){\n\t\tthis.po=po;\n\t\tKipper kipperObj= (Kipper) po;\t\t\n\t\tx = kipperObj.getX();\n\t\ty = kipperObj.getY();\n\t\tbreite=kipperObj.getBreite();\n\t\tlaenge=kipperObj.getLaenge();\n\t\twinkel=kipperObj.getWinkel();\n\t\tlkwfahrt=kipperObj.isFahrt();\t\t\n\t\tif (kipperObj.getMaterialListe().size() == 1) {\n\t\t\tmatRatio=kipperObj.getMaterialListe().get(0).getVolumen()/kipperObj.getMaxVolumen();\t\n\t\t\tif(matRatio > 1)\n\t\t\t\tmatRatio=1;\n\t\t}\t\t\n\t}",
"public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}",
"private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}",
"GestionPrecioDTO findCampania(String codigoCampaniaReferencia);",
"public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih napomena!!\");\r\n\t\t}\r\n\r\n\t}",
"private String vylozZvieraZVozidla() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz index zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Zivocich ziv = zoo.vylozZivocicha(pozicia-1);\r\n if (ziv == null) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n }\r\n zoo.pridajZivocicha(ziv);\r\n return \"Zviera \" + ziv\r\n + \"\\n\\tbolo vylozene z prepravneho vozidla\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"public void setCodigoPlan(int p) { this.codigoPlan = p; }",
"int obliczLiczbaKont()\n\t{\n\t\tListaProsumentowWrap listaProsumentowWrap= ListaProsumentowWrap.getInstance();\n\t\tArrayList<Prosument> listaProsumentow = listaProsumentowWrap.getListaProsumentow();\n\t\t\n\t\tint sum=0;\n\t\t\n\t\tint i=0;\n\t\twhile (i<listaProsumentow.size())\n\t\t{\n\t\t\tProsument prosument = listaProsumentow.get(i);\n\t\t\t\n\t\t\tif (prosument instanceof ProsumentEV)\n\t\t\t{\n\t\t\t\tsum+=2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsum++;\n\t\t\t}\n\t\t\t\n\t\t\ti++;\n\t\t}\n\t\t\n\t\treturn sum;\n\t}",
"public void dohvatiOtpad(KonkretniSpremnik ks) {\n VozilaLogger.printRad(this, ks);\n if (ks.getNazivBroj() == getVrsta()) {\n float nova_popunjenost = popunjenost + ks.getNapunjenost();\n if (nova_popunjenost >= nosivost) {\n notifyAllObservers();\n } else {\n popunjenost = nova_popunjenost;\n ks.isprazni();\n azurirajStatistikuOtpada(1, ks.getNapunjenost());\n }\n }\n }",
"public Puntaje() {\n nombre = \"\";\n puntos = 0;\n }",
"public int liczbaelnastosie() {\n\t\treturn 0;\n\t}",
"void getPlanificacion(int tipoPlanificacion);",
"public void PerspektivischeProjektion(){\n /**\n * Abrufen der Koordinaten aus den einzelnen\n * Point Objekten des Objekts Tetraeder.\n */\n double[] A = t1.getTetraeder()[0].getPoint();\n double[] B = t1.getTetraeder()[1].getPoint();\n double[] C = t1.getTetraeder()[2].getPoint();\n double[] D = t1.getTetraeder()[3].getPoint();\n\n /*\n * Aufrufen der Methode sortieren\n */\n double[][] sP = cls_berechnen.sortieren(A, B, C, D);\n\n A = sP[0];\n B = sP[1];\n C = sP[2];\n D = sP[3];\n\n /*Wenn alle z Koordinaten gleich sind, ist es kein Tetraeder. */\n if (A[2] == D[2]) {\n System.out.println(\"kein Tetraeder\");\n return;\n }\n\n //Entfernung vom 'Center of projection' zur 'Projectoin plane'\n double d=5;\n\n /*\n * Transformiert x|y|z Koordinaten in x|y Koordinaten\n * mithilfer der perspektivischen Projektion\n */\n\n A[0]=A[0]/((A[2]+d)/d);\n A[1]=A[1]/((A[2]+d)/d);\n B[0]=B[0]/((B[2]+d)/d);\n B[1]=B[1]/((B[2]+d)/d);\n C[0]=C[0]/((C[2]+d)/d);\n C[1]=C[1]/((C[2]+d)/d);\n D[0]=D[0]/((D[2]+d)/d);\n D[1]=D[1]/((D[2]+d)/d);\n\n\n double ax, ay, bx, by, cx, cy, dx, dy;\n ax=A[0];\n ay=A[1];\n bx=B[0];\n by=B[1];\n cx=C[0];\n cy=C[1];\n dx=D[0];\n dy=D[1];\n\n tetraederzeichnen(ax, ay, bx, by, cx, cy, dx, dy);\n }",
"public void urciStupneVrcholu(){\n\t\tfor(int i = 0;i < vrchP.length; i++){\n\t\t\tstupenVrcholu(vrchP[i].klic);\n\t\t}\n\t}",
"public void AktualizacjaPlanszy() {\n\t\tSystem.out.println(\"AktualizacjaPlanszy\");\n\t\tPlansza.setTowarNaPlanszy(new Towar(GeneratorRandom.RandomOd1(Plansza.getXplanszy()), GeneratorRandom.RandomOd1(Plansza.getYplanszy())));\n\t\tPlansza.setTowarNaPlanszy(new Towar(GeneratorRandom.RandomOd1(Plansza.getXplanszy()), GeneratorRandom.RandomOd1(Plansza.getYplanszy())));\n\t\t\n\t\tPlansza.setNiebezpieczenstwoNaPlanszy(new GenerujNiebezpieczenstwo(GeneratorRandom.RandomOd1(Plansza.getXplanszy()), GeneratorRandom.RandomOd1(Plansza.getYplanszy())));\n\t}",
"public Z getP() {\n return mP;\n }",
"public PrnPrivitakVo() {\r\n\t\tsuper();\r\n\t}",
"public void setPunktyZaZejscie(int punkty) {\n this.punktyZaZejscie = punkty;\n }",
"private int calcularPrecio(Repuesto repuesto, boolean formateo, boolean limpieza) {\n int precio = 0;\n if (repuesto != null) {\n precio += repuesto.getPrecio();\n }\n \n if (formateo) {\n precio += 10000;\n }\n \n if (limpieza) {\n precio += 7500;\n }\n return precio;\n }",
"public ListaPracownikow() {\n generujPracownikow();\n //dodajPracownika();\n }",
"public void obtenerValorDePiezaEnDolaresAPesos() {\r\n\t\tpieza = new Pieza(\"\",10,Moneda.DOLAR);\r\n\t\tdouble precio = this.pieza.getPrecioEn(Moneda.PESO);\r\n\t\tAssert.assertEquals(precio, 40);\r\n\t}",
"public int getProteksi(){\n\t\treturn (getTotal() - getPromo()) * protectionCost / 100;\n\t}",
"@Test\n public void getTarjetaPrepagoTest()\n {\n TarjetaPrepagoEntity entity = data.get(0);\n TarjetaPrepagoEntity resultEntity = tarjetaPrepagoLogic.getTarjetaPrepago(entity.getId());\n Assert.assertNotNull(resultEntity);\n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getNumTarjetaPrepago(), resultEntity.getNumTarjetaPrepago());\n Assert.assertEquals(entity.getSaldo(), resultEntity.getSaldo(), 0.001);\n Assert.assertEquals(entity.getPuntos(), resultEntity.getPuntos(),0.001);\n }",
"public void obtenerValorDePiezaEnDolaresADolares() {\r\n\t\tPieza pieza = new Pieza(\"\",10,Moneda.DOLAR);\t\t\r\n\t\tdouble precio = pieza.getPrecioEn(Moneda.DOLAR);\r\n\t\tAssert.assertEquals(precio, 10);\r\n\t}",
"@Test\r\n\tpublic void testGetPeliBalorazioNormalizatuak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == -2.75);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.25);\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 0);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.75);\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 1.75);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t\r\n\t\t// Normalizazioa Zsore erabiliz egiten dugu\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Zscore());\r\n\t\t\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.0000\");\r\n\t\t\r\n\t\t// p1 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(df.format(bek.getBalioa(e1.getId())).equals(\"1,2247\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\"-1,6398\"));\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(df.format(bek.getBalioa(e1.getId())).equals(\"-1,2247\"));\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 1);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\",1491\"));\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 0);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == -1);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\",4472\"));\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\"1,0435\"));\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Batezbestekoa());\r\n\t\t\r\n\t}",
"private String sprawdzRozszerzenie(String adresPliku) {\r\n\t\tString[] tablica = adresPliku.split(\"\\\\.\");\r\n\r\n\t\treturn tablica[tablica.length - 1];\r\n\t}",
"public void pretraziPoslovneKorisnike() throws BazaPodatakaException {\r\n\t\tString naziv = nazivTF.getText().toLowerCase();\r\n\t\tString web = webTF.getText().toLowerCase();\r\n\t\tString email = emailTF.getText().toLowerCase();\r\n\t\tString telefon = telefonTF.getText();\r\n\r\n\t\tList<PoslovniKorisnik> listaKorisnika = BazaPodataka.dohvatiPoslovnogKorisnikaPremaKriterijima(email, telefon,\r\n\t\t\t\tnaziv, web);\r\n\t\ttablicaPoslovnihKorisnika.setItems(FXCollections.observableArrayList(listaKorisnika));\r\n\r\n\t}",
"@Override\n\tpublic double getPowierzchnia() {\n\t\treturn szer*wys;\n\t}",
"public void pobierzProjektUkladu(String br, TreeNodeExtended root, String aktywapasywa) {\r\n try {\r\n pozycje = Collections.synchronizedList(new ArrayList<>());\r\n pozycje = UkladBRBean.pobierzpozycje(pozycjaRZiSDAO, pozycjaBilansDAO, uklad, aktywapasywa, br);\r\n root.getChildren().clear();\r\n if (pozycje != null) {\r\n PozycjaRZiSFKBean.ustawRootaprojekt(root, pozycje);\r\n level = PozycjaRZiSFKBean.ustawLevel(root, pozycje);\r\n Msg.msg(\"Pobrano układ \");\r\n } else {\r\n Msg.msg(\"e\", \"Pozycje sa puste\");\r\n }\r\n } catch (Exception e) {\r\n E.e(e);\r\n root.getChildren().clear();\r\n Msg.msg(\"e\", \"Wystąpił błąd, nie pobrano układu\");\r\n }\r\n }",
"public static List<Punto> getPuntos(){\n\t\t\n\t\tList<Punto> puntos = new ArrayList<Punto>();\n\t\ttry{\n\n\t\t\t//-12.045916, -75.195270\n\t\t\t\n\t\t\tPunto p1 = new Punto(1,-12.037512,-75.183327,0.0);\n\t\t\tp1.setDatos(getDatos(\"16/06/2017 09:00:00\", 2 , 1));\n\t\t\t\n\t\t\tPunto p2 = new Punto(2,-12.041961,-75.184786,0.0);\n\t\t\tp2.setDatos(getDatos(\"16/06/2017 09:00:00\",1 , 2));\n\t\t\t\n\t\t\tPunto p3 = new Punto(3,-12.0381,-75.1841,0.0);\n\t\t\tp3.setDatos(getDatos(\"16/06/2017 09:00:00\",2 , 2));\n\t\t\t\n\t\t\tPunto p4 = new Punto(4,-12.041542,-75.185816,0.0);\n\t\t\tp4.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p5 = new Punto(5,-12.037764,-75.181096,0.0);\n\t\t\tp5.setDatos(getDatos(\"16/06/2017 11:15:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p6 = new Punto(6,-12.042801,-75.190108,0.0);\n\t\t\tp6.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p7 = new Punto(7,-12.04364,-75.184014,0.0);\n\t\t\tp7.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p8 = new Punto(8,-12.045739,-75.185387,0.0);\n\t\t\tp8.setDatos(getDatos(\"16/06/2017 11:30:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p9 = new Punto(9,-12.04683,-75.187361,0.0);\n\t\t\tp9.setDatos(getDatos(\"16/06/2017 11:50:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p10 = new Punto(10,-12.050775,-75.187962,0.0);\n\t\t\tp10.setDatos(getDatos(\"16/06/2017 12:30:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p11 = new Punto(11,-12.053797,-75.184271,0.0);\n\t\t\tp11.setDatos(getDatos(\"16/06/2017 13:00:00\",0 , 0));\n\t\t\t\n\t\t\tpuntos.add(p8);\n\t\t\tpuntos.add(p9);\n\t\t\tpuntos.add(p3);\n\t\t\tpuntos.add(p4);\n\t\t\tpuntos.add(p5);\n\t\t\tpuntos.add(p6);\n\t\t\tpuntos.add(p7);\n\t\t\tpuntos.add(p10);\n\t\t\tpuntos.add(p1);\n\t\t\tpuntos.add(p2);\n\t\t\tpuntos.add(p11);\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e ){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn puntos;\n\t\n\t}",
"public void ucitajPotez(Potez potez) {\n\t\tint red = potez.vratiRed();\n\t\tint kolona = potez.vratiKolonu();\n\t\ttabla[red][kolona] = potez.vratiRezultat();\n\n\t\tif (potez.vratiRezultat() == Polje1.potopljen) {\n\t\t\tint gornjiRed, gornjaKolona;\n\t\t\tboolean cont1 = false;\n\t\t\tboolean cont2 = false;\n\t\t\tboolean redar = false;\n\t\t\tboolean kolonar = false;\n\t\t\twhile (redar == false) {\n\t\t\t\tif (red == 0) {\n\t\t\t\t\tgornjiRed = 0;\n\t\t\t\t\tcont1 = true;\n\t\t\t\t} else {\n\t\t\t\t\tgornjiRed = red - 1;\n\t\t\t\t}\n\t\t\t\tif (red == 9) {\n\t\t\t\t\tcont2 = true;\n\t\t\t\t}\n\t\t\t\tif (tabla[gornjiRed][kolona] == Polje1.pogodjen && cont1 == false) {\n\t\t\t\t\ttabla[gornjiRed][kolona] = Polje1.potopljen;\n\t\t\t\t\tred--;\n\t\t\t\t} else {\n\t\t\t\t\tcont1 = true;\n\t\t\t\t\tgornjiRed++;\n\t\t\t\t}\n\t\t\t\tif (cont1 == true) {\n\t\t\t\t\tif (tabla[gornjiRed][kolona] == Polje1.pogodjen || tabla[gornjiRed][kolona] == Polje1.potopljen) {\n\t\t\t\t\t\ttabla[gornjiRed][kolona] = Polje1.potopljen;\n\t\t\t\t\t\tred++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcont2 = true;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (cont1 == true && cont2 == true)\n\t\t\t\t\tredar = true;\n\t\t\t}\n\t\t\tcont1 = false;\n\t\t\tcont2 = false;\n\t\t\tred = potez.vratiRed();\n\t\t\twhile (kolonar == false) {\n\t\t\t\tif (kolona == 0) {\n\t\t\t\t\tgornjaKolona = 0;\n\t\t\t\t\tcont1 = true;\n\t\t\t\t} else {\n\t\t\t\t\tgornjaKolona = kolona - 1;\n\t\t\t\t}\n\t\t\t\tif (kolona == 9) {\n\t\t\t\t\tcont2 = true;\n\t\t\t\t}\n\t\t\t\tif (tabla[red][gornjaKolona] == Polje1.pogodjen && cont1 == false) {\n\t\t\t\t\ttabla[red][gornjaKolona] = Polje1.potopljen;\n\t\t\t\t\tkolona--;\n\t\t\t\t} else {\n\t\t\t\t\tcont1 = true;\n\t\t\t\t\tgornjaKolona++;\n\t\t\t\t}\n\t\t\t\tif (cont1 == true) {\n\t\t\t\t\tif (tabla[red][gornjaKolona] == Polje1.pogodjen || tabla[red][gornjaKolona] == Polje1.potopljen) {\n\t\t\t\t\t\ttabla[red][gornjaKolona] = Polje1.potopljen;\n\t\t\t\t\t\tkolona++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcont2 = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (cont1 == true && cont2 == true)\n\t\t\t\t\tkolonar = true;\n\n\t\t\t}\n\n\t\t}\n\n\n\t}",
"public double getParidadCosto() {\r\n return paridadCosto;\r\n }",
"public int getPrecio(){\n return precio;\n }",
"public int getPuntos() {\n return puntos;\n }",
"public int getPuntos() {\n return puntos;\n }",
"private boolean pomjeri(int direkcija) {\t\r\n\t\t/**\r\n\t\t * Atribut predstavlja zadnje polje u smjeru direkcije u redu ili koloni (zavisno od toga da li je\r\n\t\t * pomjeranje horizontalno ili vertikalno).\r\n\t\t */\r\n\t\tint pocetna;\r\n\t\t/**\r\n\t\t * Atribut govori u kojem smjeru se pomjera trenutnaPozicija (smjer je suprotan direkciji poteza).\r\n\t\t */\r\n\t\tint pomak;\r\n\t\t/**\r\n\t\t * Atribut predstavlja prvo prazno polje na koje se moze pomjeriti iduce neprazno polje.\r\n\t\t */\r\n\t\tint trenutnaPozicija;\r\n\t\t/**\r\n\t\t * Atribut se postavlja na true ukoliko dodje do nekog pomjeranja (promjene u odnosu na prijasnje stanje tabele).\r\n\t\t */\r\n\t\tboolean bilo_promjene = false;\r\n\t\t\r\n\t\t// pomjeranje desno i lijevo\r\n\t\tif(direkcija == 1 || direkcija == 2) {\r\n\t\t\tpocetna = 6 - 3*direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 2*direkcija - 3; // pomak je ili -1 ili 1\r\n\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo pomjeranje polja\r\n\t\t\tfor(int i = 0 ; i < 4 ; i++) {\r\n\t\t\t\tfor(int j = pocetna ; j != pocetna + 4 * pomak ; j += pomak) {\r\n\t\t\t\t\tif(tabela[i][trenutnaPozicija] != 0) // ukoliko se na pocetku desi da to polje nije slobodno\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\telse if (tabela[i][j] != 0) { // pomjeri to polje u smjeru direkcija\r\n\t\t\t\t\t\ttabela[i][trenutnaPozicija] = tabela[i][j];\r\n\t\t\t\t\t\ttabela[i][j] = 0;\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// pomjeranje gore i dole\r\n\t\telse {\r\n\t\t\tpocetna = direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 1 - (2*direkcija)/3; // pomak je ili -1 ili 1\r\n\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo pomjeranje polja\r\n\t\t\tfor(int j = 0 ; j < 4 ; j++) {\r\n\t\t\t\tfor(int i = pocetna ; i != pocetna + 4 * pomak ; i += pomak) {\r\n\t\t\t\t\tif(tabela[trenutnaPozicija][j] != 0) // ukoliko se na pocetku desi da to polje nije slobodno\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\telse if (tabela[i][j] != 0) { // pomjeri to polje u smjeru direkcija\r\n\t\t\t\t\t\ttabela[trenutnaPozicija][j] = tabela[i][j];\r\n\t\t\t\t\t\ttabela[i][j] = 0;\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn bilo_promjene;\r\n\t}",
"public JLabel etykietaWyswietlaniaPunktow()\n\t{\n\t\treturn wyswietleniePunktow;\n\t}",
"public void spojElementeNaizmenicno(ListaBrojeva novaLista) {\n if (novaLista.prvi == null)\n return;\n else if (jePrazna())\n prvi = novaLista.prvi;\n else {\n Element tek = prvi.veza;\n Element novaListaTek = novaLista.prvi;\n Element pomocni = prvi;\n while (tek != null && novaListaTek != null) {\n pomocni.veza = novaListaTek;\n pomocni = pomocni.veza;\n novaListaTek = novaListaTek.veza;\n \n pomocni.veza = tek;\n pomocni = pomocni.veza;\n tek = tek.veza;\n \n }\n if (novaListaTek != null)\n pomocni.veza = novaListaTek;\n }\n }",
"public IzvajalecZdravstvenihStoritev() {\n\t}",
"public PuntoDeVenta getPuntoDeVenta()\r\n/* 140: */ {\r\n/* 141:162 */ return this.puntoDeVenta;\r\n/* 142: */ }",
"public double getMontoSolicitado(){\n return localMontoSolicitado;\n }",
"public void obtenerValorDePiezaEnPesosAPesos() {\r\n\t\tdouble precio = this.pieza.getPrecioEn(Moneda.PESO);\r\n\t\tAssert.assertEquals(precio, 40);\r\n\t}",
"public int getCodigoPlan() { return this.codigoPlan; }",
"void crearCampania(GestionPrecioDTO campania);",
"private static boolean poserTapis(){\n\t\tSystem.out.println(\"Choisisser une premiere case pour poser la premiere partie du tapis\");\n\t\tint premiereCaseTapis = console.obtenirDirection();\n\t\tint direction = premiereCaseTapis;\n\t\tint posXTapis = 0, posYTapis = 0;\n\n\t\t//Pose du premier carre de tapis\n\t\ttry{\n\t\t\tif(premiereCaseTapis == 1){\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()-2][jeu.getAssam().getYPion()-1].setCouleurTapis(tour);\n\t\t\t\tposXTapis = jeu.getAssam().getXPion()-2;\n\t\t\t\tposYTapis = jeu.getAssam().getYPion()-1;\n\t\t\t}\n\n\t\t\telse if(premiereCaseTapis == 2){\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()][jeu.getAssam().getYPion()-1].setCouleurTapis(tour);\n\t\t\t\tposXTapis = jeu.getAssam().getXPion();\n\t\t\t\tposYTapis = jeu.getAssam().getYPion()-1;\n\t\t\t}\n\n\t\t\telse if(premiereCaseTapis == 3){\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()-1][jeu.getAssam().getYPion()-2].setCouleurTapis(tour);\n\t\t\t\tposYTapis = jeu.getAssam().getYPion()-2;\n\t\t\t\tposXTapis = jeu.getAssam().getXPion()-1;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()-1][jeu.getAssam().getYPion()].setCouleurTapis(tour);\n\t\t\t\tposYTapis = jeu.getAssam().getYPion();\n\t\t\t\tposXTapis = jeu.getAssam().getXPion()-1;\n\t\t\t}\n\n\t\t} catch (ArrayIndexOutOfBoundsException e){\n\t\t\tconsole.afficherImpossiblePoserTapis();\n\t\t\treturn false;\n\t\t}\n\n\n\n\n\t\tconsole.afficherJeu();\n\t\tSystem.out.println(\"Choisissez la deuxieme case\");\n\n\t\t//Pose du second petit carre de tapis\n\t\twhile(true){\n\t\t\tint d = console.obtenirDirection();\n\t\t\t//pour ne pas faire de demi tour ou erreur de d\n\t\t\tif(direction == 1 && d == 2 || direction == 2 && d == 1 || direction == 3 && d == 4 || direction == 4 && d == 3 || d<1 || d>4){\n\t\t\t\tconsole.afficherImpossibleChoisirDirection();\n\t\t\t} else {\n\t\t\t\ttry{\n\t\t\t\t\tif(d == 1){\n\t\t\t\t\t\tjeu.cases[posXTapis-1][posYTapis].setCouleurTapis(tour);\n\t\t\t\t\t}\n\n\t\t\t\t\telse if(d == 2){\n\t\t\t\t\t\tjeu.cases[posXTapis+1][posYTapis].setCouleurTapis(tour);\n\t\t\t\t\t}\n\n\t\t\t\t\telse if(d == 3){\n\t\t\t\t\t\tjeu.cases[posXTapis][posYTapis-1].setCouleurTapis(tour);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tjeu.cases[posXTapis][posYTapis+1].setCouleurTapis(tour);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e){\n\t\t\t\t\tconsole.afficherImpossiblePoserTapis();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\tjeu.getJoueurs()[tour-1].useTapis();\n\t\treturn true;\n\n\n\t}",
"public void setPuntos(int puntaje) {\n this.puntos = puntaje;\n }",
"public boolean odigraj(Koordinati poteza) {\n if (this.jeVeljavnaPoteza(poteza)) {\n plosca[poteza.getX()][poteza.getY()] = igralecNaPotezi.getPolje();\n // Potezo dodamo v odigranePoteze.\n\t\t\tthis.odigranePoteze.add(poteza);\n igralecNaPotezi = igralecNaPotezi.nasprotnik();\n return true;\n } else return false;\n }",
"public void setCosto(long pCosto) {\n this.costo = pCosto;\n }",
"public Solicitud obtenerSolicitudDevolucion(DTOSolicitudValidacion dtoSolicitud)\n throws MareException{\n UtilidadesLog.info(\"DAOSolicitudes.obtenerSolicitudDevolucion(DTOSolicitudValidacion dtoSolicitud):Entrada\");\n Solicitud solicitudDevolucion = null;\n DTOSolicitudValidacion dtoDevolucionPeriodoOriginal = new DTOSolicitudValidacion();\n dtoDevolucionPeriodoOriginal.setOidSolicitud( dtoSolicitud.getOidSolicitud() );\n \n //Este metodo modificara el oidSolicitud y el periodo de la solicitud de devolucion al de la solicitud devuelta.\n this.rellenarDevoluciones( dtoDevolucionPeriodoOriginal );\n \n if( ! dtoDevolucionPeriodoOriginal.getOidSolicitud().\n equals( dtoSolicitud.getOidSolicitud() ) ){\n //Si son distintos quiere decir que es una devolucion de una solicitud que genero puntos. \n \n dtoDevolucionPeriodoOriginal.setFechaProceso( dtoSolicitud.getFechaProceso() );\n dtoDevolucionPeriodoOriginal.setGP( dtoSolicitud.getGP() );\n dtoDevolucionPeriodoOriginal.setIndNoConso( dtoSolicitud.getIndNoConso() );\n dtoDevolucionPeriodoOriginal.setIndOrdenCompra( dtoSolicitud.getIndOrdenCompra() );\n dtoDevolucionPeriodoOriginal.setIndPedGTZona( dtoSolicitud.getIndPedGTZona() );\n dtoDevolucionPeriodoOriginal.setIndSimulacion( dtoSolicitud.getIndSimulacion() );\n dtoDevolucionPeriodoOriginal.setIndUnionSolicitud( dtoSolicitud.getIndUnionSolicitud() );\n dtoDevolucionPeriodoOriginal.setNumDecimales( dtoSolicitud.getNumDecimales());\n dtoDevolucionPeriodoOriginal.setNumSolicitud( dtoSolicitud.getNumSolicitud() );\n dtoDevolucionPeriodoOriginal.setOidAcceso( dtoSolicitud.getOidAcceso() );\n dtoDevolucionPeriodoOriginal.setOidCanal( dtoSolicitud.getOidCanal() );\n dtoDevolucionPeriodoOriginal.setOidCliente( dtoSolicitud.getOidCliente() );\n dtoDevolucionPeriodoOriginal.setOidMarca( dtoSolicitud.getOidMarca() );\n dtoDevolucionPeriodoOriginal.setOidModulo( dtoSolicitud.getOidModulo() );\n dtoDevolucionPeriodoOriginal.setOidMoneda( dtoSolicitud.getOidMoneda() );\n //BELC300024526 - gPineda - 29/11/2006\n //dtoDevolucionPeriodoOriginal.setOidPeriodo( dtoSolicitud.getOidPeriodo() );\n dtoDevolucionPeriodoOriginal.setOidSolicitud( dtoSolicitud.getOidSolicitud() );\n dtoDevolucionPeriodoOriginal.setOidSubAcceso( dtoSolicitud.getOidSubAcceso() );\n dtoDevolucionPeriodoOriginal.setOidTipoSolPais( dtoSolicitud.getOidTipoSolPais() ); \n dtoDevolucionPeriodoOriginal.setOrden( dtoSolicitud.getOrden() ); \n dtoDevolucionPeriodoOriginal.setOrdenMonitor( dtoSolicitud.getOrdenMonitor() );\n dtoDevolucionPeriodoOriginal.setProceso( dtoSolicitud.getProceso() );\n dtoDevolucionPeriodoOriginal.setTipoCambio( dtoSolicitud.getTipoCambio() );\n dtoDevolucionPeriodoOriginal.setUbigeo( dtoSolicitud.getUbigeo() );\n dtoDevolucionPeriodoOriginal.setZona( dtoSolicitud.getZona() );\n //cvalenzu - 7/12/2006 - faltaba el pais\n dtoDevolucionPeriodoOriginal.setOidPais(dtoSolicitud.getOidPais());\n //cvalenzu - 7/12/2006 - faltaba el pais\n \n solicitudDevolucion = this.obtenerSolicitud( dtoDevolucionPeriodoOriginal );\n }\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 24/03/2010 \n UtilidadesLog.debug(\"solicitudDevolucion: \"+ solicitudDevolucion );\n \n UtilidadesLog.info(\"DAOSolicitudes.obtenerSolicitudDevolucion(DTOSolicitudValidacion dtoSolicitud):Salida\"); \n return solicitudDevolucion;\n }",
"Collection<GestionPrecioDTO> findCampaniasPendientes() ;",
"public static List<Object> czytaniePogody(){\r\n Object[] elementyPogody = new Object[3];\r\n elementyPogody[0]=0;\r\n elementyPogody[1]=0;\r\n elementyPogody[2]=null;\r\n String line;\r\n OdczytZPliku plik = new OdczytZPliku();\r\n InputStream zawartosc = plik.pobierzZPliku(\"bazapogod.txt\");\r\n try (InputStreamReader odczyt = new InputStreamReader(zawartosc, StandardCharsets.UTF_8);\r\n BufferedReader czytaj = new BufferedReader(odczyt)) {\r\n String numerWStringu = String.valueOf(elementyPogody[0] = (int) (Math.random() * 4));\r\n while ((line = czytaj.readLine()) != null){\r\n if (line.equals(numerWStringu)){\r\n elementyPogody[1] = Integer.parseInt(czytaj.readLine());\r\n elementyPogody[2] = czytaj.readLine();\r\n System.out.println(\"\\nPogoda na dzis: \" + elementyPogody[2]);\r\n break;\r\n }\r\n else {\r\n for (int i = 0; i < 2; i++) {\r\n line = czytaj.readLine();\r\n }\r\n }\r\n }\r\n } catch (Exception ignored) {\r\n }\r\n return List.of(elementyPogody);\r\n }",
"public void obrniListu() {\n if (prvi != null && prvi.veza != null) {\n Element preth = null;\n Element tek = prvi;\n \n while (tek != null) {\n Element sled = tek.veza;\n \n tek.veza = preth;\n preth = tek;\n tek = sled;\n }\n prvi = preth;\n }\n }"
]
| [
"0.693179",
"0.6576491",
"0.65090394",
"0.62326735",
"0.6222938",
"0.6143573",
"0.6053629",
"0.60403013",
"0.60112673",
"0.59928876",
"0.5987126",
"0.5970017",
"0.5881975",
"0.58439195",
"0.584304",
"0.5834343",
"0.58000594",
"0.5794014",
"0.57842964",
"0.57833064",
"0.5685857",
"0.56677014",
"0.56587356",
"0.5629652",
"0.5624006",
"0.56198305",
"0.56158805",
"0.5552659",
"0.55324084",
"0.5513773",
"0.54456514",
"0.54333985",
"0.54326814",
"0.53920966",
"0.5386024",
"0.5371624",
"0.53667426",
"0.53647774",
"0.53540623",
"0.53476423",
"0.5331266",
"0.5330649",
"0.53255194",
"0.53159094",
"0.5304483",
"0.5293323",
"0.52835786",
"0.5273748",
"0.5272211",
"0.5267004",
"0.5264024",
"0.5261878",
"0.5261877",
"0.52615196",
"0.52612776",
"0.5250164",
"0.5246306",
"0.5240895",
"0.52230304",
"0.5218863",
"0.5215351",
"0.520553",
"0.5204605",
"0.52018684",
"0.520096",
"0.51869595",
"0.5186573",
"0.51828307",
"0.51752365",
"0.5163381",
"0.51619774",
"0.5156372",
"0.5152632",
"0.51521003",
"0.51508254",
"0.5145455",
"0.5142064",
"0.5141521",
"0.5138234",
"0.5133972",
"0.51290506",
"0.5128417",
"0.51271576",
"0.5117771",
"0.51055473",
"0.51035666",
"0.50996596",
"0.5093009",
"0.5092212",
"0.509144",
"0.50850457",
"0.5072245",
"0.5070909",
"0.5067973",
"0.5062662",
"0.50622547",
"0.50621444",
"0.50561994",
"0.5054912",
"0.5052577"
]
| 0.664155 | 1 |
/ Function to unequip weapon for hero | public void unequip(Hero h) {
// TODO Auto-generated method stub
for(Weapon w : h.getInventory().getWeaponList()) {
if(w.equipped && w.getName().equals(this.getName())) {
setEquipped(false);
statsDecrease(h, StatType.STRENGTH, getWeaponDmg());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void unequip(Equip e)\r\n { \r\n if (e.getType()==Equip.WEAPON)\r\n {\r\n attack -= e.getRating();\r\n items.add(e);\r\n }\r\n else if (e.getType() == Equip.ARMOR)\r\n {\r\n items.add(e);\r\n defense -= e.getRating();\r\n }\r\n }",
"public void equipSelectedWeapon() {\n }",
"public void equip(Hero h) {\n\t\tfor(Weapon w : h.getInventory().getWeaponList()) {\n\t\t\tif(w.getName().equals(this.getName())) {\n\t\t\t\tw.setEquipped(true);\n\t\t\t\tw.statsIncrease(h, StatType.STRENGTH, getWeaponDmg());\n\t\t\t} else {\n\t\t\t\tw.unequip(h);\n\t\t\t}\n\t\t}\n\t}",
"public void equip();",
"public void equip(Equip equipment)\r\n { \r\n if (equipment.getType() == Equip.WEAPON)\r\n {\r\n if (weapon!=null) unequip(weapon);\r\n items.remove(equipment);\r\n weapon = equipment;\r\n attack = attack + equipment.getRating();\r\n }\r\n else //if (equipment.getType() == Equip.ARMOR)\r\n {\r\n if (armor!=null) unequip(armor);\r\n items.remove(equipment);\r\n armor = equipment;\r\n defense += equipment.getRating();\r\n }\r\n }",
"static void weapon(char item)\r\n {\r\n \tString pClass = MainApp.playerClass;\r\n \tif(MainApp.alreadyEquipped == false)\r\n\t\t{\r\n\t\t\tif(pClass == \"Warrior\")\r\n\t\t\t{\r\n\t \t\tif(item == '0')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Warrior Equipped!\");\r\n\t \t\t}\r\n\t \t\t//System.out.print(\"Post Equip Warrior\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Archer\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '&')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Archer Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Archer\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Rogue\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '!')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Rogue Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Rogue\");\r\n\t\t\t}\r\n\t }\r\n }",
"@Override\n public void equip(@NotNull IWeapon weapon) {\n weapon.equipToMage(this);\n }",
"public void selectWeaponFromInventory(int weaponIndex) {\n }",
"public String unequipItem(String itemName) {\r\n\t\t\tif(itemName == \"unarmored\") {\r\n\t\t\t\treturn \"You do not have any armor to unequip.\"; // handles unarmored situation\r\n\t\t\t}\r\n\t\t\telse if(itemName.equals(this.getPlayer().getBodyArmor().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getBodyArmor().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getBodyArmor());\r\n\t\t\t\tthis.getPlayer().setBodyArmor(this.getDefaultBodyArmor());\t\t// set armor to default on unequip\r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getHeadgear().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getHeadgear().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getHeadgear());\r\n\t\t\t\tthis.getPlayer().setHeadgear(this.getDefaultHeadgear());\t\t// set headgear to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getGloves().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getGloves().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getGloves());\r\n\t\t\t\tthis.getPlayer().setGloves(this.getDefaultGloves());\t\t\t// set gloves to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getBoots().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getBoots().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getBoots());\r\n\t\t\t\tthis.getPlayer().setBoots(this.getDefaultBoots());\t\t\t\t// set boots to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getWeapon().getName())) {\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getWeapon());\r\n\t\t\t\tthis.getPlayer().setWeapon(this.getDefaultWeapon());\t\t\t// set weapon to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn \"You cannot unequip an item you are not wearing.\";\r\n\t\t\t}\r\n\t\t}",
"public void equipWeaponToCharacter (IPlayerCharacter character) {\n if (lenInventory > 1){\n character.equip(this.weaponsInventory.get(this.pointInventory));\n }\n }",
"public void useWeapon(Character victim) {\n Weapons weapons = this.getInventory().getFirstWeapon();\n if (weapons == null)\n this.hit(victim);\n else {\n int vStrength = victim.getStrength();\n int mStrength = this.getStrength() * Hero.HERO_BONUS_OVER_ALL_CHARS + weapons.getDamage();\n if (vStrength >= mStrength) return;\n int strDif = mStrength - vStrength;\n int vLife = victim.getLife();\n vLife -= strDif;\n victim.setLife(vLife);\n this.getInventory().removeItems(weapons);\n }\n }",
"public void removeWeapon(Weapon w) {\n try {\n this.validChoice(w);\n weaponSpawnpoint.removeWeapon(w);\n } catch (WrongValueException wvE) {\n wvE.wrong();\n }\n }",
"public void setEquippedWeapon(String w)\n\t{\n\t\tstrEquippedWeapon = w;\n\t\t\n\t}",
"public String getEquippedWeaponName() {\n return \"\";\n }",
"public Weapon useWeapon() {\n\t\tWeapon weapon = weaponList.get(weaponList.size() - 1);\n\t\tif(weaponList.size() > 1){\n\t\t\tweaponList.remove(weaponList.size() - 1);\n\t\t}\n\t\telse {\n\t\t}\n\t\treturn weapon;\n\t}",
"public void toSelectingWeapon() {\n }",
"public void equipHero() {\n\t\ttipo = 'A';\n\t}",
"public void attack() {\n if (activeWeapon == null) {\n return;\n }\n attacking = true;\n }",
"private void subtractEnemySheild(int damage) {\n this.enemyShield -= damage;\n }",
"@Override\r\n\tpublic void onUnequipped(ItemStack stack, EntityLivingBase living)\r\n\t{\n\t}",
"@Override\n @Test\n public void equipTest() {\n Axe axes;\n Sword sword;\n Staff staff;\n Spear spear;\n Luz luz;\n Oscuridad oscuridad;\n Anima anima;\n Bow bow;\n axes = new Axe(\"Axe\", 20, 1, 2);\n sword = new Sword(\"Sword\", 20, 1, 2);\n spear = new Spear(\"Spear\", 20, 1, 2);\n staff = new Staff(\"Staff\", 20, 1, 2);\n bow = new Bow(\"Bow\", 20, 2, 3);\n anima = new Anima(\"Anima\", 20, 1, 2);\n luz = new Luz(\"Luz\", 20, 1, 2);\n oscuridad = new Oscuridad(\"Oscuridad\", 20, 1, 2);\n sorcererAnima.addItem(axes);\n sorcererAnima.equipItem(axes);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(axes);\n sorcererAnima.addItem(sword);\n sorcererAnima.equipItem(sword);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(sword);\n sorcererAnima.addItem(spear);\n sorcererAnima.equipItem(spear);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(spear);\n sorcererAnima.addItem(staff);\n sorcererAnima.equipItem(staff);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(staff);\n sorcererAnima.addItem(bow);\n sorcererAnima.equipItem(bow);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(bow);}",
"private void subtractPlayerSheild(int damage) {\n this.playerShield -= damage;\n }",
"public void getAttackedByDarknessMagicBook(IEquipableItem item){item.strongAttackTo(this.getOwner());}",
"@Override\r\n\tpublic void equipArmor() {\n\t\tSystem.out.println(\"아머 장착\");\r\n\t}",
"public void weaponAbility() {\n \tlogger.info(\"weapon abilities aren't implemented yet. Using slash ability\");\n \t//ability(map.getCurrentTurnHero().getWeaponAbility());\n \tability(new Slash());\n }",
"@Override\r\n public void uncall() {\r\n Player player = MbPets.getInstance().getServer().getPlayer(getOwner());\r\n if (player != null) {\r\n if (getEntity().getInventory().getDecor() != null) {\r\n if (player.getInventory().firstEmpty() >= 0) {\r\n player.getInventory().addItem(getEntity().getInventory().getDecor());\r\n } else {\r\n player.getWorld().dropItemNaturally(player.getLocation(),\r\n getEntity().getInventory().getDecor());\r\n }\r\n }\r\n }\r\n super.uncall();\r\n }",
"public void shootGun() {\n\t\tammo--;\n\t}",
"@Override\r\n\tpublic void onTravelGearUnequip(EntityPlayer player, ItemStack stack)\r\n\t{\n\t}",
"public void getKilledProduct() \n {\n try{\n Player.getInstance().getInventory().add(new CowMeat());\n } catch (IllegalAccessException e) {\n //Do nothing\n }\n }",
"public void equip(Equipment e){\n equipment.add(e);\n }",
"public void pickUpWeapon(CardWeapon weapon, CardWeapon weaponToWaste, List<CardPower> powerUp) throws InsufficientAmmoException, NoCardWeaponSpaceException {\n List <Color> tmp = new ArrayList<>(weapon.getPrice());\n List <CardPower> tmpPU = new ArrayList<>();\n if(this.weapons.size()== 3)\n if(weaponToWaste==null)\n throw new NoCardWeaponSpaceException();\n if(tmp.size() > 1)\n {\n tmp = tmp.subList(1, tmp.size());\n pay(tmp, powerUp);\n }\n if (weapons.size() == 3){\n this.position.getWeapons().add(weaponToWaste);\n this.weapons.remove(weaponToWaste);\n }\n this.weapons.add(weapon);\n weapon.setShooter(this);\n this.position.getWeapons().remove(weapon);\n if(game != null)\n game.notifyGrabWeapon(this,weapon, weaponToWaste);\n\n }",
"private void useInventoryByAI() {\n\t\tChampion AI = currentTask.getCurrentChamp();\n\t\tArrayList<Collectible> inventory = ((Wizard)AI).getInventory();\n\t\tif(inventory.size()>0){\n\t\t\tint randomPotion = (int)(Math.random()*inventory.size());\n\t\t\tcurrentTask.usePotion((Potion)inventory.get(randomPotion));\n\t\t}\n\n\t\t\n\t}",
"private void setArmor() {\n\n if (VersionChecker.currentVersionIsUnder(12, 2)) return;\n if (!ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_ARMOR)) return;\n\n eliteMob.getEquipment().setItemInMainHandDropChance(0);\n eliteMob.getEquipment().setHelmetDropChance(0);\n eliteMob.getEquipment().setChestplateDropChance(0);\n eliteMob.getEquipment().setLeggingsDropChance(0);\n eliteMob.getEquipment().setBootsDropChance(0);\n\n if (hasCustomArmor) return;\n\n if (!(eliteMob instanceof Zombie || eliteMob instanceof PigZombie ||\n eliteMob instanceof Skeleton || eliteMob instanceof WitherSkeleton)) return;\n\n eliteMob.getEquipment().setBoots(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.AIR));\n\n if (eliteMobLevel >= 12)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.LEATHER_HELMET));\n\n if (eliteMobLevel >= 14)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.LEATHER_BOOTS));\n\n if (eliteMobLevel >= 16)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.LEATHER_LEGGINGS));\n\n if (eliteMobLevel >= 18)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.LEATHER_CHESTPLATE));\n\n if (eliteMobLevel >= 20)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.CHAINMAIL_HELMET));\n\n if (eliteMobLevel >= 22)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.CHAINMAIL_BOOTS));\n\n if (eliteMobLevel >= 24)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.CHAINMAIL_LEGGINGS));\n\n if (eliteMobLevel >= 26)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.CHAINMAIL_CHESTPLATE));\n\n if (eliteMobLevel >= 28)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.IRON_HELMET));\n\n if (eliteMobLevel >= 30)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.IRON_BOOTS));\n\n if (eliteMobLevel >= 32)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.IRON_LEGGINGS));\n\n if (eliteMobLevel >= 34)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.IRON_CHESTPLATE));\n\n if (eliteMobLevel >= 36)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.DIAMOND_BOOTS));\n\n if (eliteMobLevel >= 38)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.DIAMOND_HELMET));\n\n if (eliteMobLevel >= 40)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));\n\n if (eliteMobLevel >= 42)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));\n\n }",
"public static void genWeaponList() {\r\n int i;\r\n\r\n auxItemVector.clear();\r\n \r\n if(currentChar == null) return;\r\n\r\n for (i = 0; i < currentChar.getItemsNumber(); i++) {\r\n if(currentChar.getItem(i).getType() == weapon)\r\n auxItemVector.add(currentChar.getItem(i));\r\n }\r\n }",
"public void damage(Hero other) {\n this.weapon.knockBack(other, this.state, this.dir);\n }",
"public int getEquippedWeaponDamage() {\n return 0;\n }",
"public void purchaseTower(Tower towerType){ //This method will pruchase a tower from the player class given a Attacker Object\n if(this.coins()<towerType.getPrice()){ //checks to make sure that the player has neough money, if not it returns\n return;\n }\n\n myGame.addTower(Tower towerType); //calls the addTower method from the game class. Game will be resopnsible for storing towers not the player class\n this.coins-=towerType.getPrice(); //decrement the appropriate number of coins after purchsing the tower\n }",
"private void tryEquipItem() {\n if (fakePlayer.get().getHeldItem(EnumHand.MAIN_HAND).isEmpty()) {\n ItemStack unbreakingPickaxe = new ItemStack(Items.DIAMOND_PICKAXE, 1);\n unbreakingPickaxe.addEnchantment(Enchantments.EFFICIENCY, 3);\n unbreakingPickaxe.setTagCompound(new NBTTagCompound());\n unbreakingPickaxe.getTagCompound().setBoolean(\"Unbreakable\", true);\n fakePlayer.get().setItemStackToSlot(EntityEquipmentSlot.MAINHAND, unbreakingPickaxe);\n }\n }",
"public WeaponType getEquippedWeaponType() {\n return WeaponType.NULL;\n }",
"void evadeAttack(IUnit attacker, int incomingDamage);",
"public short getSiegeWeaponDamage();",
"public String getWeapon() {\n return weapon1;\n }",
"private void takeDamage(int damage){ health -= damage;}",
"public void setWeapon(int weapon)\n\t{\n\t\tthis.weapon = weapon;\n\t}",
"public void attack(ItemWeapon w, Monster target) {\n\t\ttarget.takeDamage(w.getDamage()+level*20);\n\t}",
"public void addWeapon(Pair<Byte,Short> weapon){\n //Total number of weapons player can carry is 5 (inc. default weapon)\n //If player has <3 weapons, simply add weapon.\n //Otherwise, first remove oldest weapon in inventory then add at that\n //position.\n //oldest weapon tracked by linked list of weapon entries.\n if(this.weapons.size() < 3) {\n this.weapons.add(weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n }else{\n //Checks for duplicates, if duplicate weapons\n //found, new weapons ammo is just added to the current\n //weapon already in inventory\n for(Pair<Byte,Short> w : this.weapons){\n if(Objects.equals(w.getKey(), weapon.getKey())){\n if(weaponEntryTracker.size() == 1){\n weaponEntryTracker = new LinkedList<>();\n }\n else{\n for(int tracker : weaponEntryTracker){\n if(tracker == this.weapons.indexOf(w)){\n weaponEntryTracker.remove((Integer) tracker);\n }\n }\n }\n Pair<Byte,Short> newWeapon = new Pair<>(weapon.getKey(), (short) (w.getValue()+weapon.getValue()));\n if(this.currentWeapon == w){\n this.setCurrentWeapon(newWeapon);\n }\n this.weapons.set(this.weapons.indexOf(w),newWeapon);\n weaponEntryTracker.add((byte) this.weapons.indexOf(newWeapon));\n return;\n }\n }\n //check for any no weapon entries - indicates\n //player dropped weapon.\n for(Pair<Byte,Short> w : this.weapons){\n if(w.getKey() == NO_WEAPON_ID){\n this.weapons.set(this.weapons.indexOf(w),weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n return;\n }\n }\n //If no null entries are found, remove oldest weapon\n int oldestWeapon = this.weaponEntryTracker.poll();\n byte oldestWeaponKey = this.weapons.get(oldestWeapon).getKey();\n this.weapons.set(oldestWeapon, weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n if(oldestWeaponKey == currentWeapon.getKey()){\n setCurrentWeapon(weapon);\n }\n\n }\n }",
"private Card murderWeapon(UI ui, Player currentPlayer) {\n CardPanel cardPanel = new CardPanel(ui.getBoard(), ui.getCmd(), \"weapons\");\n ui.getLayers().add(cardPanel, Integer.valueOf(6));\n cardPanel.showPanel();\n ui.getInfo().addText(\"Enter the weapon you think \" + murderer.getName() + \" killed Gunther in \" + location.getName() + \". Listed Below\"); // prompt\n\n // display all the characters to the player that they can select\n for (int i = 0; i < WEAPON_NAMES.length; i++) {\n ui.getInfo().addText(WEAPON_NAMES[i].toString().substring(0,1) + WEAPON_NAMES[i].toString().substring(1).toLowerCase());\n }\n\n WeaponTypes murderWeapon = null;\n String weapon;\n\n // check the input from the user whether it is a weapon, help command, notes command or the wrong input\n do {\n weapon = ui.getCmd().getCommand().toLowerCase();\n switch (weapon) {\n case \"rope\":\n murderWeapon = WeaponTypes.ROPE;\n break;\n case \"dagger\":\n murderWeapon = WeaponTypes.DAGGER;\n break;\n case \"wrench\":\n murderWeapon = WeaponTypes.WRENCH;\n break;\n case \"pistol\":\n murderWeapon = WeaponTypes.PISTOL;\n break;\n case \"candlestick\":\n murderWeapon = WeaponTypes.CANDLESTICK;\n break;\n case \"pipe\":\n murderWeapon = WeaponTypes.PIPE;\n break;\n case \"notes\":\n currentPlayer.getPlayerNotes().showNotes(currentPlayer);\n break;\n case \"help\":\n ui.getInfo().addText(\"Select a weapon from the list above for the questioning!\");\n break;\n default:\n ui.getInfo().addText(\"That was an invalid entry, enter a weapon from the list above for the questioning!\");\n break;\n }\n } while (murderWeapon == null); // while the player input was not a weapon\n\n cardPanel.removePanel();\n ui.getLayers().remove(cardPanel);\n return new Card(murderWeapon.toString()); // return a card with the murder weapon selected by the user\n }",
"public void allocateWeapons() {\n Collections.shuffle(this.getWeaponPieces());\n List<Room> rooms = this.board.getRooms();\n Collections.shuffle(rooms);\n int roomIndex = 0;\n for (WeaponPiece weapon : this.getWeaponPieces()) {\n Room room = rooms.get(roomIndex);\n if (room.getWeaponPiece() == null) {\n room.setWeaponPiece(weapon);\n roomIndex += 1;\n }\n }\n }",
"private void reviveAttacker() {\n\t\tString type = (mRandom.nextFloat() > mKnightSpawnChance) ? \"normal\" : \"knight\";\n\t\treviveAttacker(type);\n\t}",
"public static void giveStuff(GamePlayer player) {\r\n\t\tItemStack sword = new ItemStack(Material.WOOD_SWORD);\r\n\t\tItemStack bow = new ItemStack(Material.BOW);\r\n\t\tItemStack arrow = new ItemStack(Material.ARROW);\r\n\t\tItemStack compass = new ItemStack(Material.COMPASS);\r\n\t\tItemMeta compassMeta = sword.getItemMeta();\r\n\t\tItemMeta swordMeta = sword.getItemMeta();\r\n\t\tItemMeta bowMeta = sword.getItemMeta();\r\n\t\t\r\n\t\tplayer.getPlayer().getInventory().clear();\r\n\t\tswordMeta.spigot().setUnbreakable(true);\r\n\t\tsword.setItemMeta(swordMeta);\r\n\t\tsword.setAmount(1);\r\n\t\t\r\n\t\tbowMeta.spigot().setUnbreakable(true);\r\n\t\tbowMeta.setDisplayName(\"§aSniper§r §7(One Shot Kill)\");\r\n\t\tbow.setItemMeta(bowMeta);\r\n\t\tbow.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 10);\r\n\t\tbow.setAmount(1);\r\n\t\t\r\n\t\tarrow.setAmount(1);\r\n\t\t\r\n\t\tcompassMeta.setDisplayName(\"§aTarget Tracker\");\r\n\t\tcompass.setItemMeta(compassMeta);\r\n\t\tcompass.setAmount(1);\r\n\t\t\r\n player.getPlayer().getInventory().addItem(sword);\r\n player.getPlayer().getInventory().addItem(bow);\r\n player.getPlayer().getInventory().addItem(arrow);\r\n player.getPlayer().getInventory().addItem(compass);\r\n\t}",
"public void addToInventory(IWeapon weapon){\n if (weaponsInventory.size() < 12) {\n this.weaponsInventory.add(weapon);\n lenInventory += 1;\n }\n }",
"@Override\n public Type getItemType() {\n return Type.WEAPON;\n }",
"void defendAttack(IUnit attacker, int incomingDamage);",
"public WeaponComponent() {\n weaponName = \"none\";\n owned = false;\n damagePower = 1;\n }",
"@Listener\n public void onDeath(DestructEntityEvent.Death event) {\n if (!(event.getTargetEntity() instanceof Player))\n return;\n\n Optional<EntityDamageSource> source = event.getCause().first(EntityDamageSource.class);\n if (!source.isPresent())\n return; // did not die from pvp\n\n Player killed = (Player) event.getTargetEntity();\n\n Player killer = null;\n ItemStack weapon = null;\n Entity damager = source.get().getSource();\n if (damager instanceof Player) {\n killer = (Player) damager;\n weapon = killer.getItemInHand(HandTypes.MAIN_HAND).get();\n }\n\n if (damager instanceof Projectile) {\n Projectile proj = (Projectile) damager;\n if (proj.getShooter() instanceof Player) {\n killer = (Player) proj.getShooter();\n weapon = killer.getItemInHand(HandTypes.MAIN_HAND).get();\n }\n }\n\n if (damager.get(TameableData.class).isPresent()) {\n Optional<UUID> opOwnerUUID = damager.get(TameableData.class).get().owner().get();\n if (opOwnerUUID.isPresent()) {\n UUID uuid = opOwnerUUID.get();\n if (plugin.getServer().getOfflinePlayer(uuid).map(OfflinePlayer::isOnline).orElse(false)) {\n killer = ((SpongePlayer) plugin.getServer().getPlayer(uuid).get()).getHandle();\n // Use a bone to show the case was a wolf\n weapon = ItemStack.builder().itemType(ItemTypes.BONE).quantity(1).build();\n }\n }\n }\n\n if (killer == null)\n return;\n\n // Check the killers world just incase for some reason the\n // killed player was teleported to another world\n if (plugin.getConfigManager().getPvPConfig().getNode(\"ignoredWorlds\").getCollectionValue(String.class).contains(killer.getWorld().getName()))\n return;\n\n TrackerUtil.updatePvPStats(plugin.getServer().getOfflinePlayer(killed.getUniqueId().toString()).get(),\n plugin.getServer().getOfflinePlayer(killer.getUniqueId().toString()).get());\n\n TrackerInterface pvpTracker = plugin.getTrackerManager().getPvPInterface();\n if (pvpTracker.getDeathMessageManager().isDefaultMessagesOverriden())\n event.setMessageCancelled(true);\n\n pvpTracker.getDeathMessageManager().sendItemMessage(killer.getName(), killed.getName(), weapon.getType().getName().toLowerCase());\n pvpTracker.getRecapManager().getDeathRecaps().get(killed.getName()).setVisible(true);\n }",
"abstract public Unit getDefendingUnit(Unit attacker);",
"@Override\n\tpublic Weapon sell(int itemNumber) {\n\t\t\n\t\t\n\t\treturn inventory.removeItem(itemNumber);\n\t}",
"public String getEquippedWeapon()\n\t{\n\t\treturn strEquippedWeapon;\n\t\t\n\t}",
"public void unlockWeapons(int level) {\n\t\tif (level <= weaponLevel) {\n\t\t\treturn;\n\t\t}\n\t\tList<ItemType> items = new ArrayList<>();\n\t\t// Adding all the defined weapons in WeaponType enumerate class\n\t\tfor (WeaponType wep : WeaponType.values()) {\n\t\t\titems.add(wep);\n\t\t}\n\t\tupdateShop(items, level);\n\t\tweaponLevel = level;\n\t}",
"public void healPokemon() {\r\n\t\tfor (Pokemon p : ownedPokemon) {\r\n\t\t\tp.resetCurrentHP();\r\n\t\t}\r\n\t}",
"public void die() {\r\n final Entity e = entity;\r\n final EnchantArrow arrow = this;\r\n Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(Storage.zenchantments, () -> {\r\n if (Storage.advancedProjectiles.containsKey(e)) {\r\n if (Storage.advancedProjectiles.get(e).size() == 1) {\r\n Storage.advancedProjectiles.remove(e);\r\n } else {\r\n Storage.advancedProjectiles.get(e).remove(arrow);\r\n }\r\n }\r\n }, 1);\r\n }",
"private void subtractEnemyHealth(int damage) {\n this.enemyShipHealth -= damage;\n }",
"@Override\n public void useWeapon(ResponseInput responseMessage)\n {\n basicMode(((ResponseRocketLauncher) responseMessage).getTargetPlayerBasicMode(), ((ResponseRocketLauncher) responseMessage).getTargetSquareCoordinatesAsStringPlayerToMove(), ((ResponseRocketLauncher) responseMessage).getTargetSquareCoordinatesAsStringTargetToMove(), ((ResponseRocketLauncher) responseMessage).isWithFragWarhead() ) ;\n }",
"public void pickUp(Item item) {\n this.curItem = item;\n this.curItem.setNonDamagablePlayer(this);\n if (item instanceof PickupableWeaponHolder) {\n this.weapon = ((PickupableWeaponHolder)(item)).getWeapon();\n }\n }",
"public void selectWeapon( final int weaponIndex ) throws RemoteException {\r\n if ( weaponIndex < weapons.length ) {\r\n playerState.weaponIndex = weaponIndex;\r\n playerState.weapon = weapons[ playerState.weaponIndex ];\r\n }\r\n }",
"public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}",
"public Weapon(){\n \n name = \"Claw\"; // will be treated as a sword\n type = 'R';\n advType = 'G';\n disType = 'B';\n mt = 4;\n hit = 85;\n crit = 0;\n wt = 1;\n isMagic = true;\n \n }",
"@Test\n public void testGivenCharacterAndWeaponWhenUnequippingWeaponThenVerifyEntitiesUpdated() throws InvalidActionException {\n Clan clan = new Clan();\n clan.setId(1);\n clan.setName(\"Dragons\");\n\n Character character = new Character();\n character.setId(2);\n character.setName(\"Rusty Nick\");\n character.setState(CharacterState.READY);\n character.setClan(clan);\n\n ItemDetails weaponDetails = new ItemDetails();\n weaponDetails.setItemType(ItemType.WEAPON);\n\n Item weapon = new Item();\n weapon.setId(3);\n weapon.setDetails(weaponDetails);\n weapon.setClan(null);\n weapon.setCharacter(character);\n character.getItems().add(weapon);\n\n Set<Item> weapons = new HashSet<>();\n clan.setItems(weapons);\n\n // when unequipping weapon\n Mockito.when(characterRepository.getOne(2)).thenReturn(character);\n Mockito.when(itemRepository.getOne(3)).thenReturn(weapon);\n\n itemService.unequipItem(3,2, 1);\n\n // then verify entities updated\n assertNull(weapon.getCharacter());\n assertEquals(clan, weapon.getClan());\n assertNull(character.getWeapon());\n assertEquals(weapon, clan.getItems().iterator().next());\n }",
"public void usePotion() {\n Potion potion = this.getInventory().getFirstPotion();\n if (potion != null){\n this.setLife(this.getLife() + potion.getGainLife());\n this.getInventory().removeItems(potion);\n }\n }",
"public void suffer(int damage){\r\n\t\thp -= damage;\r\n\t\tinvulnerable = true;\r\n\t}",
"private void subtractEnemyMissile() {\n this.enemyMissile -= 1;\n }",
"@Override\n public void unInvoke() {\n final Environmental item = affected;\n if (item == null)\n return;\n final Room room = CMLib.map().roomLocation(item);\n if ((canBeUninvoked()) && (room != null))\n room.showHappens(CMMsg.MSG_OK_VISUAL, item, L(\"<S-YOUPOSS> flaming sword is consumed!\"));\n super.unInvoke();\n if ((canBeUninvoked()) && (room != null)) {\n room.recoverRoomStats();\n item.destroy();\n }\n }",
"public Equip getEquip(int type)\r\n {\r\n if (type==Equip.WEAPON)\r\n return weapon;\r\n else if (type == Equip.ARMOR)\r\n return armor;\r\n return null;\r\n }",
"public interface Weapon {\n\n /**\n * method which is used when one war participant attacks other\n *\n * @param target target war participant\n * @param attacker attacker war participant\n */\n void fire(WarParticipant target, WarParticipant attacker, int noOfShooters);\n\n}",
"public IntrinsicWeapon getIntrinsicWeapon() {\r\n\t\treturn new IntrinsicWeapon(10, \"bombard\");\r\n\t}",
"public void fight(String enemy)\n\t{\n\t\tScanner kbAlpha = new Scanner(System.in);\n\t\t\n\t\tString strInput;\t\t\t\t\t\t//player input\n\t\tchar cAttack;\t\t\t\t\t\t\t//player input attack button\n\t\trandom = new Random();\n\t\t\n\t\tcAttack = 'x';\n\t\t\n\t\tif (strEquippedWeapon.equals(\"Dagger\"))\n\t\t{\n\t\t\tthis.iMaxDmg = 5; \t\t\t\t\t//exclusive\n\t\t\tthis.iMinDmg = 2;\t\t\t\t\t//inclusive\n\t\t}\n\t\telse if (strEquippedWeapon.equals(\"Steampunk 4-Barrel Pistol\"))\n\t\t{\n\t\t\tthis.iMaxDmg = 8; \t\t\t\t\t//exclusive\n\t\t\tthis.iMinDmg = 3;\t\t\t\t\t//inclusive\t\t\t\n\t\t}\n\t\telse if (strEquippedWeapon.equals(\"Steampunk Mach. II Riflesword\"))\n\t\t{\n\t\t\tthis.iMaxDmg = 16; \t\t\t\t\t//exclusive\n\t\t\tthis.iMinDmg = 6;\t\t\t\t\t//inclusive\n\t\t}\n\t\t\n\t\tif (enemy.equals(\"alien1\"))\n\t\t{\n\t\t\tthis.iAlienHP = 15;\n\t\t\tthis.iAlienMaxDmg = 3;\t\t\t\t//exclusive\n\t\t\tthis.iAlienMinDmg = 1;\t\t\t\t//inclusive\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if (this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.inventory.add(\"Steampunk 4-Barrel Pistol\");\n\t\t\t\t\tsetEquippedWeapon(\"Steampunk 4-Barrel Pistol\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \", but you have killed\"\n\t\t\t\t\t\t+ \" the alien!\\nThe alien dropped his \" +\n\t\t\t\t\t\t\"weapon! You pick it up an examine it. It looks like\\nit is a \" +\n\t\t\t\t\t\t\"Steampunk 4-Barrel Pistol. This might be a better option than \" +\n\t\t\t\t\t\t\"the\\n\" + getEquippedWeapon() + \". You equip it.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you have killed\"\n\t\t\t\t\t\t\t+ \" the alien!\\nThe alien dropped his \" +\n\t\t\t\t\t\t\t\"weapon! You pick it up an examine it. It looks like\\nit is a \" +\n\t\t\t\t\t\t\t\"Steampunk 4-Barrel Pistol. This might be a better option than \" +\n\t\t\t\t\t\t\t\"the\\n\" + getEquippedWeapon() + \". You equip it.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"alien2\"))\n\t\t{\n\t\t\tthis.iAlienHP = 18;\n\t\t\tthis.iAlienMaxDmg = 5;\t\t\t\t//exclusive\n\t\t\tthis.iAlienMinDmg = 1;\t\t\t\t//inclusive\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.iHP += 10;\n\t\t\t\t\tthis.inventory.add(\"Manhole Cover Shield\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damge, but you \" +\n\t\t\t\t\t\t\"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. \" +\n\t\t\t\t\t\t\"Fantastic!\\nSearching the alien's corpse, you find a Manhole Cover\"\n\t\t\t\t\t\t+ \" Shield! This will\\nprotect you from some damage.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \"\n\t\t\t\t\t\t\t+ \"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. \" +\n\t\t\t\t\t\t\t\"Fantastic!\\nSearching the alien's corpse, you find a Manhole Cover\"\n\t\t\t\t\t\t\t+ \" Shield! This will\\nprotect you from some damage.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"alien3\"))\n\t\t{\n\t\t\tif (evaluateInventory(\"Manhole Cover Shield\"))\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 22;\n\t\t\t\tthis.iAlienMaxDmg = 7;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 2;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 22;\n\t\t\t\tthis.iAlienMaxDmg = 9;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 3;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.iHP += 15;\n\t\t\t\t\tthis.inventory.add(\"Edison Grenade\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \" +\n\t\t\t\t\t\t\"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t+ \"you find a health pack that increases your health by 15. The \"\n\t\t\t\t\t\t+ \"alien also\\ndropped an Edison Grenade! It looks like a bulb but \"\n\t\t\t\t\t\t+ \"probably does more\\nthan light up a room!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \" +\n\t\t\t\t\t\t\t\"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t\t+ \"you find a health pack that increases your health by 15. The \"\n\t\t\t\t\t\t\t+ \"alien also\\ndropped an Edison Grenade! It looks like a bulb but \"\n\t\t\t\t\t\t\t+ \"probably does more\\nthan light up a room!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"alien4\"))\n\t\t{\n\t\t\tif(evaluateInventory(\"Manhole Cover Shield\"))\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 18;\n\t\t\t\tthis.iAlienMaxDmg = 6;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 1;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 18;\n\t\t\t\tthis.iAlienMaxDmg = 8;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 2;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.iHP += 10;\n\t\t\t\t\tthis.inventory.add(\"Steampunk Mach. II Riflesword\");\n\t\t\t\t\tsetEquippedWeapon(\"Steampunk Mach. II Riflesword\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you\"\n\t\t\t\t\t\t+ \" killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. The \"\n\t\t\t\t\t\t+ \"alien also\\ndropped a Steampunk Mach. II Riflesword! This weapon\"\n\t\t\t\t\t\t+ \" looks quite menacing.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you\"\n\t\t\t\t\t\t\t+ \" killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. The \"\n\t\t\t\t\t\t\t+ \"alien also\\ndropped a Steampunk Mach. II Riflesword! This weapon\"\n\t\t\t\t\t\t\t+ \" looks quite menacing.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"boss\"))\n\t\t{\n\t\t\tif(evaluateInventory(\"Manhole Cover Shield\"))\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 50;\n\t\t\t\tthis.iAlienMaxDmg = 10;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 2;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 50;\n\t\t\t\tthis.iAlienMaxDmg = 12;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 4;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\n\t\t\t\n\t\t\tif (evaluateInventory(\"Edison Grenade\"))\n\t\t\t{\n\t\t\t\tthis.inventory.remove(\"Edison Grenade\");\n\t\t\t\tthis.iAlienHP -= 20;\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You lob the Edison Grenade to start the battle and hide \"\n\t\t\t\t\t+ \"behind a cluster\\nof stalagmite. A few seconds later, the grenade\"\n\t\t\t\t\t+ \" explodes dealing 20\\ndamage to the boss alien!\\n\\nBoss Alien HP \" +\n\t\t\t\t\t\"left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You lob the Edison Grenade to start the battle and hide \"\n\t\t\t\t\t\t+ \"behind a cluster\\nof stalagmite. A few seconds later, the grenade\"\n\t\t\t\t\t\t+ \" explodes dealing 20 damage to the boss alien!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.inventory.add(\"Platinum Key\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \"\n\t\t\t\t\t\t+ \"have killed the boss alien! He drops the\\n\" +\n\t\t\t\t\t\t\"Platinum Key!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Pick up Platinum Key\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \"\n\t\t\t\t\t\t\t+ \"have killed the boss alien! He drops the\\n\" +\n\t\t\t\t\t\t\t\"Platinum Key!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Pick up Platinum Key\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nBoss Alien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nBoss Alien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"void takeDamage(int points) {\n this.health -= points;\n }",
"private void itemIntersectsPlayer(Entity item){\n WeaponComponent weaponComponent = player.weaponComponent;\n HealthComponent healthComponent = (HealthComponent) player.getComponent(ComponentType.HEALTH);\n\n EntityType type = item.getEntityType();\n\n\n switch (type){\n\n case ASSAULT_RIFLE:\n AssaultRifle rifle = (AssaultRifle) item;\n rifle.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(rifle);\n break;\n\n case SHOTGUN:\n Shotgun shotgun = (Shotgun) item;\n shotgun.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(shotgun);\n break;\n\n case SWORD:\n Sword sword = (Sword) item;\n sword.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(sword);\n break;\n\n\n case SHIELD:\n Shield shield = (Shield) item;\n shield.setInInventory(true);\n healthComponent.setHasShield(true);\n room.getEntityManager().removeEntity(shield);\n break;\n\n case SPEEDBOOST:\n SpeedBoost speedBoost = (SpeedBoost) item;\n speedBoost.setInInventory(true);\n player.startBoost(10000);\n room.getEntityManager().removeEntity(speedBoost);\n break;\n\n case HEART:\n Heart heart = (Heart) item;\n heart.setInInventory(true);\n healthComponent.incrementCurrentHealth();\n //do player logic here\n room.getEntityManager().removeEntity(heart);\n break;\n\n\n }\n\n\n }",
"public void stopShooting() {\n\t\tgetWeapon().releaseMain();\n\t\tsetShooting(false);\n\t}",
"public void rifleActualWeapon(){\n if(this.actualWeapon != null)\n {\n this.actualWeapon.getPreviousTargets().clear();\n this.actualWeapon.setLastTargetSquare(null);\n this.actualWeapon.setLastDirection(null);\n }\n\n }",
"private void subtractPlayerHealth(int damage) {\n this.playerShipHealth -= damage;\n }",
"void doNegativeEffect(Skill castSkill, double power, Creature performer, Item target) {\n/* 200 */ performer.getCommunicator().sendNormalServerMessage(\"The \" + target\n/* 201 */ .getName() + \" emits a deep worrying sound of resonance, but stays intact.\", (byte)3);\n/* */ }",
"@Override\n\tpublic int buy(Weapon item) {\n\t\treturn 0;\n\t}",
"@Test\n void equipWeaponTest() {\n\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(axeTest);\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(swordTest);\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(bowTest);\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(knifeTest);\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(staffTest);\n assertEquals(characterEquipWeaponTest.getEquippedWeapon(), staffTest);\n\n characterEquipWeaponTest0.equipWeapon(staffTest);\n assertNull(characterEquipWeaponTest0.getEquippedWeapon());\n\n }",
"public boolean unpoison() {\r\n\t\tstrength = STRENGTH;\r\n\t\treturn true;\r\n\t}",
"public int getEquippedWeaponWeight() {\n return 0;\n }",
"@Override\n public void applyItem() {\n Player player;\n if (Battle.getRunningBattle().getTurn() % 2 == 1)\n player = Battle.getRunningBattle().getPlayer2();\n else\n player = Battle.getRunningBattle().getPlayer1();\n\n if (player.getInGameCards().size() == 0)\n return;\n Random random = new Random();\n int randomIndex = random.nextInt(player.getInGameCards().size());\n while (!(getPlayer().getInGameCards().get(randomIndex) instanceof Warrior)) {\n randomIndex = random.nextInt(getPlayer().getInGameCards().size());\n }\n\n Buff buff = new PoisonBuff(1, true);\n buff.setWarrior((Warrior) player.getInGameCards().get(randomIndex));\n Battle.getRunningBattle().getPassiveBuffs().add(buff);\n }",
"public static Weapon spawnWeapon()\r\n\t{\r\n\t\tfinal int numberOfWeapons = 5; //update as weapons are added\r\n\t\t\r\n\t\t//Create weapons in order to access attributes / randomly select a weapon\r\n\t\tSword sword = new Sword();\r\n\t\tStick stick = new Stick();\r\n\t\tBazooka bazooka = new Bazooka();\r\n\t\tAtomicBomb atomicBomb = new AtomicBomb();\r\n\t\tPotatoCannon potatoCannon = new PotatoCannon();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tWeapon[] weapons = new Weapon[] {sword, stick,bazooka,atomicBomb,potatoCannon}; //store weapons in an array to randomly grab one to use in Game\r\n\t\t\r\n\t\tint randomWeapon; //weapon chosen\t\t\r\n\t\tRandom rng = new Random (); //create generator based upon current number of weapons\r\n\t\trandomWeapon = rng.nextInt(numberOfWeapons); //get a weapon object at random from array\r\n\r\n\t\treturn (weapons[randomWeapon]); //we have no need to create separate instance\r\n\t}",
"public void die() {\n\t\tsetDead(true);\n\t\tsetHp(0);\n\t\tgetGraphicShapes().get(stats.getBODY()).setLocation((int) getPosition().x(),\n\t\t\t\t(int) getPosition().y() + stats.getHeight() - stats.getWidth());\n\t\tgetGraphicShapes().get(stats.getBODY()).setSize(stats.getHeight(), stats.getWidth());\n\t\tgetPhysicalRectangle().setLocation((int) getPosition().x(),\n\t\t\t\t(int) getPosition().y() + stats.getHeight() - stats.getWidth());\n\t\tgetPhysicalRectangle().setSize(stats.getHeight(), stats.getWidth());\n\t\tgetGraphicShapes().remove(stats.getWEAPON());\n\t}",
"public void useItem(int num) {\r\n\t\tif (num < currentPlayer.getConsumables().size()) {\r\n\t\t\tString item = currentPlayer.getConsumables().get(num);\r\n\t\t\t// Find corresponding name\r\n\t\t\tif (item.contentEquals(\"LargeHealing\")) {\r\n\t\t\t\taddEvent(\"``\"+currentName+\"`` used a **Large Health Potion** :gift_heart:\",true);\r\n\t\t\t\tupdateHealth(currentPlayer,2);\r\n\t\t\t\tcurrentPlayer.getConsumables().remove(num);\r\n\t\t\t\tupdateBoardNoImageChange();\r\n\t\t\t} else if (item.contentEquals(\"SmallHealing\")) {\r\n\t\t\t\taddEvent(\"``\"+currentName+\"`` used a **Small Health Potion** :heartpulse:\",true);\r\n\t\t\t\tupdateHealth(currentPlayer,1);\r\n\t\t\t\tcurrentPlayer.getConsumables().remove(num);\r\n\t\t\t\tupdateBoardNoImageChange();\r\n\t\t\t} else if (item.contentEquals(\"Swift\")) {\r\n\t\t\t\taddEvent(\"``\"+currentName+\"`` used a **Potion of Swiftness** :ice_skate:\",true);\r\n\t\t\t\tcurrentPlayer.updateBoots(1);\r\n\t\t\t\tcurrentPlayer.getConsumables().remove(num);\r\n\t\t\t} else if (item.contentEquals(\"Strength\")) {\r\n\t\t\t\taddEvent(\"``\"+currentName+\"`` used a **Potion of Strength** :muscle:\",true);\r\n\t\t\t\tcurrentPlayer.updateSwords(2);\r\n\t\t\t\tcurrentPlayer.getConsumables().remove(num);\r\n\t\t\t}\r\n\t\t}\r\n\t\tupdateInfo(currentPlayer, false);\r\n\t\tupdatePlayArea(currentPlayer, false);\r\n\t}",
"public void addWeapon(Weapon x){\n\t\tplayerWeapon=new Weapon(x);\n\t\tHealth+=x.gethealthStat();\n\t\tAttackForce+=x.getafStat();\n\t\tDefense+=x.getdefenseStat();\n\t}",
"public void minusShield(int down) {\n\t\tshieldLevel -= down;\n\t}",
"public void useItem(Human user){\n user.addEnergy(10);\n user.removefromInv(this); \n }",
"public Weapon removeWeapon(int position, int row, int col)\r\n\t{\r\n\t\tif(row < rows && row >= 0 && col < columns && col >= 0)\r\n\t\t\treturn cells[row][col].removeWeapon(position);\r\n\t\treturn null;\r\n\t}",
"public void takeDamage(double damage){\n damage -= this.armor;\n this.health -= damage;\n }",
"public static void showCombatInterface(Player player, int weapon) {\n\t\tString itemName = ItemAssistant.getItemName(weapon);\n\t\tfor (int i = 0; i < unarmedItemNames.length; i++) {\n\t\t\tif (itemName.toLowerCase().equals(unarmedItemNames[i])) {\n\t\t\t\tplayer.playerAssistant.setSidebarInterface(0, 5855); // punch, kick, block\n\t\t\t\tplayer.getPA().sendFrame126(itemName, 5857);\n\t\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\t\tCombatInterface.updateClickedCombatStyle(player);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tboolean doNotChange = false;\n\t\tif ((GameType.isPreEoc() && weapon == 19780)) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4705);\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4708);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"whip\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"abyssal tentacle\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 12290); // flick, lash, deflect\n\t\t\tplayer.getPA().sendFrame246(12291, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 12293);\n\t\t\treAdjustCombatStyle(player, \"AGGRESSIVE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"chinchompa\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 27500); // first param\n\t\t\tplayer.getPA().sendFrame126(itemName, 27503); // first param + 2\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"dagger\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2276); // stab, lunge, slash, block\n\t\t\tplayer.getPA().sendFrame246(2277, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2279);\n\t\t}\n\t\telse if (itemName.toLowerCase().contains(\"bow\") || itemName.toLowerCase().contains(\"ballista\") || itemName.toLowerCase().contains(\"cannon\") || itemName.toLowerCase().contains(\"javelin\") || itemName.toLowerCase().contains(\"throwing\") || itemName.toLowerCase().contains(\"dragon thrownaxe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 1764); // accurate, rapid, longrange\n\t\t\tplayer.getPA().sendFrame246(1765, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 1767);\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t} else if (!itemName.toLowerCase().contains(\"saradomin sword\") && !itemName.toLowerCase().contains(\"blessed sword\") && !itemName.toLowerCase().contains(\"2h\") && (\n\t\t\t\titemName.toLowerCase().contains(\"rapier\") || itemName.toLowerCase().contains(\"sword\") && !itemName.toLowerCase().contains(\"godsword\") && !itemName.toLowerCase()\n\t\t\t\t .contains(\n\t\t\t\t\t\t \"longsword\"))\n\t\t\t\t|| itemName.toLowerCase().contains(\"toktz-xil-ek\") || itemName.toLowerCase().contains(\"toktz-xil-ak\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2276); // stab, lunge, slash, block\n\t\t\tplayer.getPA().sendFrame246(2277, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2279);\n\t\t} else if (itemName.toLowerCase().contains(\"staff\") || itemName.toLowerCase().contains(\"wand\") || itemName.toLowerCase().contains(\"staff of light\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"trident\") || itemName.toLowerCase().contains(\"thammaron's sceptre\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 328); // bash, pound, focus.\n\t\t\tplayer.getPA().sendFrame246(329, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 331);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t}\n\t\telse if (itemName.toLowerCase().contains(\"dart\") || itemName.toLowerCase().contains(\"knife\") || itemName.toLowerCase().contains(\"blowpipe\") || itemName.toLowerCase()\n\t\t .contains(\n\t\t\t\t \"toktz-xil-ul\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4446); // accurate, rapid, longrange\n\t\t\tplayer.getPA().sendFrame246(4447, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4449);\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t} else if (itemName.toLowerCase().contains(\"pickaxe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 5570); // spike, impale, smash, block\n\t\t\tplayer.getPA().sendFrame246(5571, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 5573);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"axe\") || itemName.toLowerCase().contains(\"hatchet\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 1698); // chop, hack, smash, block\n\t\t\tplayer.getPA().sendFrame246(1699, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 1701);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"claws\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 7762);\n\t\t\tplayer.getPA().sendFrame246(7763, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 7765);\n\t\t} else if (itemName.toLowerCase().contains(\"halberd\") || itemName.toLowerCase().contains(\"scythe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 8460); // jab, swipe, fend\n\t\t\tplayer.getPA().sendFrame246(8461, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 8463);\n\t\t\treAdjustCombatStyle(player, \"ACCURATE\", ServerConstants.AGGRESSIVE);\n\t\t} else if (itemName.toLowerCase().contains(\"spear\") || itemName.toLowerCase().contains(\"hasta\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4679); // lunge, swipe, pound, block\n\t\t\tplayer.getPA().sendFrame246(4680, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4682);\n\t\t\treAdjustCombatStyle(player, \"AGGRESSIVE ACCURATE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"mace\") || itemName.toLowerCase().contains(\"barrelchest\") || itemName.toLowerCase().contains(\"flail\") || itemName.toLowerCase()\n\t\t .contains(\n\t\t\t\t \"cane\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 3796);\n\t\t\tplayer.getPA().sendFrame246(3797, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 3799);\n\t\t} else if (itemName.toLowerCase().contains(\"maul\") || itemName.toLowerCase().contains(\"hammer\") || itemName.toLowerCase().contains(\"tzhaar-ket-om\")\n\t\t || itemName.toLowerCase().contains(\"dinh's\") || itemName.contains(\"spade\") || itemName.contains(\"club\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 425); // war hamer equip.\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 428);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"godsword\") || itemName.toLowerCase().contains(\"2h\") || itemName.toLowerCase().contains(\"saradomin sword\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"sara's blessed sword\")\n\t\t\t\t|| (GameType.isPreEoc() && weapon == 19780)) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4705); // Godsword.\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4708);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2423); // chop, slash, lunge, block\n\t\t\tplayer.getPA().sendFrame246(2424, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2426);\n\t\t}\n\t\tswitch (weapon) {\n\t\t\tcase 20779:\n\t\t\t\tplayer.playerAssistant.setSidebarInterface(0, 425); // war hamer equip.\n\t\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\t\tplayer.getPA().sendFrame126(itemName, 428);\n\t\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\t\tdoNotChange = true;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Whip is the only main weapon where the aggressive option is controlled, so make it easier by if i use whip and switch to another weapon, it puts the other weapon\n\t\t//on aggressive instead of longrange/lunge.\n\t\tif (player.wasWearingAggressiveSharedXpWeapon && !doNotChange) {\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t}\n\t\tplayer.wasWearingAggressiveSharedXpWeapon = false;\n\t\tCombatInterface.updateClickedCombatStyle(player);\n\t}",
"public void reduceHealth(int ammo_damage){\n this.health -= ammo_damage;\n }",
"public void takeDamage()\n {\n if(getWorld()!= null)\n {\n if(this.isTouching(Enemies.class))\n {\n Life = Life - Enemies.damage;\n if(Life <=0)\n {\n getWorld().removeObject(this);\n Store.wealth += Game.credit;\n }\n }\n }\n }",
"public void takedmg(int dmg){\n curHp -= dmg;\n }",
"public void removeWeapon(int weaponPosition){\n //Set the weapon entry to null and\n //remove the index from the entry tracker\n weapons.set(weaponPosition,new Pair<>(NO_WEAPON_ID, (short) 0));\n weaponEntryTracker.remove((Integer) weaponPosition);\n switch(weaponPosition) {\n case 1:\n System.out.println(\"Position is 1\");\n setCurrentWeapon(getWeapons().get(0));\n break;\n case 2:\n System.out.println(\"Position is 2\");\n if (getWeapons().get(1).getKey() != NO_WEAPON_ID) {\n System.out.println(\"Weapon at 1\");\n setCurrentWeapon(getWeapons().get(1));\n } else {\n System.out.println(\"Weapon at 2\");\n setCurrentWeapon(getWeapons().get(0));\n }\n break;\n }\n }"
]
| [
"0.7584809",
"0.73911446",
"0.7337222",
"0.7219148",
"0.6995097",
"0.69914436",
"0.6937901",
"0.6808449",
"0.66477627",
"0.6619541",
"0.6511492",
"0.6449314",
"0.63677007",
"0.63343763",
"0.632234",
"0.6293772",
"0.62578934",
"0.624703",
"0.6210731",
"0.61954176",
"0.6192578",
"0.6145778",
"0.61447674",
"0.6141335",
"0.61094457",
"0.60721874",
"0.606643",
"0.60407746",
"0.60381055",
"0.6028772",
"0.6021034",
"0.6015003",
"0.6013107",
"0.59972465",
"0.59721386",
"0.596333",
"0.5944908",
"0.59327555",
"0.5883004",
"0.58803517",
"0.58753985",
"0.5873631",
"0.58621997",
"0.58618635",
"0.5854625",
"0.5832496",
"0.58170503",
"0.5815914",
"0.58054096",
"0.58042324",
"0.57984716",
"0.5795828",
"0.5792799",
"0.5789725",
"0.57871914",
"0.57858413",
"0.5779069",
"0.5769901",
"0.5766984",
"0.57625514",
"0.57466567",
"0.57396996",
"0.5737517",
"0.5732819",
"0.57310855",
"0.5721955",
"0.5706265",
"0.57061714",
"0.5705012",
"0.5701527",
"0.56976026",
"0.56777704",
"0.5673798",
"0.5669496",
"0.566939",
"0.5668537",
"0.566752",
"0.5667247",
"0.56671035",
"0.5657682",
"0.56563085",
"0.56555825",
"0.5654901",
"0.5649947",
"0.5647869",
"0.5647796",
"0.5645421",
"0.5638443",
"0.56274635",
"0.56160754",
"0.5611123",
"0.5610816",
"0.5610061",
"0.5607612",
"0.5597949",
"0.5596882",
"0.5595212",
"0.55832624",
"0.55820084",
"0.5580764"
]
| 0.79199487 | 0 |
/ Function to equip weapon for hero | public void equip(Hero h) {
for(Weapon w : h.getInventory().getWeaponList()) {
if(w.getName().equals(this.getName())) {
w.setEquipped(true);
w.statsIncrease(h, StatType.STRENGTH, getWeaponDmg());
} else {
w.unequip(h);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void equipSelectedWeapon() {\n }",
"public void equip();",
"static void weapon(char item)\r\n {\r\n \tString pClass = MainApp.playerClass;\r\n \tif(MainApp.alreadyEquipped == false)\r\n\t\t{\r\n\t\t\tif(pClass == \"Warrior\")\r\n\t\t\t{\r\n\t \t\tif(item == '0')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Warrior Equipped!\");\r\n\t \t\t}\r\n\t \t\t//System.out.print(\"Post Equip Warrior\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Archer\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '&')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Archer Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Archer\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Rogue\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '!')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Rogue Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Rogue\");\r\n\t\t\t}\r\n\t }\r\n }",
"@Override\n public void equip(@NotNull IWeapon weapon) {\n weapon.equipToMage(this);\n }",
"public void equipWeaponToCharacter (IPlayerCharacter character) {\n if (lenInventory > 1){\n character.equip(this.weaponsInventory.get(this.pointInventory));\n }\n }",
"public void selectWeaponFromInventory(int weaponIndex) {\n }",
"public void equip(Equip equipment)\r\n { \r\n if (equipment.getType() == Equip.WEAPON)\r\n {\r\n if (weapon!=null) unequip(weapon);\r\n items.remove(equipment);\r\n weapon = equipment;\r\n attack = attack + equipment.getRating();\r\n }\r\n else //if (equipment.getType() == Equip.ARMOR)\r\n {\r\n if (armor!=null) unequip(armor);\r\n items.remove(equipment);\r\n armor = equipment;\r\n defense += equipment.getRating();\r\n }\r\n }",
"public void toSelectingWeapon() {\n }",
"public void equipHero() {\n\t\ttipo = 'A';\n\t}",
"public void weaponAbility() {\n \tlogger.info(\"weapon abilities aren't implemented yet. Using slash ability\");\n \t//ability(map.getCurrentTurnHero().getWeaponAbility());\n \tability(new Slash());\n }",
"public void unequip(Hero h) {\n\t\t// TODO Auto-generated method stub\n\t\tfor(Weapon w : h.getInventory().getWeaponList()) {\n\t\t\tif(w.equipped && w.getName().equals(this.getName())) {\n\t\t\t\tsetEquipped(false);\n\t\t\t\tstatsDecrease(h, StatType.STRENGTH, getWeaponDmg());\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"@Override\r\n\tpublic void equipArmor() {\n\t\tSystem.out.println(\"아머 장착\");\r\n\t}",
"public void setEquippedWeapon(String w)\n\t{\n\t\tstrEquippedWeapon = w;\n\t\t\n\t}",
"public void equip(Equipment e){\n equipment.add(e);\n }",
"public void attack() {\n if (activeWeapon == null) {\n return;\n }\n attacking = true;\n }",
"private void setArmor() {\n\n if (VersionChecker.currentVersionIsUnder(12, 2)) return;\n if (!ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_ARMOR)) return;\n\n eliteMob.getEquipment().setItemInMainHandDropChance(0);\n eliteMob.getEquipment().setHelmetDropChance(0);\n eliteMob.getEquipment().setChestplateDropChance(0);\n eliteMob.getEquipment().setLeggingsDropChance(0);\n eliteMob.getEquipment().setBootsDropChance(0);\n\n if (hasCustomArmor) return;\n\n if (!(eliteMob instanceof Zombie || eliteMob instanceof PigZombie ||\n eliteMob instanceof Skeleton || eliteMob instanceof WitherSkeleton)) return;\n\n eliteMob.getEquipment().setBoots(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.AIR));\n\n if (eliteMobLevel >= 12)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.LEATHER_HELMET));\n\n if (eliteMobLevel >= 14)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.LEATHER_BOOTS));\n\n if (eliteMobLevel >= 16)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.LEATHER_LEGGINGS));\n\n if (eliteMobLevel >= 18)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.LEATHER_CHESTPLATE));\n\n if (eliteMobLevel >= 20)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.CHAINMAIL_HELMET));\n\n if (eliteMobLevel >= 22)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.CHAINMAIL_BOOTS));\n\n if (eliteMobLevel >= 24)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.CHAINMAIL_LEGGINGS));\n\n if (eliteMobLevel >= 26)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.CHAINMAIL_CHESTPLATE));\n\n if (eliteMobLevel >= 28)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.IRON_HELMET));\n\n if (eliteMobLevel >= 30)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.IRON_BOOTS));\n\n if (eliteMobLevel >= 32)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.IRON_LEGGINGS));\n\n if (eliteMobLevel >= 34)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.IRON_CHESTPLATE));\n\n if (eliteMobLevel >= 36)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.DIAMOND_BOOTS));\n\n if (eliteMobLevel >= 38)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.DIAMOND_HELMET));\n\n if (eliteMobLevel >= 40)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));\n\n if (eliteMobLevel >= 42)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));\n\n }",
"public void useWeapon(Character victim) {\n Weapons weapons = this.getInventory().getFirstWeapon();\n if (weapons == null)\n this.hit(victim);\n else {\n int vStrength = victim.getStrength();\n int mStrength = this.getStrength() * Hero.HERO_BONUS_OVER_ALL_CHARS + weapons.getDamage();\n if (vStrength >= mStrength) return;\n int strDif = mStrength - vStrength;\n int vLife = victim.getLife();\n vLife -= strDif;\n victim.setLife(vLife);\n this.getInventory().removeItems(weapons);\n }\n }",
"public void addToInventory(IWeapon weapon){\n if (weaponsInventory.size() < 12) {\n this.weaponsInventory.add(weapon);\n lenInventory += 1;\n }\n }",
"public void purchaseTower(Tower towerType){ //This method will pruchase a tower from the player class given a Attacker Object\n if(this.coins()<towerType.getPrice()){ //checks to make sure that the player has neough money, if not it returns\n return;\n }\n\n myGame.addTower(Tower towerType); //calls the addTower method from the game class. Game will be resopnsible for storing towers not the player class\n this.coins-=towerType.getPrice(); //decrement the appropriate number of coins after purchsing the tower\n }",
"private void unequip(Equip e)\r\n { \r\n if (e.getType()==Equip.WEAPON)\r\n {\r\n attack -= e.getRating();\r\n items.add(e);\r\n }\r\n else if (e.getType() == Equip.ARMOR)\r\n {\r\n items.add(e);\r\n defense -= e.getRating();\r\n }\r\n }",
"public void pickUpWeapon(CardWeapon weapon, CardWeapon weaponToWaste, List<CardPower> powerUp) throws InsufficientAmmoException, NoCardWeaponSpaceException {\n List <Color> tmp = new ArrayList<>(weapon.getPrice());\n List <CardPower> tmpPU = new ArrayList<>();\n if(this.weapons.size()== 3)\n if(weaponToWaste==null)\n throw new NoCardWeaponSpaceException();\n if(tmp.size() > 1)\n {\n tmp = tmp.subList(1, tmp.size());\n pay(tmp, powerUp);\n }\n if (weapons.size() == 3){\n this.position.getWeapons().add(weaponToWaste);\n this.weapons.remove(weaponToWaste);\n }\n this.weapons.add(weapon);\n weapon.setShooter(this);\n this.position.getWeapons().remove(weapon);\n if(game != null)\n game.notifyGrabWeapon(this,weapon, weaponToWaste);\n\n }",
"@Override\n @Test\n public void equipTest() {\n Axe axes;\n Sword sword;\n Staff staff;\n Spear spear;\n Luz luz;\n Oscuridad oscuridad;\n Anima anima;\n Bow bow;\n axes = new Axe(\"Axe\", 20, 1, 2);\n sword = new Sword(\"Sword\", 20, 1, 2);\n spear = new Spear(\"Spear\", 20, 1, 2);\n staff = new Staff(\"Staff\", 20, 1, 2);\n bow = new Bow(\"Bow\", 20, 2, 3);\n anima = new Anima(\"Anima\", 20, 1, 2);\n luz = new Luz(\"Luz\", 20, 1, 2);\n oscuridad = new Oscuridad(\"Oscuridad\", 20, 1, 2);\n sorcererAnima.addItem(axes);\n sorcererAnima.equipItem(axes);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(axes);\n sorcererAnima.addItem(sword);\n sorcererAnima.equipItem(sword);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(sword);\n sorcererAnima.addItem(spear);\n sorcererAnima.equipItem(spear);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(spear);\n sorcererAnima.addItem(staff);\n sorcererAnima.equipItem(staff);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(staff);\n sorcererAnima.addItem(bow);\n sorcererAnima.equipItem(bow);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(bow);}",
"public void setWeapon(int weapon)\n\t{\n\t\tthis.weapon = weapon;\n\t}",
"public static void giveStuff(GamePlayer player) {\r\n\t\tItemStack sword = new ItemStack(Material.WOOD_SWORD);\r\n\t\tItemStack bow = new ItemStack(Material.BOW);\r\n\t\tItemStack arrow = new ItemStack(Material.ARROW);\r\n\t\tItemStack compass = new ItemStack(Material.COMPASS);\r\n\t\tItemMeta compassMeta = sword.getItemMeta();\r\n\t\tItemMeta swordMeta = sword.getItemMeta();\r\n\t\tItemMeta bowMeta = sword.getItemMeta();\r\n\t\t\r\n\t\tplayer.getPlayer().getInventory().clear();\r\n\t\tswordMeta.spigot().setUnbreakable(true);\r\n\t\tsword.setItemMeta(swordMeta);\r\n\t\tsword.setAmount(1);\r\n\t\t\r\n\t\tbowMeta.spigot().setUnbreakable(true);\r\n\t\tbowMeta.setDisplayName(\"§aSniper§r §7(One Shot Kill)\");\r\n\t\tbow.setItemMeta(bowMeta);\r\n\t\tbow.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 10);\r\n\t\tbow.setAmount(1);\r\n\t\t\r\n\t\tarrow.setAmount(1);\r\n\t\t\r\n\t\tcompassMeta.setDisplayName(\"§aTarget Tracker\");\r\n\t\tcompass.setItemMeta(compassMeta);\r\n\t\tcompass.setAmount(1);\r\n\t\t\r\n player.getPlayer().getInventory().addItem(sword);\r\n player.getPlayer().getInventory().addItem(bow);\r\n player.getPlayer().getInventory().addItem(arrow);\r\n player.getPlayer().getInventory().addItem(compass);\r\n\t}",
"public void attack(ItemWeapon w, Monster target) {\n\t\ttarget.takeDamage(w.getDamage()+level*20);\n\t}",
"public void getAttackedByDarknessMagicBook(IEquipableItem item){item.strongAttackTo(this.getOwner());}",
"public interface Weapon {\n\n /**\n * method which is used when one war participant attacks other\n *\n * @param target target war participant\n * @param attacker attacker war participant\n */\n void fire(WarParticipant target, WarParticipant attacker, int noOfShooters);\n\n}",
"public boolean hitBy(Pweapon weapon, Tower tower) {\r\n\t\tif (!spawned)\r\n\t\t\treturn false;\r\n\r\n\t\t// System.out.println(\"Tir avec arme : \" + weapon.getNameWeapon());\r\n\t\tif (!tower.isControledByPlayer()) {\r\n\t\t\t// if (decideShootMiss(tower)) {\r\n\t\t\tthis.health -= weapon.getDamage();\r\n\t\t\t// }\r\n\t\t} else {\r\n\t\t\tthis.health -= weapon.getDamage();\r\n\t\t}\r\n\t\tif (this.health <= 0) {\r\n\t\t\tthis.health = 0;\r\n\t\t\tthis.spawned = false;\r\n\t\t}\r\n\t\treturn this.health == 0;\r\n\t}",
"public void addWeapon(Weapon x){\n\t\tplayerWeapon=new Weapon(x);\n\t\tHealth+=x.gethealthStat();\n\t\tAttackForce+=x.getafStat();\n\t\tDefense+=x.getdefenseStat();\n\t}",
"public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }",
"void takeDamage(HeroDamage enemy1, HeroDamage enemy2);",
"public void damage(Hero other) {\n this.weapon.knockBack(other, this.state, this.dir);\n }",
"public void addWeapon(Pair<Byte,Short> weapon){\n //Total number of weapons player can carry is 5 (inc. default weapon)\n //If player has <3 weapons, simply add weapon.\n //Otherwise, first remove oldest weapon in inventory then add at that\n //position.\n //oldest weapon tracked by linked list of weapon entries.\n if(this.weapons.size() < 3) {\n this.weapons.add(weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n }else{\n //Checks for duplicates, if duplicate weapons\n //found, new weapons ammo is just added to the current\n //weapon already in inventory\n for(Pair<Byte,Short> w : this.weapons){\n if(Objects.equals(w.getKey(), weapon.getKey())){\n if(weaponEntryTracker.size() == 1){\n weaponEntryTracker = new LinkedList<>();\n }\n else{\n for(int tracker : weaponEntryTracker){\n if(tracker == this.weapons.indexOf(w)){\n weaponEntryTracker.remove((Integer) tracker);\n }\n }\n }\n Pair<Byte,Short> newWeapon = new Pair<>(weapon.getKey(), (short) (w.getValue()+weapon.getValue()));\n if(this.currentWeapon == w){\n this.setCurrentWeapon(newWeapon);\n }\n this.weapons.set(this.weapons.indexOf(w),newWeapon);\n weaponEntryTracker.add((byte) this.weapons.indexOf(newWeapon));\n return;\n }\n }\n //check for any no weapon entries - indicates\n //player dropped weapon.\n for(Pair<Byte,Short> w : this.weapons){\n if(w.getKey() == NO_WEAPON_ID){\n this.weapons.set(this.weapons.indexOf(w),weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n return;\n }\n }\n //If no null entries are found, remove oldest weapon\n int oldestWeapon = this.weaponEntryTracker.poll();\n byte oldestWeaponKey = this.weapons.get(oldestWeapon).getKey();\n this.weapons.set(oldestWeapon, weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n if(oldestWeaponKey == currentWeapon.getKey()){\n setCurrentWeapon(weapon);\n }\n\n }\n }",
"public Weapon(){\n \n name = \"Claw\"; // will be treated as a sword\n type = 'R';\n advType = 'G';\n disType = 'B';\n mt = 4;\n hit = 85;\n crit = 0;\n wt = 1;\n isMagic = true;\n \n }",
"public void fight(String enemy)\n\t{\n\t\tScanner kbAlpha = new Scanner(System.in);\n\t\t\n\t\tString strInput;\t\t\t\t\t\t//player input\n\t\tchar cAttack;\t\t\t\t\t\t\t//player input attack button\n\t\trandom = new Random();\n\t\t\n\t\tcAttack = 'x';\n\t\t\n\t\tif (strEquippedWeapon.equals(\"Dagger\"))\n\t\t{\n\t\t\tthis.iMaxDmg = 5; \t\t\t\t\t//exclusive\n\t\t\tthis.iMinDmg = 2;\t\t\t\t\t//inclusive\n\t\t}\n\t\telse if (strEquippedWeapon.equals(\"Steampunk 4-Barrel Pistol\"))\n\t\t{\n\t\t\tthis.iMaxDmg = 8; \t\t\t\t\t//exclusive\n\t\t\tthis.iMinDmg = 3;\t\t\t\t\t//inclusive\t\t\t\n\t\t}\n\t\telse if (strEquippedWeapon.equals(\"Steampunk Mach. II Riflesword\"))\n\t\t{\n\t\t\tthis.iMaxDmg = 16; \t\t\t\t\t//exclusive\n\t\t\tthis.iMinDmg = 6;\t\t\t\t\t//inclusive\n\t\t}\n\t\t\n\t\tif (enemy.equals(\"alien1\"))\n\t\t{\n\t\t\tthis.iAlienHP = 15;\n\t\t\tthis.iAlienMaxDmg = 3;\t\t\t\t//exclusive\n\t\t\tthis.iAlienMinDmg = 1;\t\t\t\t//inclusive\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if (this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.inventory.add(\"Steampunk 4-Barrel Pistol\");\n\t\t\t\t\tsetEquippedWeapon(\"Steampunk 4-Barrel Pistol\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \", but you have killed\"\n\t\t\t\t\t\t+ \" the alien!\\nThe alien dropped his \" +\n\t\t\t\t\t\t\"weapon! You pick it up an examine it. It looks like\\nit is a \" +\n\t\t\t\t\t\t\"Steampunk 4-Barrel Pistol. This might be a better option than \" +\n\t\t\t\t\t\t\"the\\n\" + getEquippedWeapon() + \". You equip it.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you have killed\"\n\t\t\t\t\t\t\t+ \" the alien!\\nThe alien dropped his \" +\n\t\t\t\t\t\t\t\"weapon! You pick it up an examine it. It looks like\\nit is a \" +\n\t\t\t\t\t\t\t\"Steampunk 4-Barrel Pistol. This might be a better option than \" +\n\t\t\t\t\t\t\t\"the\\n\" + getEquippedWeapon() + \". You equip it.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"alien2\"))\n\t\t{\n\t\t\tthis.iAlienHP = 18;\n\t\t\tthis.iAlienMaxDmg = 5;\t\t\t\t//exclusive\n\t\t\tthis.iAlienMinDmg = 1;\t\t\t\t//inclusive\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.iHP += 10;\n\t\t\t\t\tthis.inventory.add(\"Manhole Cover Shield\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damge, but you \" +\n\t\t\t\t\t\t\"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. \" +\n\t\t\t\t\t\t\"Fantastic!\\nSearching the alien's corpse, you find a Manhole Cover\"\n\t\t\t\t\t\t+ \" Shield! This will\\nprotect you from some damage.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \"\n\t\t\t\t\t\t\t+ \"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. \" +\n\t\t\t\t\t\t\t\"Fantastic!\\nSearching the alien's corpse, you find a Manhole Cover\"\n\t\t\t\t\t\t\t+ \" Shield! This will\\nprotect you from some damage.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"alien3\"))\n\t\t{\n\t\t\tif (evaluateInventory(\"Manhole Cover Shield\"))\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 22;\n\t\t\t\tthis.iAlienMaxDmg = 7;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 2;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 22;\n\t\t\t\tthis.iAlienMaxDmg = 9;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 3;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.iHP += 15;\n\t\t\t\t\tthis.inventory.add(\"Edison Grenade\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \" +\n\t\t\t\t\t\t\"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t+ \"you find a health pack that increases your health by 15. The \"\n\t\t\t\t\t\t+ \"alien also\\ndropped an Edison Grenade! It looks like a bulb but \"\n\t\t\t\t\t\t+ \"probably does more\\nthan light up a room!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \" +\n\t\t\t\t\t\t\t\"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t\t+ \"you find a health pack that increases your health by 15. The \"\n\t\t\t\t\t\t\t+ \"alien also\\ndropped an Edison Grenade! It looks like a bulb but \"\n\t\t\t\t\t\t\t+ \"probably does more\\nthan light up a room!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"alien4\"))\n\t\t{\n\t\t\tif(evaluateInventory(\"Manhole Cover Shield\"))\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 18;\n\t\t\t\tthis.iAlienMaxDmg = 6;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 1;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 18;\n\t\t\t\tthis.iAlienMaxDmg = 8;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 2;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.iHP += 10;\n\t\t\t\t\tthis.inventory.add(\"Steampunk Mach. II Riflesword\");\n\t\t\t\t\tsetEquippedWeapon(\"Steampunk Mach. II Riflesword\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you\"\n\t\t\t\t\t\t+ \" killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. The \"\n\t\t\t\t\t\t+ \"alien also\\ndropped a Steampunk Mach. II Riflesword! This weapon\"\n\t\t\t\t\t\t+ \" looks quite menacing.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you\"\n\t\t\t\t\t\t\t+ \" killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. The \"\n\t\t\t\t\t\t\t+ \"alien also\\ndropped a Steampunk Mach. II Riflesword! This weapon\"\n\t\t\t\t\t\t\t+ \" looks quite menacing.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"boss\"))\n\t\t{\n\t\t\tif(evaluateInventory(\"Manhole Cover Shield\"))\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 50;\n\t\t\t\tthis.iAlienMaxDmg = 10;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 2;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 50;\n\t\t\t\tthis.iAlienMaxDmg = 12;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 4;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\n\t\t\t\n\t\t\tif (evaluateInventory(\"Edison Grenade\"))\n\t\t\t{\n\t\t\t\tthis.inventory.remove(\"Edison Grenade\");\n\t\t\t\tthis.iAlienHP -= 20;\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You lob the Edison Grenade to start the battle and hide \"\n\t\t\t\t\t+ \"behind a cluster\\nof stalagmite. A few seconds later, the grenade\"\n\t\t\t\t\t+ \" explodes dealing 20\\ndamage to the boss alien!\\n\\nBoss Alien HP \" +\n\t\t\t\t\t\"left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You lob the Edison Grenade to start the battle and hide \"\n\t\t\t\t\t\t+ \"behind a cluster\\nof stalagmite. A few seconds later, the grenade\"\n\t\t\t\t\t\t+ \" explodes dealing 20 damage to the boss alien!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.inventory.add(\"Platinum Key\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \"\n\t\t\t\t\t\t+ \"have killed the boss alien! He drops the\\n\" +\n\t\t\t\t\t\t\"Platinum Key!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Pick up Platinum Key\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \"\n\t\t\t\t\t\t\t+ \"have killed the boss alien! He drops the\\n\" +\n\t\t\t\t\t\t\t\"Platinum Key!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Pick up Platinum Key\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nBoss Alien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nBoss Alien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"@RequiredObject(\"whetstone\")\n\tpublic Response whet(Entity actor) throws ActionException {\n\t\tfinal Weapon weapon = actor.contents().equipment().weapon().orElseThrow(() -> ActionException.of(\"whet.requires.weapon\"));\n\t\treturn whet(actor, weapon);\n\t}",
"public static Weapon spawnWeapon()\r\n\t{\r\n\t\tfinal int numberOfWeapons = 5; //update as weapons are added\r\n\t\t\r\n\t\t//Create weapons in order to access attributes / randomly select a weapon\r\n\t\tSword sword = new Sword();\r\n\t\tStick stick = new Stick();\r\n\t\tBazooka bazooka = new Bazooka();\r\n\t\tAtomicBomb atomicBomb = new AtomicBomb();\r\n\t\tPotatoCannon potatoCannon = new PotatoCannon();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tWeapon[] weapons = new Weapon[] {sword, stick,bazooka,atomicBomb,potatoCannon}; //store weapons in an array to randomly grab one to use in Game\r\n\t\t\r\n\t\tint randomWeapon; //weapon chosen\t\t\r\n\t\tRandom rng = new Random (); //create generator based upon current number of weapons\r\n\t\trandomWeapon = rng.nextInt(numberOfWeapons); //get a weapon object at random from array\r\n\r\n\t\treturn (weapons[randomWeapon]); //we have no need to create separate instance\r\n\t}",
"public static void genWeaponList() {\r\n int i;\r\n\r\n auxItemVector.clear();\r\n \r\n if(currentChar == null) return;\r\n\r\n for (i = 0; i < currentChar.getItemsNumber(); i++) {\r\n if(currentChar.getItem(i).getType() == weapon)\r\n auxItemVector.add(currentChar.getItem(i));\r\n }\r\n }",
"private void tryEquipItem() {\n if (fakePlayer.get().getHeldItem(EnumHand.MAIN_HAND).isEmpty()) {\n ItemStack unbreakingPickaxe = new ItemStack(Items.DIAMOND_PICKAXE, 1);\n unbreakingPickaxe.addEnchantment(Enchantments.EFFICIENCY, 3);\n unbreakingPickaxe.setTagCompound(new NBTTagCompound());\n unbreakingPickaxe.getTagCompound().setBoolean(\"Unbreakable\", true);\n fakePlayer.get().setItemStackToSlot(EntityEquipmentSlot.MAINHAND, unbreakingPickaxe);\n }\n }",
"private void useInventoryByAI() {\n\t\tChampion AI = currentTask.getCurrentChamp();\n\t\tArrayList<Collectible> inventory = ((Wizard)AI).getInventory();\n\t\tif(inventory.size()>0){\n\t\t\tint randomPotion = (int)(Math.random()*inventory.size());\n\t\t\tcurrentTask.usePotion((Potion)inventory.get(randomPotion));\n\t\t}\n\n\t\t\n\t}",
"public void getKilledProduct() \n {\n try{\n Player.getInstance().getInventory().add(new CowMeat());\n } catch (IllegalAccessException e) {\n //Do nothing\n }\n }",
"public void giveWeapon(Weapon weapon) throws RuntimeException {\n if (weaponList.size() > 2)\n throw new RuntimeException(\"This player can't receive any more weapons\");\n weaponList.add(weapon);\n }",
"public void makeHero()\r\n { \r\n maxHealth = 100;\r\n health = maxHealth;\r\n }",
"public interface WeaponBehavior {\n\n int useWeapon(int strong);\n\n int getDamageValue(int strong);\n}",
"public String getEquippedWeaponName() {\n return \"\";\n }",
"private void getWeaponItem(double x, double y, String option,\r\n\t\t\tBufferedImage itemimage, SpriteGroup items) {\r\n\t\tint weaponoption = Resources.getInt(option);\r\n\t\tItem newGun = new WeaponItem(player, new Sprite(itemimage),\r\n\t\t\t\tweaponoption, x, y);\r\n\t\titems.add(newGun);\r\n\t\tnewGun.setActive(true);\r\n\t}",
"private void addEnemySheild() {\n this.enemyShield += 1;\n }",
"private Card murderWeapon(UI ui, Player currentPlayer) {\n CardPanel cardPanel = new CardPanel(ui.getBoard(), ui.getCmd(), \"weapons\");\n ui.getLayers().add(cardPanel, Integer.valueOf(6));\n cardPanel.showPanel();\n ui.getInfo().addText(\"Enter the weapon you think \" + murderer.getName() + \" killed Gunther in \" + location.getName() + \". Listed Below\"); // prompt\n\n // display all the characters to the player that they can select\n for (int i = 0; i < WEAPON_NAMES.length; i++) {\n ui.getInfo().addText(WEAPON_NAMES[i].toString().substring(0,1) + WEAPON_NAMES[i].toString().substring(1).toLowerCase());\n }\n\n WeaponTypes murderWeapon = null;\n String weapon;\n\n // check the input from the user whether it is a weapon, help command, notes command or the wrong input\n do {\n weapon = ui.getCmd().getCommand().toLowerCase();\n switch (weapon) {\n case \"rope\":\n murderWeapon = WeaponTypes.ROPE;\n break;\n case \"dagger\":\n murderWeapon = WeaponTypes.DAGGER;\n break;\n case \"wrench\":\n murderWeapon = WeaponTypes.WRENCH;\n break;\n case \"pistol\":\n murderWeapon = WeaponTypes.PISTOL;\n break;\n case \"candlestick\":\n murderWeapon = WeaponTypes.CANDLESTICK;\n break;\n case \"pipe\":\n murderWeapon = WeaponTypes.PIPE;\n break;\n case \"notes\":\n currentPlayer.getPlayerNotes().showNotes(currentPlayer);\n break;\n case \"help\":\n ui.getInfo().addText(\"Select a weapon from the list above for the questioning!\");\n break;\n default:\n ui.getInfo().addText(\"That was an invalid entry, enter a weapon from the list above for the questioning!\");\n break;\n }\n } while (murderWeapon == null); // while the player input was not a weapon\n\n cardPanel.removePanel();\n ui.getLayers().remove(cardPanel);\n return new Card(murderWeapon.toString()); // return a card with the murder weapon selected by the user\n }",
"public void pickUp(Item item) {\n this.curItem = item;\n this.curItem.setNonDamagablePlayer(this);\n if (item instanceof PickupableWeaponHolder) {\n this.weapon = ((PickupableWeaponHolder)(item)).getWeapon();\n }\n }",
"public void addWeapon(Weapon weapon) {\n setAttack(getAttack() + weapon.getDamage());\n setWeaponSlots(getWeaponSlots() - 1);\n }",
"private void functionalInterface1() {\n\t\tcharmander.heal();\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\n\t\tguilherme.powerUp(charmander, new BigDecimal(\"-10\"), psMinimalDamage); // -10\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\n\t\tguilherme.powerUp(charmander, new BigDecimal(\"-10\"), psHugeDamage); // -20\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\t}",
"private void createWeapons()\n {\n woodSword = new Weapon(\"wood sword\", \" | does 12 damage\", 10, true); \n rustedSword = new Weapon(\"rusted sword\", \" | does 17 damage\", 15, true);\n silverSword = new Weapon(\"silver sword\", \" | does 32 damage\", 30, true);\n goldSword = new Weapon(\"gold sword\", \" | does 22 damage\", 20, true);\n titaniumSword = new Weapon(\"titanium sword\", \" | does 52 damage\", 50, true);\n silverSpear = new Weapon(\"silver spear\", \" | does 25 damage\", 23, true);\n infantryBow = new Weapon(\"infantry bow\", \" | does 30 damage\", 28, true);\n }",
"void fire(WarParticipant target, WarParticipant attacker, int noOfShooters);",
"public short getSiegeWeaponDamage();",
"@Test\n void equipWeaponTest() {\n\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(axeTest);\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(swordTest);\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(bowTest);\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(knifeTest);\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(staffTest);\n assertEquals(characterEquipWeaponTest.getEquippedWeapon(), staffTest);\n\n characterEquipWeaponTest0.equipWeapon(staffTest);\n assertNull(characterEquipWeaponTest0.getEquippedWeapon());\n\n }",
"public String getWeapon() {\n return weapon1;\n }",
"public int healHero(int i) {\n int heal;\n switch (i) {\n case 1:\n heal = rand.nextInt(4) + 1;\n HP.replenish(heal);\n return heal;\n case 2:\n heal = rand.nextInt(5) + 2;\n HP.replenish(heal);\n return heal;\n case 3:\n heal = rand.nextInt(6) + 3;\n HP.replenish(heal);\n return heal;\n case 4:\n heal = rand.nextInt(9) + 5;\n HP.replenish(heal);\n return heal;\n case 5: // healing hero to full\n HP.replenish(100);\n default:\n return 0;\n }\n }",
"private static int playerTotalAttack(String [] weaponEquip, int playerAttack, int strength){\r\n int totalAttack = 0;\r\n int shortSwordAttack;\r\n int greatSwordAttack;\r\n int longSwordAttack;\r\n int hongerAttack;\r\n shortSword ShortSword = new shortSword();\r\n longSword LongSword = new longSword();\r\n greatSword GreatSword = new greatSword();\r\n heavenSmitingDevilSlayerSword Honger = new heavenSmitingDevilSlayerSword();\r\n switch(weaponEquip[0]){\r\n case \"Short Sword\":\r\n shortSwordAttack = ShortSword.getAttack();\r\n totalAttack = playerAttack + strength + shortSwordAttack;\r\n break;\r\n case \"Long Sword\":\r\n longSwordAttack = LongSword.getAttack();\r\n totalAttack = playerAttack + strength + longSwordAttack;\r\n break;\r\n case \"Great Sword\":\r\n greatSwordAttack = GreatSword.getAttack();\r\n totalAttack = playerAttack + strength + greatSwordAttack;\r\n break;\r\n case \"Heaven Smiting Devil Slayer Sword\":\r\n hongerAttack = Honger.getAttack();\r\n totalAttack = playerAttack + strength + hongerAttack;\r\n break;\r\n default:\r\n totalAttack = playerAttack + strength;\r\n break;\r\n }\r\n return totalAttack;\r\n }",
"@Override\n public boolean equipped() {\n\treturn this.equipped;\n }",
"public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}",
"public boolean deployWeapon(int x, int y, Player opponent, Map attacked_map, Map current_player_map, Player current_player, int method_choice) {\n Ship temp_ship = new Minesweeper();\n //Catches if current player is trying to use a bomb on an underwater map or space map, returns false for not successful\n if (current_player.player_weapons.contains(this) && (attacked_map.getName().equals(\"UnderwaterMap\") || attacked_map.getName().equals(\"SpaceMap\"))) {\n bombOutputs(method_choice, 1, attacked_map, temp_ship, x, y);\n return false;\n }\n\n //Checks if coordinate is in bounds\n if (x > 10 || x < 0 || y > 10 || y < 0) {\n bombOutputs(method_choice, 2, attacked_map, temp_ship, x, y);\n return false;\n }\n\n int is_occupied = attacked_map.defensiveGrid.checkCellStatus(x,y);\n\n //Checks if there is a ship at the attacked location: 0 = no ship, 1 = ship exists, 2 = ship exists and already hit\n if (is_occupied == 0) {\n //no ship: miss!\n bombOutputs(method_choice, 3, attacked_map, temp_ship, x, y);\n\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(1, x, y);\n }\n } else if (is_occupied == 1) {\n //ship there: first time attacking!\n Ship attacked_ship = new Minesweeper();\n\n for (int i = 0; i < attacked_map.existing_ships.size(); i++){\n Ship shipy = attacked_map.existing_ships.get(i);\n ArrayList<Coordinate> coordsList = attacked_map.ship_coordinates.get(shipy);\n for (Coordinate coordinate : coordsList) {\n if (coordinate.x == x && coordinate.y == y) {\n attacked_ship = shipy;\n break;\n }\n }\n }\n\n //Check if captain's quarters at location\n Coordinate capt_quart = attacked_map.captains_quarters.get(attacked_ship);\n if (capt_quart.x == x && capt_quart.y == y) {\n //Check for armoured captain's quarters\n if (attacked_ship instanceof ArmoredShip) {\n //Armoured!\n //Armoured captains quarters hasn't been hit before\n if (((ArmoredShip) attacked_ship).getHitCount() == 0) {\n //Prints out a miss - some sneaky captain's quarters here\n bombOutputs(method_choice, 4, attacked_map, attacked_ship, x, y);\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(1, x, y);\n }\n ((ArmoredShip) attacked_ship).updateHitCount();\n }\n //Armoured captains quarters has been hit before\n else if (((ArmoredShip) attacked_ship).getHitCount() == 1){\n //Destroys entire ship!\n bombOutputs(method_choice, 5, attacked_map, attacked_ship, x, y);\n bombOutputs(method_choice, 6, attacked_map, attacked_ship, x, y);\n\n attacked_map.sinkShip(attacked_ship);\n\n if (method_choice == 2 || method_choice == 3) {\n current_player.incrementShipSunkCount();\n current_player.hasSunkFirstShip();\n }\n\n attacked_map.ship_health.replace(attacked_ship, 0);\n ArrayList<Coordinate> coordsList = attacked_map.ship_coordinates.get(attacked_ship);\n for (Coordinate coordinate : coordsList) {\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n attacked_map.defensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n ((ArmoredShip) attacked_ship).updateHitCount();\n }\n }\n //Hit a captain's quarters but not armoured\n else {\n //Destroy the ship!\n bombOutputs(method_choice, 7, attacked_map, attacked_ship, x, y);\n attacked_map.sinkShip(attacked_ship);\n if (method_choice == 2 || method_choice == 3) {\n current_player.incrementShipSunkCount();\n current_player.hasSunkFirstShip();\n }\n\n attacked_map.ship_health.replace(attacked_ship, 0);\n ArrayList<Coordinate> coordsList = attacked_map.ship_coordinates.get(attacked_ship);\n for (Coordinate coordinate : coordsList) {\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n attacked_map.defensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n }\n }\n //Not a captain's quarters there\n else {\n //Attack and hit!\n int current_health = attacked_map.ship_health.get(attacked_ship);\n current_health -= 1;\n attacked_map.ship_health.replace(attacked_ship, current_health);\n\n bombOutputs(method_choice, 8, attacked_map, temp_ship, x, y);\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(2, x, y);\n }\n attacked_map.defensiveGrid.setCellStatus(2, x, y);\n }\n } else if (method_choice == 2 || method_choice == 3) {\n //Already attacked, already hit a ship!\n bombOutputs(method_choice, 9, attacked_map, temp_ship, x, y);\n }\n\n return true;\n }",
"void evadeAttack(IUnit attacker, int incomingDamage);",
"@Override\n\tpublic int use() {\n\t\treturn Game.getInstance().getPlayer().equip(this);\n\t}",
"public int getEquippedWeaponDamage() {\n return 0;\n }",
"public Sheep()\n {\n super(\"Sheep\",3,2,0); \n \n // tagline = \"Whatever\";\n maxHealth = 5;\n currentHealth = maxHealth;\n equip(new Cloth());\n equip(new SheepClaws());\n \n \n \n engaged = false;\n aggression = 1;\n special = 0;\n hostileRange = 2;\n }",
"public void attack(String spell, character opponent){\n Random rand = new Random();\n int prob;\n String attack;\n \n prob = rand.nextInt(2); //we need two random numbers to allow us to use the two attacks:\n if(prob==0){\n attack = \"punch\";\n opponent.setHealth(opponent.getHealth() - 10);\n System.out.println(getName() + \" has landed \" + attack);\n System.out.println(opponent.getName() + \" health now \" + opponent.getHealth());\n }\n \n else if(prob==1){\n attack = \"kick\";\n opponent.setHealth(opponent.getHealth() - 15);\n System.out.println(getName() + \" has landed \" + attack);\n System.out.println(opponent.getName() + \" health now \" + opponent.getHealth());\n }\n \n \n }",
"public static void addSpecialBar(Player player, int weapon) {\n\t\tif (player.getTank()) {\n\t\t\tplayer.setSpecialAttackAmount(10.0, false);\n\t\t}\n\n\t\tif (GameType.isPreEoc()) {\n\t\t\tif (weapon == 11696 || weapon == 11698 || weapon == 11700) { //godswords except ags\n\t\t\t\tplayer.getPA().sendFrame171(0, 7699);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7711);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (weapon == 13902) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 7474);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7486);\n\t\t\t\treturn;\n\t\t\t} else\n\t\t\tif (weapon == 19780) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 7699);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7711);\n\t\t\t\treturn;\n\t\t\t} else if (weapon == 21371) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 12323);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 12335);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (GameType.isOsrs() && Misc.arrayHasNumber(ServerConstants.ARMADYL_GODSWORDS_OSRS, weapon, 0) || GameType.isPreEoc() && weapon == 11694) {\n\t\t\tplayer.getPA().sendFrame171(0, 7699);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7711);\n\t\t\treturn;\n\t\t}\n\t\tif (Combat.hasAbyssalTentacle(player, weapon)) {\n\t\t\tplayer.getPA().sendFrame171(0, 12323);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 12335);\n\t\t\treturn;\n\t\t}\n\t\tif (ItemAssistant.getItemName(weapon).equals(\"Dragon claws\")) {\n\t\t\tplayer.getPA().sendFrame171(0, 7800);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7812);\n\t\t\treturn;\n\t\t}\n\n\t\tif (ItemAssistant.getItemName(weapon).contains(\"Granite maul\")) {\n\t\t\tplayer.getPA().sendFrame171(0, 7474);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7486);\n\t\t\treturn;\n\t\t}\n\n\t\t// Dragon crossbow\n\t\tif (weapon == 21902 && ServerConfiguration.DEBUG_MODE) {\n\t\t\tplayer.getPA().sendFrame171(0, 7549);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7561);\n\t\t\treturn;\n\t\t}\n\n\t\tif (GameType.isOsrs()) {\n\n\t\t\tString itemName = ItemAssistant.getItemName(weapon);\n\t\t\tif (itemName.equals(\"Heavy ballista\") || itemName.equals(\"Light ballista\")) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 7549);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7561);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (itemName.equals(\"Armadyl crossbow\")) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 7549);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7561);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tswitch (weapon) {\n\n\n\t\t\tcase 4151: // Abyssal whip\n\t\t\tcase 12773: // Volcanic abyssal whip\n\t\t\tcase 12774: // Frozen abyssal whip\n\t\t\tcase 15_441:\n\t\t\tcase 15_442:\n\t\t\tcase 15_443:\n\t\t\tcase 15_444:\n\t\t\t\tplayer.getPA().sendFrame171(0, 12323);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 12335);\n\t\t\t\tbreak;\n\t\t\tcase 859:\n\t\t\t\t// Magic bows\n\t\t\tcase 861:\n\t\t\tcase 12788: // Magic shortbow (i).\n\t\t\tcase 11235:\n\t\t\tcase 12765:\n\t\t\tcase 12766:\n\t\t\tcase 12767:\n\t\t\tcase 12768:\n\t\t\tcase 13879:\n\t\t\tcase 13883:\n\t\t\tcase 15241 : // Hand cannon\n\t\t\tcase 20849: // Dragon thrown axe\n\t\t\tcase 22634: // Morrigan's throwing axe osrs\n\t\t\tcase 22636: // Morrigan's javelin osrs\n\t\t\t\tplayer.getPA().sendFrame171(0, 7549);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7561);\n\t\t\t\tbreak;\n\n\t\t\tcase 22622: // Statius's warhammer osrs\n\t\t\t\tplayer.getPA().sendFrame171(0, 7474);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7486);\n\t\t\t\tbreak;\n\t\t\tcase 4587:\n\t\t\tcase 13899:\n\t\t\tcase 13901:\n\t\t\tcase 20000:\n\t\t\tcase 1305: // Dragon longsword\n\t\t\tcase 12904: // Toxic staff of the dead\n\t\t\tcase 16209: // Toxic staff of the dead\n\t\t\tcase 11791: // Staff of the dead\n\t\t\tcase 16272: // Toxic staff of the dead\n\t\t\tcase 22296: // Staff of light\n\t\t\tcase 15486:\n\t\t\tcase 22613: // Vesta's longsword osrs\n\t\t\t\tplayer.getPA().sendFrame171(0, 7599);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7611);\n\t\t\t\tbreak;\n\t\t\tcase 11802:\n\t\t\tcase 11806:\n\t\t\tcase 11808:\n\t\t\tcase 11804:\n\t\t\tcase 20368: // Ags\n\t\t\tcase 20374: // Zgs\n\t\t\tcase 20372: // Sgs\n\t\t\tcase 20370: // Bgs\n\t\t\tcase 11838:\n\t\t\tcase 12808: // Sara's blessed sword.\n\t\t\t\tplayer.getPA().sendFrame171(0, 7699);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7711);\n\t\t\t\tbreak;\n\t\t\tcase 3204:\n\t\t\t\t// d hally\n\t\t\t\tplayer.getPA().sendFrame171(0, 8493);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 8505);\n\t\t\t\tbreak;\n\t\t\tcase 1377:\n\t\t\t\t// d battleaxe\n\t\t\t\tplayer.getPA().sendFrame171(0, 7499);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7511);\n\t\t\t\tbreak;\n\n\t\t\tcase 12848:\n\t\t\tcase 13576:\n\t\t\tcase 21015: // Dinh's bulwark\n\t\t\tcase 16259:\n\t\t\t\tplayer.getPA().sendFrame171(0, 7474);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7486);\n\t\t\t\tbreak;\n\t\t\tcase 1249:\n\t\t\tcase 11824:\n\t\t\t\t// dspear //zammy spear\n\t\t\tcase 13905:\n\t\t\tcase 13907:\n\t\t\tcase 11889: // Zamorakian hasta\n\t\t\tcase 22610: // Vesta's spear osrs\n\t\t\t\tplayer.getPA().sendFrame171(0, 7674);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7686);\n\t\t\t\tbreak;\n\n\t\t\tcase 12926: // Toxic blowpipe.\n\t\t\t\tplayer.getPA().sendFrame171(0, 7649);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7661);\n\t\t\t\tbreak;\n\n\t\t\tcase 1215:\n\t\t\t\t// dragon dagger\n\t\t\tcase 1231:\n\t\t\tcase 5680:\n\t\t\tcase 5698:\n\t\t\tcase 13271: // Abyssal dagger.\n\t\t\tcase 21009: // Dragon sword\n\t\t\t\tplayer.getPA().sendFrame171(0, 7574);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7586);\n\t\t\t\tbreak;\n\t\t\tcase 1434:\n\t\t\tcase 10887:\n\t\t\t\t// dragon mace\n\t\t\tcase 11061: // Ancient mace\n\t\t\t\tplayer.getPA().sendFrame171(0, 7624);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7636);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tplayer.getPA().sendFrame171(1, 7649);\n\t\t\t\tplayer.getPA().sendFrame171(1, 7674);\n\t\t\t\tplayer.getPA().sendFrame171(1, 7800);\n\t\t\t\tplayer.getPA().sendFrame171(1, 7624); // mace interface\n\t\t\t\tplayer.getPA().sendFrame171(1, 7474); // hammer, gmaul\n\t\t\t\tplayer.getPA().sendFrame171(1, 7499); // axe\n\t\t\t\tplayer.getPA().sendFrame171(1, 7549); // bow interface\n\t\t\t\tplayer.getPA().sendFrame171(1, 7574); // sword interface\n\t\t\t\tplayer.getPA().sendFrame171(1, 7599); // scimmy sword interface, for most swords.\n\t\t\t\tplayer.getPA().sendFrame171(1, 7699); // scimmy sword interface, for most swords.\n\t\t\t\tplayer.getPA().sendFrame171(1, 8493);\n\t\t\t\tplayer.getPA().sendFrame171(1, 12323); // whip interface\n\n\t\t\t\tshowCombatInterface(player, weapon);\n\t\t\t\tbreak;\n\t\t}\n\t}",
"@Override\n\tpublic int buy(Weapon item) {\n\t\treturn 0;\n\t}",
"public WeaponComponent() {\n weaponName = \"none\";\n owned = false;\n damagePower = 1;\n }",
"@Override\n public void useWeapon(ResponseInput responseMessage)\n {\n basicMode(((ResponseRocketLauncher) responseMessage).getTargetPlayerBasicMode(), ((ResponseRocketLauncher) responseMessage).getTargetSquareCoordinatesAsStringPlayerToMove(), ((ResponseRocketLauncher) responseMessage).getTargetSquareCoordinatesAsStringTargetToMove(), ((ResponseRocketLauncher) responseMessage).isWithFragWarhead() ) ;\n }",
"public void Skill() {\n\t\tBuilding ig = new Iglu(this.GetWater());\n\t\tthis.GetWater().GetBuilding().ReplaceBuilding(ig);\n\t}",
"public void selectWeapon( final int weaponIndex ) throws RemoteException {\r\n if ( weaponIndex < weapons.length ) {\r\n playerState.weaponIndex = weaponIndex;\r\n playerState.weapon = weapons[ playerState.weaponIndex ];\r\n }\r\n }",
"private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}",
"public static void showCombatInterface(Player player, int weapon) {\n\t\tString itemName = ItemAssistant.getItemName(weapon);\n\t\tfor (int i = 0; i < unarmedItemNames.length; i++) {\n\t\t\tif (itemName.toLowerCase().equals(unarmedItemNames[i])) {\n\t\t\t\tplayer.playerAssistant.setSidebarInterface(0, 5855); // punch, kick, block\n\t\t\t\tplayer.getPA().sendFrame126(itemName, 5857);\n\t\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\t\tCombatInterface.updateClickedCombatStyle(player);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tboolean doNotChange = false;\n\t\tif ((GameType.isPreEoc() && weapon == 19780)) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4705);\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4708);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"whip\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"abyssal tentacle\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 12290); // flick, lash, deflect\n\t\t\tplayer.getPA().sendFrame246(12291, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 12293);\n\t\t\treAdjustCombatStyle(player, \"AGGRESSIVE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"chinchompa\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 27500); // first param\n\t\t\tplayer.getPA().sendFrame126(itemName, 27503); // first param + 2\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"dagger\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2276); // stab, lunge, slash, block\n\t\t\tplayer.getPA().sendFrame246(2277, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2279);\n\t\t}\n\t\telse if (itemName.toLowerCase().contains(\"bow\") || itemName.toLowerCase().contains(\"ballista\") || itemName.toLowerCase().contains(\"cannon\") || itemName.toLowerCase().contains(\"javelin\") || itemName.toLowerCase().contains(\"throwing\") || itemName.toLowerCase().contains(\"dragon thrownaxe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 1764); // accurate, rapid, longrange\n\t\t\tplayer.getPA().sendFrame246(1765, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 1767);\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t} else if (!itemName.toLowerCase().contains(\"saradomin sword\") && !itemName.toLowerCase().contains(\"blessed sword\") && !itemName.toLowerCase().contains(\"2h\") && (\n\t\t\t\titemName.toLowerCase().contains(\"rapier\") || itemName.toLowerCase().contains(\"sword\") && !itemName.toLowerCase().contains(\"godsword\") && !itemName.toLowerCase()\n\t\t\t\t .contains(\n\t\t\t\t\t\t \"longsword\"))\n\t\t\t\t|| itemName.toLowerCase().contains(\"toktz-xil-ek\") || itemName.toLowerCase().contains(\"toktz-xil-ak\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2276); // stab, lunge, slash, block\n\t\t\tplayer.getPA().sendFrame246(2277, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2279);\n\t\t} else if (itemName.toLowerCase().contains(\"staff\") || itemName.toLowerCase().contains(\"wand\") || itemName.toLowerCase().contains(\"staff of light\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"trident\") || itemName.toLowerCase().contains(\"thammaron's sceptre\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 328); // bash, pound, focus.\n\t\t\tplayer.getPA().sendFrame246(329, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 331);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t}\n\t\telse if (itemName.toLowerCase().contains(\"dart\") || itemName.toLowerCase().contains(\"knife\") || itemName.toLowerCase().contains(\"blowpipe\") || itemName.toLowerCase()\n\t\t .contains(\n\t\t\t\t \"toktz-xil-ul\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4446); // accurate, rapid, longrange\n\t\t\tplayer.getPA().sendFrame246(4447, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4449);\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t} else if (itemName.toLowerCase().contains(\"pickaxe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 5570); // spike, impale, smash, block\n\t\t\tplayer.getPA().sendFrame246(5571, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 5573);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"axe\") || itemName.toLowerCase().contains(\"hatchet\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 1698); // chop, hack, smash, block\n\t\t\tplayer.getPA().sendFrame246(1699, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 1701);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"claws\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 7762);\n\t\t\tplayer.getPA().sendFrame246(7763, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 7765);\n\t\t} else if (itemName.toLowerCase().contains(\"halberd\") || itemName.toLowerCase().contains(\"scythe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 8460); // jab, swipe, fend\n\t\t\tplayer.getPA().sendFrame246(8461, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 8463);\n\t\t\treAdjustCombatStyle(player, \"ACCURATE\", ServerConstants.AGGRESSIVE);\n\t\t} else if (itemName.toLowerCase().contains(\"spear\") || itemName.toLowerCase().contains(\"hasta\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4679); // lunge, swipe, pound, block\n\t\t\tplayer.getPA().sendFrame246(4680, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4682);\n\t\t\treAdjustCombatStyle(player, \"AGGRESSIVE ACCURATE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"mace\") || itemName.toLowerCase().contains(\"barrelchest\") || itemName.toLowerCase().contains(\"flail\") || itemName.toLowerCase()\n\t\t .contains(\n\t\t\t\t \"cane\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 3796);\n\t\t\tplayer.getPA().sendFrame246(3797, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 3799);\n\t\t} else if (itemName.toLowerCase().contains(\"maul\") || itemName.toLowerCase().contains(\"hammer\") || itemName.toLowerCase().contains(\"tzhaar-ket-om\")\n\t\t || itemName.toLowerCase().contains(\"dinh's\") || itemName.contains(\"spade\") || itemName.contains(\"club\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 425); // war hamer equip.\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 428);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"godsword\") || itemName.toLowerCase().contains(\"2h\") || itemName.toLowerCase().contains(\"saradomin sword\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"sara's blessed sword\")\n\t\t\t\t|| (GameType.isPreEoc() && weapon == 19780)) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4705); // Godsword.\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4708);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2423); // chop, slash, lunge, block\n\t\t\tplayer.getPA().sendFrame246(2424, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2426);\n\t\t}\n\t\tswitch (weapon) {\n\t\t\tcase 20779:\n\t\t\t\tplayer.playerAssistant.setSidebarInterface(0, 425); // war hamer equip.\n\t\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\t\tplayer.getPA().sendFrame126(itemName, 428);\n\t\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\t\tdoNotChange = true;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Whip is the only main weapon where the aggressive option is controlled, so make it easier by if i use whip and switch to another weapon, it puts the other weapon\n\t\t//on aggressive instead of longrange/lunge.\n\t\tif (player.wasWearingAggressiveSharedXpWeapon && !doNotChange) {\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t}\n\t\tplayer.wasWearingAggressiveSharedXpWeapon = false;\n\t\tCombatInterface.updateClickedCombatStyle(player);\n\t}",
"private void functionalInterface2() {\n\t\tPokedex.printData(Arrays.asList(charmander));\n\n\t\tguilherme.powerUp(charmander, new BigDecimal(\"-10\"), psRestoreHp // 100\n\t\t\t\t.and(psMinimalDamage) // -10\n\t\t\t\t.and(psIncreaseHp) // +25\n\t\t\t\t.and(psMinimalDamage) // -10\n\t\t\t\t.and(psHugeDamage) // -20\n\t\t);\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\t}",
"private void itemIntersectsPlayer(Entity item){\n WeaponComponent weaponComponent = player.weaponComponent;\n HealthComponent healthComponent = (HealthComponent) player.getComponent(ComponentType.HEALTH);\n\n EntityType type = item.getEntityType();\n\n\n switch (type){\n\n case ASSAULT_RIFLE:\n AssaultRifle rifle = (AssaultRifle) item;\n rifle.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(rifle);\n break;\n\n case SHOTGUN:\n Shotgun shotgun = (Shotgun) item;\n shotgun.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(shotgun);\n break;\n\n case SWORD:\n Sword sword = (Sword) item;\n sword.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(sword);\n break;\n\n\n case SHIELD:\n Shield shield = (Shield) item;\n shield.setInInventory(true);\n healthComponent.setHasShield(true);\n room.getEntityManager().removeEntity(shield);\n break;\n\n case SPEEDBOOST:\n SpeedBoost speedBoost = (SpeedBoost) item;\n speedBoost.setInInventory(true);\n player.startBoost(10000);\n room.getEntityManager().removeEntity(speedBoost);\n break;\n\n case HEART:\n Heart heart = (Heart) item;\n heart.setInInventory(true);\n healthComponent.incrementCurrentHealth();\n //do player logic here\n room.getEntityManager().removeEntity(heart);\n break;\n\n\n }\n\n\n }",
"@RequiredObject(\"whetstone\")\n\tpublic Response whet(Entity actor, @Carried Weapon weapon) throws ActionException {\n\t\t// Check can be whetted\n\t\tif(!weapon.descriptor().damage().type().isWhetWeapon()) throw ActionException.of(\"whet.invalid.weapon\");\n\t\tif(!weapon.isDamaged()) throw ActionException.of(\"whet.not.damaged\");\n\n\t\t// Create stamina modifier\n\t\t// TODO - tx can only be used once!\n\t\tfinal Transaction transaction = actor.model().values().transaction(EntityValue.STAMINA, 1, \"whet.exhausted\");\n\t\ttransaction.check();\n\n\t\t// Create repeating whet induction\n\t\tfinal Induction induction = () -> {\n\t\t\t// Consume stamina\n\t\t\ttransaction.check();\n\t\t\ttransaction.complete();\n\n\t\t\t// Stop when fully whetted\n\t\t\tweapon.repair(1);\n\t\t\tif(!weapon.isDamaged()) throw ActionException.of(\"whet.finished\");\n\n\t\t\treturn Response.EMPTY;\n\t\t};\n\n\t\t// Build response\n\t\tfinal Induction.Descriptor descriptor = new Induction.Descriptor.Builder()\n\t\t\t.period(duration)\n\t\t\t.flag(Induction.Flag.SPINNER)\n\t\t\t.flag(Induction.Flag.REPEATING)\n\t\t\t.build();\n\t\treturn Response.of(new Induction.Instance(descriptor, induction));\n\t}",
"void hit(GameObject o){\r\n\t\tif (!shield){ // if sheild is on all hits do nothing\r\n\t\t\tif (!(o instanceof UpPower)){ // if didnt hit a power up the ship loses a life\r\n\t\t\t\tif (lives > 1) {\r\n\t\t\t\t\tlives--;\r\n\t\t\t\t\treset();\r\n\t\t\t\t}\r\n\t\t\t\telse { // once there is no life left the ship dies\r\n\t\t\t\t\tdead = true;\r\n\t\t\t\t\tlives--;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}",
"@Override\n public void use(AbstractPlayer p, AbstractMonster m) {\n //give player plated armor\n AbstractDungeon.actionManager.addToBottom( // 2.Gain plated armor\n new com.megacrit.cardcrawl.actions.common.ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player,\n new com.megacrit.cardcrawl.powers.PlatedArmorPower(AbstractDungeon.player, 3), 3));\n }",
"private void makeRobot(int lvl)\r\n {\r\n maxHealth = lvl*10;\r\n health = maxHealth;\r\n \r\n Equip tempWeapon = null;\r\n Equip tempArmor = null;\r\n if (type == SOLDIER)\r\n {\r\n tempWeapon = new Equip(\"rifle\", Equip.WEAPON, lvl*5);\r\n tempArmor = new Equip(\"leather armor\", Equip.ARMOR, lvl*2);\r\n }\r\n else if (type == ELF)\r\n {\r\n tempWeapon = new Equip(\"bow\", Equip.WEAPON, lvl*5);\r\n tempArmor = new Equip(\"magic armor\", Equip.ARMOR, lvl*2);\r\n }\r\n else if (type == KNIGHT)\r\n {\r\n tempWeapon = new Equip(\"sword\", Equip.WEAPON, lvl*5);\r\n tempArmor = new Equip(\"splendid shield\", Equip.ARMOR, lvl*2);\r\n }\r\n else if (type == MAGICIAN)\r\n {\r\n tempWeapon = new Equip(\"magic\", Equip.WEAPON, lvl*5);\r\n tempArmor = new Equip(\"magic armor\", Equip.ARMOR, lvl*2);\r\n }\r\n else\r\n {\r\n tempWeapon = new Equip(\"broom stick\", Equip.WEAPON, lvl*5);\r\n tempArmor = new Equip(\"straw\", Equip.ARMOR, lvl*2);\r\n }\r\n tempWeapon.changeOwner(this);\r\n tempArmor.changeOwner(this);\r\n tempWeapon.equipTo(this);\r\n tempArmor.equipTo(this);\r\n }",
"@Override\n public void applyItem() {\n Player player;\n if (Battle.getRunningBattle().getTurn() % 2 == 1)\n player = Battle.getRunningBattle().getPlayer2();\n else\n player = Battle.getRunningBattle().getPlayer1();\n\n if (player.getInGameCards().size() == 0)\n return;\n Random random = new Random();\n int randomIndex = random.nextInt(player.getInGameCards().size());\n while (!(getPlayer().getInGameCards().get(randomIndex) instanceof Warrior)) {\n randomIndex = random.nextInt(getPlayer().getInGameCards().size());\n }\n\n Buff buff = new PoisonBuff(1, true);\n buff.setWarrior((Warrior) player.getInGameCards().get(randomIndex));\n Battle.getRunningBattle().getPassiveBuffs().add(buff);\n }",
"@Override\r\n\tpublic void uniqueOnStartInteraction() {\n\t\tif (Main.clientPlayer.getNumWood() < cost) {\r\n\t\t\tMain.clientPlayer.stopInteraction();\r\n\t\t}\r\n\r\n\t}",
"@Override\n\tpublic void addEquipment(Weapon w) {\n\t\tif (nbWeapons() > 0)\n\t\t\tthrow new BreakingRuleException();\n\t\tsuper.addEquipment(w);\n\t}",
"public IntrinsicWeapon getIntrinsicWeapon() {\r\n\t\treturn new IntrinsicWeapon(10, \"bombard\");\r\n\t}",
"public void addWeapon(CardWeapon cw)\n {\n this.weapons.add(cw);\n }",
"private void setWeapons()\n {\n sewers.setWeapon(woodSword);\n promenade.setWeapon(woodSword);\n depths.setWeapon(rustedSword);\n forest.setWeapon(goldSword);\n bridge.setWeapon(silverSpear);\n ramparts.setWeapon(infantryBow);\n }",
"public void allocateWeapons() {\n Collections.shuffle(this.getWeaponPieces());\n List<Room> rooms = this.board.getRooms();\n Collections.shuffle(rooms);\n int roomIndex = 0;\n for (WeaponPiece weapon : this.getWeaponPieces()) {\n Room room = rooms.get(roomIndex);\n if (room.getWeaponPiece() == null) {\n room.setWeaponPiece(weapon);\n roomIndex += 1;\n }\n }\n }",
"public String equipItem(String itemName) {\r\n\t\t\tif(this.getPlayer().getItem(itemName) == null) {\r\n\t\t\t\treturn \"You do not have this item in your inventory.\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tswitch (this.getPlayer().getItem(itemName).getClassName()) {\r\n\t\t\t\t\tcase \"game.BodyArmor\":\r\n\t\t\t\t\t\tthis.getPlayer().switchBodyArmor(itemName);\t\t\t\t\t\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"game.Headgear\":\r\n\t\t\t\t\t\tthis.getPlayer().switchHeadgear(itemName);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"game.Gloves\":\r\n\t\t\t\t\t\tthis.getPlayer().switchGloves(itemName);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"game.Boots\":\r\n\t\t\t\t\t\tthis.getPlayer().switchBoots(itemName);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"game.Weapon\":\r\n\t\t\t\t\t\tthis.getPlayer().switchWeapon(itemName);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault: return \"You cannot equip this item.\";\r\n\t\t\t\t}\r\n\t\t\t\treturn \"You equip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t}",
"public String getEquippedWeapon()\n\t{\n\t\treturn strEquippedWeapon;\n\t\t\n\t}",
"private void makeBoss()\r\n {\r\n maxHealth = 1000;\r\n health = maxHealth;\r\n \r\n weapon = new Equip(\"Claws of Death\", Equip.WEAPON, 550);\r\n armor = new Equip(\"Inpenetrable skin\", Equip.ARMOR, 200);\r\n }",
"public static Item generate(){\n\n //this method lists a collection of new items. it then uses a random number generator\n //to pick one of the objects, and then returns the object so that the main method\n //can add it to the inventory.\n\n ItemType weapon = ItemType.weapon;\n Item IronSword = new Item(weapon, \"Iron Sword\", 8, 50, 10);\n Item GoldenSword = new Item(weapon, \"Golden Sword\", 10, 75, 15);\n Item AllumSword = new Item(weapon, \"Alluminum Sword\", 6, 35, 8);\n Item BowandQuiver = new Item(weapon, \"Bow & Quiver\", 4, 45, 7);\n Item BattleAxe = new Item(weapon, \"Battle Axe\", 12, 55, 13);\n\n ItemType armor = ItemType.armor;\n Item ChainChest = new Item(armor, \"Chain Mail Chestplate\", 8, 40, 30);\n Item IronChest = new Item(armor, \"Iron Chestplate\", 10, 50, 40);\n Item GoldenChest = new Item(armor, \"Golden Chestplate\", 12, 65, 50);\n Item ChainPants = new Item(armor, \"Chain Mail Pants\", 7, 40, 30);\n Item IronPants = new Item(armor, \"Iron Pants\", 9, 50, 40);\n Item GoldenPants = new Item(armor, \"Golden Pants\", 11, 65, 50);\n Item Helmet = new Item(armor, \"Helmet\", 5, 40, 20);\n\n ItemType other = ItemType.other;\n Item Bandage = new Item(other, \"Bandage\", 1, 2, 0);\n Item Wrench = new Item(other, \"Wrench\", 3, 10, 5);\n Item Bread = new Item(other, \"Bread Loaf\", 2, 4, 0);\n Item Water = new Item(other, \"Water Flask\", 3, 2, 0);\n\n Item Initializer = new Item(other, \"init\", 0, 0, 0);\n\t\tint ItemPick = RandomNum();\n Item chosen = Initializer;\n\n switch (ItemPick){\n case 1:\n chosen = IronSword;\n break;\n case 2:\n chosen = GoldenSword;\n break;\n case 3:\n chosen = AllumSword;\n break;\n case 4:\n chosen = BowandQuiver;\n break;\n case 5:\n chosen = BattleAxe;\n break;\n case 6:\n chosen = ChainChest;\n break;\n case 7:\n chosen = IronChest;\n break;\n case 8:\n chosen = GoldenChest;\n break;\n case 9:\n chosen = ChainPants;\n break;\n\t\t\t case 10:\n chosen = IronPants ;\n break;\n case 11:\n chosen = GoldenPants;\n break;\n case 12:\n chosen = Helmet;\n break;\n case 13:\n chosen = Bandage;\n break;\n case 14:\n chosen = Wrench;\n break;\n case 15:\n chosen = Bread;\n break;\n case 16:\n chosen = Water;\n break;\n }\n\n return chosen;\n }",
"@Override\n public Type getItemType() {\n return Type.WEAPON;\n }",
"public final void receiveAttack(Weapon weapon) {\n this.availableLifePower = damageStrategy.processAttack(this, weapon);\n }",
"public int giveDamage();",
"public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }",
"@EventHandler(priority = EventPriority.MONITOR)\n\tvoid onPlayerInteract(PlayerInteractEntityEvent event)\n\t{\n\t\tPlayer player = event.getPlayer();\n\t\tisHealingOther = true;\n\t\t\n\t\t//Check that the player right-clicked on another player.\n\t\tif (!(event.getRightClicked() instanceof Player))\n\t\t\treturn;\n\n \t//Check if the item in hand fits any of the items specified in the configuration file.\t\t\n \tSet <String> items;\n \ttry { items = config.getConfigurationSection(\"healing.\").getKeys(false); }\n \tcatch (NullPointerException e)\n \t{ return; }\n \t\n \tString item = null;\n \tfor (String i: items)\n \t\tif (player.getItemInHand().getType().toString().equalsIgnoreCase(i))\n \t\t\titem = i;\n \t\n \t//If the item isn't found, it's not a healing item.\n \tif (item == null)\n \t\treturn;\n \t\n\t\t//Check if the amount to heal is in the config\n \tSet<String> professionsRequired;\n \ttry { professionsRequired = config.getConfigurationSection(\"healing.\" + item).getKeys(false); }\n \tcatch (NullPointerException e)\n \t{ return; }\n \t\n \tfor (String p: professionsRequired)\n \t{\n \t\tProfessionStats prof = new ProfessionStats(perms, data, config, player.getUniqueId());\n \t\t\n \t\tif (p == null)\n \t\t\tcontinue;\n \t\t\n \tProfessionHandler profHandler = new ProfessionHandler(perms, data, config);\n \t\n \tdouble amountToHeal = config.getInt(\"healing.\" + item + \".\" + p + \".\"\n\t\t\t\t\t+ profHandler.getTierName(prof.getTier(p)));\n \tif (amountToHeal == 0)\n \t{\n \t\tplayer.sendMessage(ChatColor.RED + \"You do not have the skill required to do this!\");\n \t\treturn;\n \t}\n \t\n \t//Check that the recipient has missing health.\n \t\tPlayer recipient = (Player) event.getRightClicked();\n \t\tif (recipient.getHealth() >= 20)\n \t\t{\n \t\t\tplayer.sendMessage(ChatColor.YELLOW + recipient.getName() + \" does not need bandaging!\");\n \t\t\treturn;\n \t\t} \n \t\t\n \t//Check that it won't take you over the maximum amount of health.\n \tif (recipient.getHealth() + amountToHeal > 20)\n \t\tamountToHeal = 20 - recipient.getHealth();\n \t\t\n \t\tplayer.sendMessage(ChatColor.YELLOW + \"Bandaging...\");\n \t\tString name = player.getCustomName();\n \t\tif (name == null)\n \t\t\tname = player.getName();\n \t\trecipient.sendMessage(ChatColor.YELLOW + name + \" is bandaging you...\");\n \t\t\n \t\t//Schedule the task in one second.\n \t\tmakeDelayedTask(player, recipient, amountToHeal, item, p, player.getLocation(), recipient.getLocation());\n \t}\n\t}",
"public void act(Person hero)\r\n { \r\n // dead people can't act\r\n if (room != null)\r\n {\r\n if(Game.random(5)==0)\r\n {\r\n if (type == MONSTER) \r\n eat(hero);\r\n else \r\n attack(hero);\r\n }\r\n }\r\n }",
"private void takeDamage(int damage){ health -= damage;}",
"public String unequipItem(String itemName) {\r\n\t\t\tif(itemName == \"unarmored\") {\r\n\t\t\t\treturn \"You do not have any armor to unequip.\"; // handles unarmored situation\r\n\t\t\t}\r\n\t\t\telse if(itemName.equals(this.getPlayer().getBodyArmor().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getBodyArmor().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getBodyArmor());\r\n\t\t\t\tthis.getPlayer().setBodyArmor(this.getDefaultBodyArmor());\t\t// set armor to default on unequip\r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getHeadgear().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getHeadgear().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getHeadgear());\r\n\t\t\t\tthis.getPlayer().setHeadgear(this.getDefaultHeadgear());\t\t// set headgear to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getGloves().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getGloves().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getGloves());\r\n\t\t\t\tthis.getPlayer().setGloves(this.getDefaultGloves());\t\t\t// set gloves to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getBoots().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getBoots().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getBoots());\r\n\t\t\t\tthis.getPlayer().setBoots(this.getDefaultBoots());\t\t\t\t// set boots to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getWeapon().getName())) {\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getWeapon());\r\n\t\t\t\tthis.getPlayer().setWeapon(this.getDefaultWeapon());\t\t\t// set weapon to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn \"You cannot unequip an item you are not wearing.\";\r\n\t\t\t}\r\n\t\t}",
"public void activatedBy(final Player player) {\n //Battle with a Boss Unit\n }"
]
| [
"0.80261403",
"0.7731195",
"0.75855905",
"0.7506207",
"0.7439644",
"0.7275433",
"0.71027243",
"0.70777524",
"0.69249463",
"0.68321323",
"0.6784808",
"0.67702883",
"0.6741703",
"0.6687947",
"0.6685124",
"0.66617954",
"0.66117936",
"0.65970814",
"0.65569454",
"0.6530297",
"0.6502129",
"0.6466995",
"0.64541006",
"0.6451896",
"0.6445276",
"0.64350873",
"0.64235353",
"0.63678324",
"0.63623565",
"0.6331992",
"0.63298225",
"0.63227135",
"0.6317337",
"0.6314844",
"0.63092446",
"0.6300228",
"0.6271818",
"0.6270144",
"0.62630486",
"0.62578404",
"0.6242885",
"0.62324196",
"0.6216521",
"0.62001157",
"0.6189134",
"0.6170316",
"0.6168931",
"0.6168215",
"0.61673313",
"0.61623496",
"0.6144177",
"0.61436284",
"0.6142464",
"0.6139247",
"0.6129024",
"0.61287224",
"0.6118817",
"0.6114368",
"0.61140037",
"0.611332",
"0.6111318",
"0.61027336",
"0.60896105",
"0.60844",
"0.60829026",
"0.60762084",
"0.6075398",
"0.60704297",
"0.6068019",
"0.6062931",
"0.60619473",
"0.6059152",
"0.60567814",
"0.6052063",
"0.6051121",
"0.60307276",
"0.60266477",
"0.60262424",
"0.6021237",
"0.6019691",
"0.6014453",
"0.6004993",
"0.6004415",
"0.60043824",
"0.60030085",
"0.60002685",
"0.59925103",
"0.59868294",
"0.5980443",
"0.5976245",
"0.59594035",
"0.5957088",
"0.5943676",
"0.594095",
"0.593083",
"0.5916559",
"0.5904765",
"0.5899166",
"0.5895878",
"0.5892508"
]
| 0.7762137 | 1 |
/ Function to clone this instance of weapon | public Weapon clone() {
return new Weapon(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Weapon copy() {\r\n\t\treturn new Weapon(this.getName(), this.getDescription(), this.getType(), this.getSize(), this.getPrice(), this.getMultChanged());\r\n\t}",
"public Weapon clone( Sprite s )\n {\n return this.clone( s, s.getSpriteData().getDirFacing() );\n }",
"protected Enemy copy()\r\n\t{\r\n\t\treturn new DwarfEnemy();\r\n\t}",
"@Override\n public JokerVehicle clone(){\n return new JokerVehicle();\n }",
"public Game copy();",
"@Override\n public ChessPiece clone() {\n ChessPiece copy = new Bishop(this.owner);\n this.owner.removeChessPiece(copy);\n copy.canCastle = this.canCastle;\n copy.icon = this.icon;\n\n return copy;\n }",
"public MovableObject lightClone()\n\t\t{\n\t\t\tfinal MovableObject clone = new MovableObject();\n\t\t\tclone.assCount = this.assCount;\n\t\t\tclone.associatable = this.associatable;\n\t\t\tclone.bound = this.bound;\n\t\t\tclone.coords = new int[this.coords.length];\n\t\t\tfor(int i=0; i < this.coords.length; i++)\n\t\t\t\tclone.coords[i] = this.coords[i];\n\t\t\tclone.highlighted = this.highlighted;\n\t\t\tclone.hotSpotLabel = this.hotSpotLabel;\n\t\t\tclone.keyCode = this.keyCode;\n\t\t\tclone.label = this.label;\n\t\t\tclone.maxAssociations = this.maxAssociations;\n\t\t\tif(shape.equals(\"rect\"))\n\t\t\t{\n\t\t\t\tclone.obj = new Rectangle(coords[0]-3,coords[1]-3,coords[2]+6,coords[3]+6);\n\t\t\t}\n\t\t\tif(shape.equals(\"circle\"))\n\t\t\t{\n\t\t\t\tclone.obj = new Ellipse2D.Double((coords[0]-coords[2])-4,(coords[1]-coords[2])-4,(coords[2]+2)*2,(coords[2]+2)*2);\n\t\t\t}\n\t\t\tif(shape.equals(\"ellipse\"))\n\t\t\t{\n\t\t\t\tclone.obj = new Ellipse2D.Double((coords[0]-coords[2])-4,(coords[1]-coords[2])-4,(coords[2]+2)*2,(coords[3]+2)*2);\n\t\t\t}\n\t\t\tif(shape.equals(\"poly\"))\n\t\t\t{\n\t\t\t\tfinal int xArr[] = new int[coords.length/2];\n\t\t\t\tfinal int yArr[] = new int[coords.length/2];\n\t\t\t\tint xCount = 0;\n\t\t\t\tint yCount = 0;\n\t\t\t\tfor(int i=0; i < coords.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif((i%2) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\txArr[xCount] = coords[i];\n\t\t\t\t\t\txCount++;\n\t\t\t\t\t}else\n\t\t\t\t\t{\n\t\t\t\t\t\tyArr[yCount] = coords[i];\n\t\t\t\t\t\tyCount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//TODO calculate the centre of mass\n\n\t\t\t\tclone.obj = new Polygon(xArr,yArr,xArr.length);\n\t\t\t}\n\t\t\tclone.pos = new Point(this.pos.x,this.pos.y);\n\t\t\tclone.shape = this.shape;\n\t\t\tclone.startPos = this.startPos;\n\t\t\tclone.value = this.value;\n\n\t\t\treturn clone;\n\t\t}",
"@Override\n\tpublic Univent copy() {\n\t\treturn new AddExpToHeroesEvent(amount);\n\t}",
"public Binaire clone(){\n\t\treturn new Binaire(this.symbole, this.gauche.clone(), this.droit.clone());\n\t}",
"@Override\r\n\tpublic ArrayList<Cell> behaviorClone() {\r\n\t\tenergy = (energy-20)/2;\r\n\t\tmass = mass/2;\r\n\t\tArrayList<Cell> newCell = new ArrayList<Cell>();\r\n\t\tnewCell.add(new Grazer(petri, rng, x, y, xVelocity, yVelocity, mass, energy));\r\n\t\treturn newCell;\r\n\t}",
"public abstract GameObject clone();",
"@Override\r\n\tpublic MotionStrategy Clone() {\n\t\tMotionStrategy move = new RandomAndInvisible(mLifetime);\r\n\t\treturn move;\r\n\t}",
"public P copy(){\n AssetLoader l = GDefence.getInstance().assetLoader;\n P p = new P(chance.get(), duration.get(), bonusDmg.get(), g);\n p.gemBoost[0] = new BoostInteger(p.bonusDmg, g.bonusDmgUp, l.getWord(\"bashGrade3\"),\n true, BoostInteger.IntegerGradeFieldType.NONE);\n p.gemBoost[1] = new BoostFloat(p.duration, g.durationUp, l.getWord(\"bashGrade2\"),\n true, BoostFloat.FloatGradeFieldType.TIME);\n p.gemBoost[2] = new BoostFloat(p.chance, g.chanceUp, l.getWord(\"bashGrade1\"),\n true, BoostFloat.FloatGradeFieldType.PERCENT);\n p.s = new S(chance.get(), duration.get(), bonusDmg.get());\n return p;\n }",
"public Weapon buildWeapon() {\n\t\tRandom rand = new Random();\n\t\tint chance = rand.nextInt(rangeMax - rangeMin) + rangeMin;\n\t\tfor (Weapon weapon: weapons) {\n\t\t\tif (weapon.isInSpawnRange(chance)) {\n\t\t\t\treturn weapon.clone();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic Dog Clone() throws CloneNotSupportedException {\r\n\t\treturn new Poodle(this.getName(), this.getWeight(), this.getColor(), this.getGender(), this.getInfo()); \r\n\t}",
"public Weapon(Weapon weapon) \n\t{\n\t\tsuper(weapon.getName());\n\t\tweaponDamage = weapon.getWeaponDamage();\n\t}",
"public Object clone()\n\t{\n\t\tObject myClone = new Object();\n\t\tmyClone = myName + myNumberWins;\n\t\treturn myClone;\n\t}",
"@Override\n\tpublic ProbabilityDistribution<T> clone() {\n\t\tProbabilityDistribution<T> clone = new ProbabilityDistribution<T>(\n\t\t\t\trandom_);\n\t\tclone.itemProbs_ = new MutableKeyMap<T, Double>(itemProbs_);\n\t\treturn clone;\n\t}",
"private Weapon() {\n\t\t\tname = \"\";\n\t\t\tdamage = 0;\n\t\t\tcrippleDamage = 0;\n\t\t\tflavors = new HashMap<>();\n\t\t}",
"public abstract Player freshCopy();",
"public DessertVO clone() {\r\n return (DessertVO) super.clone();\r\n }",
"public Object clone(){ \r\n\t\tBaseballCard cloned = new BaseballCard();\r\n\t\tcloned.name = this.getName();\r\n\t\tcloned.manufacturer=this.getManufacturer();\r\n\t\tcloned.year = this.getYear();\r\n\t\tcloned.price = this.getPrice();\r\n\t\tcloned.size[0]= this.getSizeX();\r\n\t\tcloned.size[1]= this.getSizeY();\r\n\t\treturn cloned;\r\n\t}",
"public Function clone();",
"@Override \n public Door clone()\n {\n try\n {\n Door copy = (Door)super.clone();\n \n //a copy of the location class\n copy.room = room.clone(); \n \n return copy;\n }\n catch(CloneNotSupportedException e)\n {\n throw new InternalError();\n }\n }",
"@Override\n public MovePath clone() {\n final MovePath copy = new MovePath(getGame(), getEntity());\n copy.steps = new Vector<MoveStep>(steps);\n copy.careful = careful;\n return copy;\n }",
"public abstract Piece clone();",
"public abstract Piece clone();",
"public DescriptiveFramework clone();",
"public Card makeCopy(){\n return new Card(vimage);\n }",
"@Override\n\tpublic IProperty getClone() {\n\t\treturn new Strength(myStrength);\n\t}",
"@Override\n\tpublic Spielfeld clone() {\n\t\tint[] mulden = new int[this.getMulden().length];\n\t\t\n\t\tfor(int i = 0; i < this.getMulden().length; i++) {\n\t\t\tmulden[i] = this.getMulden()[i];\n\t\t}\n\t\t\n\t\treturn new Spielfeld(mulden);\n\t}",
"Object clone();",
"Object clone();",
"private Shop deepCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n List<Book> books = new ArrayList<>();\n Iterator<Book> iterator = this.getBooks().iterator();\n while(iterator.hasNext()){\n\n books.add((Book) iterator.next().clone());\n }\n obj.setBooks(books);\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }",
"private Shop shallowCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }",
"@Override\npublic Creature clone() {\n\treturn null;\n}",
"@Override\n\tpublic Soldier copy() {\n\t\tSoldier newS = new Soldier(this.getControllingPlayerID(), this.getLocation(), this.getHpMax(), this.getHpCurrent(),\n\t\t\t\t\t\t\t\t\tthis.getOrientation(), this.getFieldOfViewRange(), this.getFieldOfViewAngle(), this.getAttackRange(),\n\t\t\t\t\t\t\t\t\tthis.getAttackDamage(), this.getSpecialAttackCooldown(), this.getSpawnCost(), this.getScoreWorth());\n\t\tnewS.setID(this.getID());\n\t\tnewS.updateFieldOfView(this.getFieldOfView());\n\t\treturn newS;\n\t}",
"public Object clone(){\n \t\n \treturn this;\n \t\n }",
"public Object clone() {\n // No problems cloning here since private variables are immutable\n return (InstTexes) super.clone();\n }",
"public abstract SoftwareLight copy();",
"@Override\n public Piece copy() {\n return new Knight(this.getSide(), this.getCoordinate());\n }",
"public native Sprite clone();",
"public dice clone()\r\n\t{\r\n\t\ttry {\r\n\t\t\treturn (dice) super.clone();\r\n\t\t} catch (CloneNotSupportedException e)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t}",
"private void selfClone() {\n stroke = stroke.clone();\n }",
"public Object clone() {\n return new RelevantObjectsCommand(name, \n relevantStateVariables, \n relevantObjects,\n relevancyRelationship);\n }",
"public Piece clone() {\n return new Pawn(new Point(this.location.x, this.location.y),\n this.color, this.numMoves, this.enPassantOk);\n }",
"public Object clone();",
"public Object clone();",
"public Object clone();",
"public Object clone();",
"@Override\n public Game cloneGame(){\n GridGame clone = new pegsolitaire();\n clone.pieces = new LinkedList<Piece>();\n for(Piece pc : pieces){\n clone.pieces.add(pc.clonePiece());\n }\n clone.current_player = current_player;\n clone.size_x = size_x;\n clone.size_y = size_y;\n return clone;\n }",
"public abstract State clone();",
"public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }",
"private Inventory clone_inv(Inventory inv_original, String title) {\n // Copy name, size and other stuff\n Inventory inv = createInventory(this, inv_original.getSize(), title);\n inv.setContents(inv_original.getContents());\n\n return inv;\n }",
"public Object clone() {\n return this.copy();\n }",
"public Feature copy() {\n\t\tFeature ret = new AbbeelFeature();\n\t\treturn ret;\n\t}",
"@Override\n public Object clone() {\n return super.clone();\n }",
"@Override\n\tpublic GameUnit clone() throws CloneNotSupportedException {\n\t\t// this is a shallow copy, because of the Point3D properties and that is the only property of this class (GameUnit) a shallow copy is enough\n\t\tGameUnit unit = (GameUnit)super.clone();\n\t\t// reset the position property state before returning the cloned class\n\t\tunit.initialize();\n\t\treturn unit;\n\t}",
"public Image clone() {\r\n\t\treturn new Image(renderer, texture, textureX, textureY, textureWidth, textureHeight, width, height);\r\n\t}",
"public GameBoard clone(){\r\n\t\tGameBoard result = new GameBoard();\r\n\t\ttry{\r\n\t\t\tresult = (GameBoard) super.clone();\r\n\t\t}catch(CloneNotSupportedException e){\r\n\t\t\tthrow new RuntimeException();\r\n\t\t}\r\n\t\tresult.board = (Box[]) board.clone();\r\n\t\treturn result;\r\n\t}",
"protected Shingle copy() {\n return new Shingle(this);\n }",
"public abstract Pessoa clone();",
"@Override\r\n\tpublic AI_Domain clone() {\r\n\t\treturn new Board2048model(this);\r\n\t}",
"public Clone() {}",
"public WeaponComponent() {\n weaponName = \"none\";\n owned = false;\n damagePower = 1;\n }",
"@Override\n\tpublic Automaton clone() {\n\t\tAutomaton a;\n\t\t// Try to create a new object.\n\t\ttry {\n\t\t\ta = getClass().newInstance();\n\t\t} catch (final Throwable e) {\n\t\t\t// Well golly, we're sure screwed now!\n\t\t\tlogger.error(\"Warning: clone of automaton failed: {}\", e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\ta.setEnvironmentFrame(getEnvironmentFrame());\n\n\t\t// Copy over the states.\n\t\tfinal HashMap<State, State> map = new HashMap<>(); // Old states to new\n\t\t// states.\n\t\tstates.forEach(state -> {\n\t\t\tfinal State newState = new State(state.getID(), new Point(state.getPoint()), a);\n\t\t\tnewState.setLabel(state.getLabel());\n\t\t\tnewState.setName(state.getName());\n\t\t\tmap.put(state, newState);\n\t\t\ta.addState(newState);\n\t\t\tif (this instanceof MooreMachine) {\n\t\t\t\t((MooreMachine) a).setOutput(newState, ((MooreMachine) this).getOutput(state));\n\t\t\t}\n\t\t});\n\n\t\tfinalStates.forEach(state -> {\n\t\t\ta.addFinalState(map.get(state));\n\t\t});\n\n\t\ta.setInitialState(map.get(getInitialState()));\n\n\t\t// Copy over the transitions.\n\n\t\tstates.forEach(state -> {\n\t\t\tfinal State from = map.get(state);\n\t\t\tgetTransitionsFromState(state).forEach(transition -> {\n\t\t\t\tfinal State to = map.get(transition.getToState());\n\t\t\t\tSystem.err.println(\"Transition name: \" + transition.toString());\n\t\t\t\tfinal Transition toBeAdded = transition.clone();\n\t\t\t\ttoBeAdded.setFromState(from);\n\t\t\t\ttoBeAdded.setToState(to);\n\t\t\t\tSystem.err.println(\"toBeAdded is null: \" + (toBeAdded == null));\n\t\t\t\tSystem.err.println(\"toBeAdded.from is null: \" + (toBeAdded.getFromState() == null));\n\t\t\t\tSystem.err.println(\"toBeAdded.to is null: \" + (toBeAdded.getToState() == null));\n\t\t\t\ta.addTransition(toBeAdded);\n\t\t\t});\n\t\t});\n\n\t\tfinal List<Note> notes = getNotes();\n\t\tfinal List<Note> copyNotes = a.getNotes();\n\t\tcheckArgument(notes.size() == copyNotes.size());\n\n\t\tIntStream.range(0, notes.size()).forEach(i -> {\n\t\t\ta.addNote(new Note(notes.get(i).getAutoPoint(), notes.get(i).getText()));\n\t\t\tcopyNotes.get(i).setView(notes.get(i).getView());\n\t\t});\n\t\t// Should be done now!\n\t\treturn a;\n\t}",
"@Override\n protected Alpha clone() {\n try {\n Alpha alpha = (Alpha) super.clone();\n alpha.mListeners = new ArrayList<Listener>();\n return alpha;\n } catch (CloneNotSupportedException e) {\n throw new RuntimeException(e);\n }\n }",
"@Override\n public Vector3 clone()\n {\n return new Vector3(this);\n }",
"@Override\n public Board clone() {\n return new Board(copyOf(this.board));\n }",
"public Restaurant clone() {\r\n return new Restaurant(this);\r\n }",
"public SoPickedPoint \ncopy() \n//\n////////////////////////////////////////////////////////////////////////\n{\n SoPickedPoint newCopy = new SoPickedPoint(this);\n return newCopy;\n}",
"public FirmReference clone() {\r\n try {\r\n\t\t\treturn (FirmReference) super.clone();\r\n\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n \r\n\t}",
"public abstract Instance duplicate();",
"@Override\n public Slot clone() {\n\tfinal Slot s = new Slot();\n\ts.day = day;\n\ts.start = start;\n\ts.end = end;\n\ts.venue = venue;\n\ts.instructor = instructor;\n\ts.sectionType = sectionType;\n\treturn s;\n }",
"public Theater cloneTheater() {\n return new Theater(this);\n }",
"public DiceManager clone() {\n DiceManager cloneDiceList = new DiceManager();\n cloneDiceList.setDicesList(this.dicesList);\n return cloneDiceList;\n }",
"@Override\n\tpublic AbstractRelic makeCopy() {\n\t\treturn new NamelessWarRelicA();\n\t}",
"public Material copy()\r\n\t{\r\n\t\tMaterial other = new Material();\r\n\r\n\t\tother.setAmbient(ambient.x, ambient.y, ambient.z);\r\n\t\tother.setDiffuse(diffuse.x, diffuse.y, diffuse.z);\r\n\t\tother.setSpecular(specular.x, specular.y, specular.z);\r\n\r\n\t\tother.setTexture(texture);\r\n\r\n\t\treturn other;\r\n\t}",
"public TurtleState copy() {\n\t\treturn new TurtleState(position.copy(), direction.copy(), color, shift);\n\t}",
"public ParticleRenderData copy()\n\t{\n\t\tRenderData copy = super.copy();\n\t\tParticleRenderData pcopy = new ParticleRenderData(new Vector3f(), new Euler(), new Vector3f());\n\t\tpcopy.transform = copy.transform;\n\t\tpcopy.postStage = this.postStage;\n\t\tpcopy.currStage = this.currStage;\n\t\tpcopy.particleColor = this.particleColor;\n\t\treturn pcopy;\n\t}",
"public Object clone(){\r\n\t\tSampleData obj = new SampleData(letter,getWidth(),getHeight());\r\n\t\tfor ( int y=0;y<getHeight();y++ )\r\n\t\t\tfor ( int x=0;x<getWidth();x++ )\r\n\t\t\t\tobj.setData(x,y,getData(x,y));\r\n\t\treturn obj;\r\n\t}",
"protected final Object clone() {\n\t\tBitBoardImpl clone = new BitBoardImpl();\n\t\tfor( int i = 0; i < 5; i++) {\n\t\t clone._boardLayer[i] = _boardLayer[i];\n\t\t}\n\t\treturn clone;\n }",
"public Card copy(){\n return new Card(Suits, Value);\n }",
"public Object clone(){\n\t\tVehicle car;\n\t\ttry{\n\t\t\tcar = (Vehicle) super.clone();\n\t\t} catch(CloneNotSupportedException e){\n\t\t\treturn null;\n\t\t}\n\t\t\treturn car;\n\t\t}",
"public WorldState clone ()\n\t{\n\t\tWorldState clone = new WorldState();\n\t\tclone.copy(this);\n\t\treturn clone;\n\t}",
"public abstract Object clone() ;",
"Prototype makeCopy();",
"public Object clone() {\t\n\t\tGrille o = new Grille();\t\t//On créé une nouvelle grille\n\t\to.score=this.score;\n\t\tfor (Case i : this.grille){\n\t\t\tCase i2= (Case) i.clone();\t//On copie chaque case de la grille\n\t\t\ti2.setGrille(o);\n\t\t\to.grille.add(i2);\t\t\t//On les ajoute à la nouvelle grille\n\t\t}\n\t\t// on renvoie le clone\n\t\treturn o;\n\t}",
"protected Factorization copy(){\n Factorization newFactor = new Factorization(this.mdc);\n //shallow copy\n newFactor.setRecipes(recipes);\n newFactor.setIngredients(ingredients);\n newFactor.setUserMap(userMap);\n newFactor.setUserMapReversed(userMap_r);\n newFactor.setRecipeMap(recipeMap);\n newFactor.setRecipeMapReversed(recipeMap_r);\n newFactor.setIngredientMap(ingredientMap);\n newFactor.setIngredientMapReversed(ingredientMap_r);\n \n //deep copy\n List<User> userCopy = new ArrayList<User>();\n for(User curr: this.users){\n userCopy.add(new User(curr.getId()));\n }\n newFactor.setUsers(userCopy);\n newFactor.setDataset(dataset.copy());\n newFactor.updateInitialSpace();\n return newFactor;\n }",
"@Override\n public IWord clone() {\n IWord w = null;\n try {\n w = (IWord) super.clone();\n } catch (CloneNotSupportedException e) {\n e.printStackTrace();\n }\n\n return w;\n }",
"public abstract Object clone();",
"@Override\n\tpublic function copy() {\n\t\tMonom M=new Monom(this.get_coefficient(),this.get_power());\n\t\t\n\t\treturn M;\n\t}",
"public BufferTWeak cloneMe() {\r\n BufferTWeak ib = new BufferTWeak(uc);\r\n ib.increment = increment;\r\n ib.set(new Object[objects.length]);\r\n for (int i = 0; i < objects.length; i++) {\r\n ib.objects[i] = this.objects[i];\r\n }\r\n ib.offset = this.offset;\r\n ib.count = this.count;\r\n return ib;\r\n }",
"IGLProperty clone();",
"public Animal deepCopy() {\n return new Eagle(this);\n }",
"@Override\n public Product clone() throws CloneNotSupportedException {\n\n Product newObject = (Product)super.clone();\n if(this.category != null) {\n try {\n newObject.category = ((Category) this.category.clone());\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n }\n if(this.price != null) {\n try {\n newObject.price = (this.price.clone());\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n }\n return newObject;\n }",
"Player getClone() {\n Player clone = new Player();\n clone.brain = brain.getClone();\n return clone;\n }",
"public MobileEntity getclone(MobileEntity ws){\n return ws.MakeCopy();\n }",
"public Statistic copy() {\n\t\tStatistic copy = new Statistic();\n\t\tcopy.teamScore.putAll(teamScore);\n\t\tfor (int i = 0; i < stats.size(); i++) {\n\t\t\tPlayerStatEntry entry = stats.get(i);\n\t\t\tPlayerStatEntry copyEntry = new PlayerStatEntry(entry.getPlayer());\n\t\t\tfor (StatsProperty statType : StatsProperty.values()) {\n\t\t\t\tcopyEntry.setProperty(statType, entry.getProperty(statType));\n\t\t\t}\n\t\t\tcopy.stats.add(copyEntry);\n\t\t}\n\t\treturn copy;\n\t}",
"public Weapon (Player player) {\n\t\tthis.player = player;\n\t}"
]
| [
"0.79877377",
"0.7107779",
"0.68023497",
"0.67218494",
"0.67128927",
"0.66410744",
"0.6626251",
"0.6539826",
"0.65151215",
"0.64956486",
"0.6482416",
"0.64668983",
"0.6463346",
"0.64400995",
"0.6432846",
"0.63919365",
"0.6390796",
"0.637779",
"0.6346587",
"0.63435465",
"0.6334894",
"0.63193774",
"0.6272283",
"0.62658566",
"0.6255383",
"0.6229806",
"0.6229806",
"0.62003267",
"0.6198055",
"0.6186188",
"0.6184801",
"0.6173426",
"0.6173426",
"0.6171885",
"0.61628246",
"0.6156539",
"0.615482",
"0.61506504",
"0.61497134",
"0.61455774",
"0.6143653",
"0.6118287",
"0.6117303",
"0.6108444",
"0.6096676",
"0.6089561",
"0.6088092",
"0.6088092",
"0.6088092",
"0.6088092",
"0.60809004",
"0.6076213",
"0.60587937",
"0.6037955",
"0.60266155",
"0.6017525",
"0.6013268",
"0.6007755",
"0.6007469",
"0.60074687",
"0.6006449",
"0.59820545",
"0.59737766",
"0.59729767",
"0.59524906",
"0.59362036",
"0.59328395",
"0.5927971",
"0.5927264",
"0.5917106",
"0.5910479",
"0.5896249",
"0.5880708",
"0.5879083",
"0.58770496",
"0.5874058",
"0.58453834",
"0.58417374",
"0.58405715",
"0.58299196",
"0.5828266",
"0.5821797",
"0.5809943",
"0.58038545",
"0.5801529",
"0.5794776",
"0.57903427",
"0.5786869",
"0.578378",
"0.5781109",
"0.57806814",
"0.5780191",
"0.5776174",
"0.5776068",
"0.57648355",
"0.576427",
"0.57615954",
"0.5761032",
"0.5757597",
"0.5749974"
]
| 0.85731125 | 0 |
The constructor for a new score indicator. | public ScoreIndicator(Counter score, int width, int fontSize, int textY) {
this.score = score;
this.width = width;
this.fontSize = fontSize;
this.textY = textY;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ScoreIndicator(Counter score) {\r\n this.score = score;\r\n }",
"public Score()\n {\n // initialize instance variables\n score = 0;\n }",
"public Scores(int score) {\r\n this.score = score;\r\n }",
"public Score() {\n this.date = new Date();\n this.name = null;\n this.score = 0;\n }",
"public Score(){\n\t\tscore = 0;\n\t\tincrement = 0; //how many points for eating a kibble. Changed to zero here because adjustScoreIncrement's extra points begin at 1 anyway\n\t}",
"public ScoreList(){\r\n\t\tnumItems = 0;\r\n\t\tscoreList = new Score[100];\r\n\t}",
"public MatcherScores()\n {\n // do nothing\n }",
"private ScoreCalculator() {}",
"public Score(String name, int score) {\n //set date to current date\n this.date = new Date();\n \n this.score = score;\n this.name = name;\n \n }",
"public Scoreboard() {\n\t}",
"public LocationScore(int score) {\n this.score = score;\n }",
"public ScoreManager() {\n\t\tscore = 0;\n\t}",
"public Scores() {\n list = new int[50];\n }",
"public HighScore (int score)\n {\n this.name = \"P'ngball Grandmaster\";\n this.score = score;\n this.level = \"level 1\";\n }",
"public ScoreFixer ()\r\n {\r\n }",
"BruceScore() {}",
"public static void createScore(){\n\t}",
"public Highscore() {\n scores = new ArrayList<Score>();\n }",
"public UserScore() {\n this(DSL.name(\"b2c_user_score\"), null);\n }",
"public TestScores(int[] testScores) {\n this.testScores = testScores;\n }",
"public Scores() {\n date = new Date();\n }",
"public HighScore ()\n {\n this.name = \"P'ngball Grandmaster\";\n this.score = 0;\n this.level = \"level 1\";\n }",
"public Indicator() {\n }",
"public MusicScore ()\n {\n score = new ArrayList<Note>();\n }",
"protected AnswerScore() {/* intentionally empty block */}",
"public Scores(String player, int score) {\r\n this.player = player;\r\n this.score = score;\r\n }",
"public StudentRecord() {\n\t\tscores = new ArrayList<>();\n\t\taverages = new double[5];\n\t}",
"ScoreEnumeration(int scoreInt, String scoreText){\n this.scoreInt = scoreInt;\n this.scoreText = scoreText;\n\n }",
"public PlayerScore (String name, int score)\n {\n playerName = name;\n playerScore = score;\n }",
"public Score(int lives) {\n this.lives = lives;\n }",
"@Test\r\n\tpublic void constructorTest() \r\n\t{\r\n\t\tassertEquals(0, scoreBehavior.score());\r\n\t}",
"public HighScore (String name,String level, int score)\n {\n this.name = name;\n this.score = score;\n this.level = level;\n }",
"public ScoreTrackingListener(Counter scoreCounter) {\r\n this.currentScore = scoreCounter;\r\n }",
"public ScoreTrackingListener(Counter scoreCounter) {\r\n this.currentScore = scoreCounter;\r\n }",
"public HighScore (String name)\n {\n this.name = name;\n this.score = 0;\n this.level = \"level 1\";\n }",
"public HighScore(){\n readFile();\n sortHighscores();\n }",
"public ScoreTrackingListener(Counter scoreCounter) {\n this.currentScore = scoreCounter;\n }",
"YearScore () {}",
"public ScoreView() {\n VBox root = new VBox();\n\n ArrayList<Score> scores = getScoreFromFile();\n scores.sort(Score::compareTo);\n\n if(scores.size() == 0) {\n Label emptyLabel = new Label(\"There is no score.\");\n root.getChildren().add(emptyLabel);\n } else {\n for (Score score : scores) {\n Label scoreLabel = new Label(score.VALUE + \"\\t:\\t\" + score.TIME);\n root.getChildren().add(scoreLabel);\n }\n }\n\n root.setAlignment(Pos.CENTER);\n this.setContent(root);\n this.setFitToWidth(true);\n this.setFitToHeight(true);\n this.setStyle(\"-fx-focus-color: black;\");\n }",
"public HighScoreTable(){\r\n\r\n\t}",
"public LineScore(String v, double d) {\r\n\t\t\r\n\t\tsuper(v, d);\r\n\t\ttime.reset();\r\n\t\ttime.start();\r\n\t\t\r\n\t}",
"public Score(Context ctx) throws RecordNotFoundException {\n\t\tthis(null, ctx);\n\t}",
"public Counter()\n {\n this(0);\n }",
"public Scores(int length) {\n list = new int[length];\n }",
"ScoreManager createScoreManager();",
"public IndicatorExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public void setScore(int score) { this.score = score; }",
"public void setScore(int score) {this.score = score;}",
"private Score(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }",
"public Player() {\n\t\tscore = 0;\n\t}",
"public SportScoreExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}",
"public ScoreTrakker() {\n\t\tstudents =new ArrayList<Student>();\n\t}",
"public CollectScoresIterationListener() {\n this(1);\n }",
"public CreditRating() {\n }",
"private void addIndicators() {\r\n ScoreIndicator scoreIndicator = new ScoreIndicator(this.score);\r\n scoreIndicator.addToGame(this);\r\n LivesIndicator livesIndicator = new LivesIndicator(this.numberOfLives);\r\n livesIndicator.addToGame(this);\r\n NameLevelIndicator nameLevel = new NameLevelIndicator(info);\r\n nameLevel.addToGame(this);\r\n }",
"public UserScore(Name alias) {\n this(alias, USER_SCORE);\n }",
"public Leaderboard() {\n filePath = new File(\"Files\").getAbsolutePath();\n highScores = \"scores\";\n\n topScores = new ArrayList<>();\n topName = new ArrayList<>();\n }",
"public Creator(String score_name) {\n this.score_name = score_name;\n\n this.bukkitScoreboard = Bukkit.getScoreboardManager().getNewScoreboard();\n this.obj = this.bukkitScoreboard.registerNewObjective(randomString(), \"dummy\", \"test\");\n\n this.obj.setDisplaySlot(DisplaySlot.SIDEBAR);\n this.obj.setDisplayName(color(score_name));\n }",
"public AnswerScore(int addr, TOP_Type type) {\n super(addr, type);\n readObject();\n }",
"public CalculatedPerformanceIndicators()\n {\n super();\n // TODO Auto-generated constructor stub\n }",
"public viewScore() {\n initComponents();\n }",
"public ScoreLabel(final ScoreSheet the_sheet, final Font the_font)\n {\n super();\n my_scores = the_sheet;\n my_font = the_font;\n setOpaque(false);\n setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));\n \n my_score_label = new JLabel(\"Score: 0\");\n my_level_label = new JLabel(\"Level: 1\");\n my_lines_label = new JLabel(\"Lines Cleared: 0\");\n addLabels();\n }",
"public ScoreEntry(XMLElement xml) {\n int score = 0;\n Date finishTime = new Date();\n Date startTime = new Date();\n Properties properties = new Properties();\n\n for(Object o : xml.getChildren()) {\n XMLElement xe = (XMLElement) o;\n final String name = xe.getName();\n final String val = xe.getContent();\n if(name.equals(\"score\")) {\n score = Integer.parseInt(val);\n } else if(name.equals(\"startTime\")) {\n try {\n startTime = DateFormat.getInstance().parse(val);\n } catch (Exception ignore) {}\n } else if(name.equals(\"finishTime\")) {\n try {\n finishTime = DateFormat.getInstance().parse(val);\n } catch (Exception ignore) {}\n } else if(name.equals(\"properties\")) {\n for(Object o2 : xe.getChildren()) {\n XMLElement prop = (XMLElement) o2;\n if(prop.getName().equals(\"property\")) {\n properties.setProperty(prop.getStringAttribute(\"name\"),prop.getStringAttribute(\"value\"));\n }\n }\n }\n }\n\n this.score = score;\n this.finishTime = finishTime;\n this.startTime = startTime;\n this.properties = properties;\n }",
"public ScoreBean() {\n scoreProperty = new SimpleLongProperty();\n scoreProperty.set(0);\n \n turnPoints1 = new SimpleIntegerProperty(0);\n gamePoints1 = new SimpleIntegerProperty(0);\n totalPoints1 = new SimpleIntegerProperty(0);\n \n turnPoints2 = new SimpleIntegerProperty(0);\n gamePoints2 = new SimpleIntegerProperty(0);\n totalPoints2 = new SimpleIntegerProperty(0);\n \n winningTeam = new SimpleObjectProperty<TeamId>(null);\n \n // the seven other properties are updated each time\n // the packed score is set.\n scoreProperty.addListener((s) -> update(s));\n }",
"public TennisScoreSystem() {\n scoreA = 0;\n scoreB = 0;\n }",
"public Record(String config, int score) {\n\t\tthis.config = config;\n\t\tthis.score = score;\n\t}",
"ScoreBar(ArrayList<Player> players, int x, int y) {\n // FORMAT: <name> [***] : \n this.players = players;\n this.x = x;\n this.y = y;\n this.f = createFont(\"HelveticaNeue-Thin\", 1, true);\n }",
"public HealthScoreInfo(HealthScoreInfo source) {\n if (source.IssueTypes != null) {\n this.IssueTypes = new IssueTypeInfo[source.IssueTypes.length];\n for (int i = 0; i < source.IssueTypes.length; i++) {\n this.IssueTypes[i] = new IssueTypeInfo(source.IssueTypes[i]);\n }\n }\n if (source.EventsTotalCount != null) {\n this.EventsTotalCount = new Long(source.EventsTotalCount);\n }\n if (source.HealthScore != null) {\n this.HealthScore = new Long(source.HealthScore);\n }\n if (source.HealthLevel != null) {\n this.HealthLevel = new String(source.HealthLevel);\n }\n }",
"public Counter() {\r\n value = 0;\r\n }",
"@Override\n\tpublic void readScore() {\n\t\t\n\t}",
"@Override\n\tpublic void readScore() {\n\t\t\n\t}",
"public flagTile(int score)\n {\n // initialise instance variables\n System.out.println(\"You chose a Flag tile. you get 3 points. Choose again.\");\n int points = 3;\n score = score;\n statistics.totalScore(points);\n }",
"protected Goodie(float width, float height, String imgName) {\n super(imgName, width, height);\n mScore[0] = 1;\n mScore[1] = 0;\n mScore[2] = 0;\n mScore[3] = 0;\n }",
"public Statistics() {\r\n\t\tcurrentGameTime = 0;\r\n\t\ttotalTime = 0;\r\n\t\tminTime = Integer.MAX_VALUE;\r\n\t\tmaxTime = 0;\r\n\t\tscores = new int[2];\r\n\t\twinnerId = 0;\r\n\t\tvictories = new int[2];\r\n\t\tgameCount = 0;\r\n\t}",
"public Game(String gameName, int[][] scores){\n\n this.gameName = gameName;\n this.scores = scores;\n\n }",
"public void setScore(java.lang.Integer value);",
"public int getScore() { return score; }",
"public ImpactScore(\n @JsonProperty(\"name\") String name,\n @JsonProperty(\"feature\") Feature<Impact> feature) {\n\n super(name, feature);\n this.feature = Objects.requireNonNull(feature, \"Oops! Feature can't be null!\");\n }",
"public void setScores(ArrayList<Integer> scores) { this.scores = scores; }",
"private ResponseScores(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }",
"public Intervals() {\n }",
"public Record() {\n this.wins = INITIAL_SCORE;\n this.losses = INITIAL_SCORE;\n this.draws = INITIAL_SCORE;\n }",
"public Counter(int val) {\r\n value = val;\r\n }",
"public TrackStat() {\r\n }",
"public Player()\r\n\t{\r\n\t\tscore = 0;\r\n\t\tsetPlayerName();\r\n\t}",
"public int getScore(){ return this.score; }",
"public CountBasedScannableCode() {}",
"void setScoreValue(int scoreValue);",
"public Counter() {\r\n this.count = 0;\r\n }",
"public HitCounter() {\n q = new LinkedList<>();\n }",
"public void setScore (int newScore)\n {\n this.score = newScore;\n }",
"public int getScore() {return score;}",
"public void setScore(int score) {\n this.score = score;\n }",
"public void setScore(int score)\n {\n this.score = score;\n }",
"public void setScore(Integer score) {\r\n this.score = score;\r\n }",
"public Counter(Counter count) {\r\n value = count.value;\r\n }",
"public Game() { \n super(1000, 640, 1);\n updateScore(0);\n }",
"public WinnerProfile(String name, int score){\n this.name=name;\n this.score=score;\n }",
"YearScore(int year, int score) {\n\t\tthis.year = new IntWritable(year);\n\t\tthis.score = new IntWritable(score);\n\t}",
"public Statistics() {}"
]
| [
"0.86600083",
"0.721749",
"0.7057549",
"0.6940942",
"0.6891425",
"0.6867385",
"0.6845631",
"0.6730682",
"0.6678728",
"0.6667432",
"0.6570337",
"0.65429264",
"0.6531045",
"0.65176976",
"0.6516225",
"0.6498264",
"0.64494085",
"0.64229",
"0.6333054",
"0.6268798",
"0.62654734",
"0.62556857",
"0.62552786",
"0.62198573",
"0.6211814",
"0.6198181",
"0.61975646",
"0.6180598",
"0.616308",
"0.61590075",
"0.61485523",
"0.61413103",
"0.61265326",
"0.61265326",
"0.6113361",
"0.6110616",
"0.6090204",
"0.6082629",
"0.6080642",
"0.60531354",
"0.59747094",
"0.5963733",
"0.5961873",
"0.5959852",
"0.58885866",
"0.5870468",
"0.58641535",
"0.5861523",
"0.58443475",
"0.5810372",
"0.5788013",
"0.57843983",
"0.5762675",
"0.5748072",
"0.5741415",
"0.57261825",
"0.5724024",
"0.572168",
"0.56853366",
"0.5680583",
"0.56770146",
"0.56421536",
"0.56075364",
"0.5604657",
"0.559407",
"0.55921555",
"0.557619",
"0.5573853",
"0.5569341",
"0.55662",
"0.55662",
"0.5554167",
"0.5549111",
"0.55402684",
"0.5524065",
"0.55042386",
"0.55012137",
"0.5500514",
"0.5495217",
"0.54888666",
"0.54844296",
"0.5480872",
"0.5462804",
"0.5459212",
"0.54550815",
"0.5450929",
"0.54414266",
"0.54389584",
"0.54376644",
"0.54352736",
"0.54330534",
"0.5428352",
"0.5423099",
"0.5420626",
"0.54088694",
"0.5406263",
"0.539884",
"0.53942037",
"0.53939027",
"0.5389376"
]
| 0.71766853 | 2 |
A timePassed method for the ScoreIndicator because he implements Sprite. Currently we do nothing with this method. | @Override
public void timePassed() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void timePassed() {\r\n }",
"public void timePassed() {\r\n }",
"@Override\r\n public void timePassed() {\r\n }",
"public void timePassed() {\r\n\r\n }",
"public void timePassed() { }",
"public void timePassed() {\n }",
"public void timePassed() {\n }",
"@Override\r\n public void timePassed(double dt) {\r\n\r\n }",
"@Override\r\n public void timePassed(double dt) {\r\n\r\n }",
"public void act() \n {\n updateTimerDisplay();\n if(timeCounter < 3600){\n timeCounter++;\n \n }else{\n timeElapsed++;\n timeCounter = 0;\n }\n checkHighScore();\n checkRegScore();\n\n }",
"public void timePassed(double dt) {\r\n // Currently- nothing\r\n }",
"@Override\r\n public void timePassed(double dt) {\r\n return;\r\n }",
"public void timePassed() {\n this.moveOneStep();\n }",
"@Override\n\t\t\tpublic void onTimePassed(TimerHandler pUpdateHandler) {\n\t\t\t\tDebug.e(\"Time pass\");\n\t\t\t\ttempScore += ScoreConstants.UNIT_SCORE;\n\t\t\t\tmScoreText.setText(tempScore + \"\");\n\t\t\t\tmScoreText.setX((mPanel.getWidth() - mScoreText.getWidth()) * 0.5f);\n\t\t\t\tif(tempScore >= GameScoreManager.getInstance().getTotalScore()){\n\t\t\t\t\tmScoreText.setText(GameScoreManager.getInstance().getTotalScore() + \"\");\n\t\t\t\t\tSfxManager.getInstance().stopSlotMachineSound();\n\t\t\t\t\tSfxManager.getInstance().playLevelClearedSound();\n\t\t\t\t\tResourceManager.getInstance().getBaseGameActivity().getEngine().unregisterUpdateHandler(pUpdateHandler);\n\t\t\t\t}\n\t\t\t}",
"public void timePassed(double dt) {\n\n }",
"public void timePassed(double dt) {\n\n }",
"public void timePassed() {\n if (keyboard.isPressed(KeyboardSensor.LEFT_KEY) && keyboard.isPressed(KeyboardSensor.RIGHT_KEY)) {\n return;\n } else if (keyboard.isPressed(KeyboardSensor.LEFT_KEY)) {\n moveLeft();\n\n } else if (keyboard.isPressed(KeyboardSensor.RIGHT_KEY)) {\n moveRight();\n }\n }",
"public void incrementTimesPlayed() {\r\n\t\ttimesPlayed++;\r\n\t}",
"public void notifyAllTimePassed() {\r\n // Make a copy of the Sprites before iterating over them.\r\n List<Sprite> spritesCopy = new ArrayList<Sprite>(this.sprites);\r\n for (Sprite s : spritesCopy) {\r\n s.timePassed();\r\n }\r\n }",
"@Override\n\tpublic void checkScore() {\n\t\t\n\t}",
"public static void incrementScore() {\n\t\tscore++;\n\t}",
"public void act()\n {\n trackTime();\n showScore();\n \n }",
"public int getSecondsPassed()\n {\n return this.seconds;\n }",
"public void act() \n {\n if (scoreCounter > 0){\n scoreCounter--;\n }\n \n if (scoreCounter == 0){\n addScore(1);\n scoreCounter = scoreCooldown;\n }\n }",
"@Override\n public void timerTicked() {\n //subtracts one second from the timer of the current team\n if(state.getCurrentTeamsTurn() == Team.RED_TEAM) {\n state.setRedTeamSeconds(state.getRedTeamSeconds() - 1);\n } else {\n state.setBlueTeamSeconds(state.getBlueTeamSeconds() - 1);\n }\n }",
"public void updateScoreSeconds(long secondsLeft) {\n\t\tscore = (int) (score + (secondsLeft * VALUE_SECOND));\n\t}",
"public void checkRegScore(){\n currentSecond = timeCounter / 60;\n currentMinute = timeElapsed;\n }",
"@Override\n public void timePassed() {\n moveOneStep();\n }",
"public void HowMuchTimeLeft() {\n\t\tTimeLeft = Count.HowMuchTimeLeft();\n\t}",
"public void timePasses(){\n crtClock++;\n if(crtClock==25)crtClock=1; // If end of day, reset to 1\n if(crtClock<=opHours)tellMeterToConsumeUnits(unitsPerHr);\n }",
"public void checkScore() {\n\t\tif (this.score != 0 && this.score % 5000 == 0\n\t\t\t\t&& this.life < this.MAX_LIFE) {\n\t\t\tthis.life++;\n\t\t}\n\t}",
"public void ComputeScoreAndDelay(int AddedScore) {\n System.out.println(UnpressPercent);\n if(UnpressPercent != null && UnpressPercent>1.0) System.out.println(\"PERCENT ABOVE 1.0\");\n \n score+=AddedScore;\n \n int high_score = high_score_label.getText().length() > 0 ?\n\t\tInteger.parseInt(high_score_label.getText()) : 0;\n if(score > high_score)\n\t\thigh_score_label.setText(\"\" + score);\n\t \n //long delay=1000; // should probably make this set in parameters at some point\n \n long delay = PersistentDelay;\n \n // speed and level code based on section 5.9 and 5.10 of Colin Fahey's Tetris article\n // www.colinfahey.com/tetris/tetris.html\n \n // speed is equivalent to level number\n // delay is the amount of time it takes for a zoid to drop one level\n // score is the current number of points the player has\n \n //speed = (long) Math.max(Math.min(Math.floor(score/100.0),Parameters.MaxLevels),0);\n /*\n if(Adaptive_Delay_Mode==null){\n int minD = Parameters.MinimumDelayMilliseconds;\n int maxD = 1000; // maximum delay is set to 1000 milliseconds for now\n \n delay = (long) ((maxD-minD)*(1.0-1.0*speed/Parameters.MaxLevels)+minD);\n }\n if(Adaptive_Delay_Mode==\"BOUNDED\"){\n delay = DelayFromUnpressPercentBounds(PersistentDelay,UnpressPercent,AdaptiveFallSpeedLowerBound,AdaptiveFallSpeedUpperBound);\n PersistentDelay=delay;\n }\n else if(Adaptive_Delay_Mode==\"Linear\"){\n delay = DelayDromUnpressPercentLinear(PersistentDelay,UnpressPercent);\n PersistentDelay=delay;\n }\n */\n //W(\"speed/Parameters.MaxLevels\"+(1.0-1.0*speed/Parameters.MaxLevels));\n \n \n if (old_speed != speed){\n TimeInLevel = (System.nanoTime() - StartTimeInLevel)/1000000000.0;\n W(\"old_speed:\"+(int)old_speed);\n TimeInLevelList.get((int)old_speed).add(TimeInLevel);\n //DisplayTimeInLevelList(TimeInLevelList);\n StartTimeInLevel = System.nanoTime();\n }\n \n// \n\n /*\n control system console logging\n W(\"\\nLEVEL: \"+speed);\n W(\"DELAY: \"+delay);\n W(\"KEY %: \"+UnpressPercent);\n W(\"SCORE: \"+score);\n */\n\n\n old_speed = speed;\n \n score_label.setText(\"\"+score);\n speed_label.setText(\"\"+speed);\n level_duration_label.setText(\"\"+TimeInLevel);\n timer.setDelay(delay);\n \n }",
"public void addScore()\n {\n score += 1;\n }",
"public void timePassed() {\nreturn;\n}",
"int time()\n\t{\n\t\treturn totalTick;\n\t}",
"@Override\n\tpublic int compareTo(Score s) {\n\t\treturn totalSecs - s.totalSecs;\n\t}",
"public static long getTotalHitTime() {\r\n return _time;\r\n }",
"public static void increaseDifficaulty() {\r\n\t\tif (Enemy._timerTicker > 5)\r\n\t\t\tEnemy._timerTicker -= 2;\r\n\t\tif (Player._timerTicker < 100)\r\n\t\t\tPlayer._timerTicker += 2;\r\n\t}",
"private void startEnterScore(Integer time)\n\t{\n\t\tFrameEnd.getInstance();\n\t\tFrameEnd.setTime(time);\n\t\tFrameEnd.runFrameEnd(null);\n\t}",
"public int timePassed() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e4 in method: android.widget.OppoScroller.timePassed():int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.widget.OppoScroller.timePassed():int\");\n }",
"protected void timerTicked() {\n\t\t// 5% of the time, increment or decrement the counter\n\t\tif (Math.random() >= 0.05) return; // do nothing 95% of the time\n\n\t\t// \"flip a coin\" to determine whether to increment or decrement\n\t\tboolean move = Math.random() >= 0.5;\n\t\t\n\t\t// send the move-action to the game\n\t\tgame.sendAction(new CounterMoveAction(this, move));\n\t}",
"public int score(){\r\n\t\t//to be implemented: should return game score \r\n\t\tfor(int i=0; i<10; i++)\r\n\t\t{\r\n\t\t\tscore= frames.get(i).score();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn score + bonusGame;\r\n\t}",
"public void addHighscore(String name, int shotsFired, int timePassed) {\r\n\t\t//TODO\r\n\t}",
"public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }",
"void advance() {\n myGameTicks--;\n myScore += myManager.advance(myGameTicks);\n if (myGameTicks == 0) {\n setGameOver();\n }\n // paint the display\n try {\n paint(getGraphics());\n flushGraphics();\n } catch (Exception e) {\n myJump.errorMsg(e);\n }\n }",
"void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }",
"public void rightScored()\n\t{\n\t\tscoreR++;\n\t}",
"long getScore();",
"long getScore();",
"long getScore();",
"long getScore();",
"@Test\n\tpublic void testStrikeCountsNextFrameScores() {\n\t\tScoresheet s = new Scoresheet();\n\t\ts.currentFrame = 1;\n\t\ts.addThrow(10);\n\t\ts.addThrow(6);\n\t\tassertEquals(s.addScore(), 22);\n\t}",
"public void countHits() {\nif (this.hitpoints <= 0) {\nreturn;\n}\nthis.hitpoints = this.hitpoints - 1;\n}",
"@Override\r\n\tpublic void gameLoopLogic(double time) {\n\r\n\t}",
"private int calTimeScore(SlidingBoardManager slidingBoardManager) {\n double time = slidingBoardManager.getTime();\n\n return (int) Math.round((100 - time / 15));\n\n }",
"@Override\n\t\t\tpublic void handle(long now) {\n\t\t\t\tif (now > lastTimeCall + 1_000_000_001) {\n\t\t\t\t\tduration = duration.subtract(Duration.seconds(1));\n\n\t\t\t\t\tint remainingSeconds = (int) duration.toSeconds();\n\t\t\t\t\tint min = (remainingSeconds) / SECONDS_PER_MINUTE;\n\t\t\t\t\tint sec = (remainingSeconds) % SECONDS_PER_MINUTE;\n\n\t\t\t\t\tif (min == 0 && sec == 0) {\n\t\t\t\t\t\ttimer.stop();\n\t\t\t\t\t\tgameStage.hide();\n\t\t\t\t\t\tGameController.gameBgm.stop();\n\t\t\t\t\t\tSystem.out.println(\"Times up\");\n\t\t\t\t\t\t// show final score\n\t\t\t\t\t\t//TimesUpSubScene timesUp = new TimesUpSubScene();\n\n\n\t\t\t\t\t}\n\t\t\t\t\ttimerLabel.textProperty().setValue(String.format(\"%02d\", min) + \" : \" + String.format(\"%02d\", sec));\n\t\t\t\t\tlastTimeCall = now;\n\t\t\t\t}\n\n\t\t\t}",
"public void calculateScore() {\n\n turnScore();\n\n if (turn == 1) {\n p1.setScore(p1.getScore() - turnScore);\n\n } else if (turn == 2) {\n p2.setScore(p2.getScore() - turnScore);\n\n }\n\n\n }",
"public void time(){\n\t\tif(paused){\n\t\t\tpaused = false;\n\t\t\tmusic.play();\n\t\t\tstart = System.nanoTime();\n\t\t} else {\n\t\t\telasped += System.nanoTime() - start;\n\t\t\tstart = System.nanoTime();\n\t\t}\n\t\ttime = (double) elasped/ (double) 1000000000l;\n\t\t//System.out.println(time);\n\t}",
"public void addOneToScore() {\r\n score++;\r\n }",
"@Override\n\tpublic void visitingTeamScored(int points) {\n\t\t\n\t}",
"public void trackTime()\n {\n frames += 1;\n\n // Every second (roughly) reduce the time left\n if (frames % 60 == 0)\n {\n time += 1;\n showTime();\n }\n }",
"@Override\n\t\tpublic final double time() throws Throwable {\n\t\t\tinit();\n\t\t\ttimer.lap();\n\t\t\ttimed();\n\t\t\tdouble time = timer.lap();\n\t\t\tcleanup();\n\t\t\treturn time;\n\t\t}",
"@Test\r\n public void calculateScore() {\r\n board3.swapTiles(0,0,1,1);\r\n board3.getSlidingScoreBoard().setTime(2);\r\n board3.getSlidingScoreBoard().calculateScore();\r\n assertEquals(496, board3.getSlidingScoreBoard().getScore());\r\n }",
"public void drawScore(Graphics art)\n\t{\n\t\tart.setColor(Color.black);\n\t\tart.drawString(\"Score =\"+score, 50, 50);\n\t\tif(score >= 20)\n\t\t{\n\t\t\tplayGame = false;\n\t\t}\n\t}",
"@Override\n\tprotected int calculateScore() {\n\t\treturn Math.abs(playerScore[0] - playerScore[1]);\n\t}",
"void win() {\n String name = score.getName();\n if (Time.getSecondsPassed() < 1) {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / 1);\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + 1 + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n } else {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / Time.getSecondsPassed());\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + Time.getSecondsPassed() + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n }\n }",
"public abstract float getScore();",
"private void countTime()\n {\n time--;\n showTime();\n if (time == 0)\n {\n showEndMessage();\n Greenfoot.stop();\n }\n }",
"public void hitAlienScore() {\r\n //Add 5 to the score\r\n score += 5;\r\n System.out.println(\"Current Score = \"+score);\r\n }",
"@Override\n\tpublic void homeTeamScored(int points) {\n\t\t\n\t}",
"@Override\r\n public void update(long timePassed) {\n\r\n }",
"private void drawScore() {\n\t\tString score = myWorld.getScore() + \"\";\n\n\t\t// Draw shadow first\n\t\tAssetLoader.shadow.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length()), 12);\n\t\t// Draw text\n\t\tAssetLoader.font.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length() - 1), 11);\n\n\t}",
"public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }",
"@Override\n\tpublic void onTickInGame() {\n\t\tticksExisted += 1;\n\t}",
"public void shotShip() {\r\n score -= 20;\r\n System.out.println(\"Current Score = \"+score);\r\n }",
"public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }",
"private static void updateGame()\n {\n GameView.gameStatus.setText(\"Score: \" + computerScore + \"-\" + playerScore);\n if (computerScore + playerScore == NUM_CARDS_PER_HAND) {\n if (computerScore > playerScore) {\n GameView.gameText.setText(\"Computer Wins!\");\n Timer.stop = true;\n }\n else if (playerScore > computerScore) {\n GameView.gameText.setText(\"You win!\");\n Timer.stop = true;\n }\n else {\n GameView.gameText.setText(\"Tie game!\"); \n Timer.stop = true;\n }\n }\n }",
"public static void calculateScore(){\n boolean gameOver = false;\n int score = 3000;\n int levelCompleted = 8;\n int bonus = 200;\n\n System.out.println(\"Running method calculateScore: \");\n\n if(score < 4000){\n int finalScore = score + (levelCompleted*bonus);\n System.out.println(\"Your final score = \" + finalScore);\n }else{\n System.out.println(\"The game is still on\");\n }\n\n System.out.println(\"Exit method calculateScore--\\n\");\n }",
"public void incrementDeathTicks() {\n this.deathTicks++;\n }",
"private void checkScore() {\n // Score is made\n if ((this.ball.getX() < 0) || (this.ball.getX() > getWidth())) {\n // Play R.raw.bleep\n soundPool.play(soundIds[1], 1, 1, 1, 0, 1);\n\n this.touchEnabled = false;\n this.pongThread = new GameThread(this, getHolder(), true);\n\n // Right scores\n if (this.ball.getX() < 0) {\n this.scoreR.update();\n // Left scores\n } else if (this.ball.getX() > getWidth()) {\n this.scoreL.update();\n }\n\n // Reset positions of sprites\n this.paddleL.setX(PADDLE_WALL_DIST);\n this.paddleL.setY(getHeight()/2 - PADDLE_HEIGHT);\n this.paddleR.setX(getWidth() - PADDLE_WALL_DIST - PADDLE_WIDTH);\n this.paddleR.setY(getHeight()/2 - PADDLE_HEIGHT);\n this.ball.setX(getWidth()/2 - 16 - BALL_DIAMETER/2);\n this.ball.setY(getHeight()/2 - BALL_DIAMETER /2);\n this.ball.setEnabled(false);\n this.fakeBall.setX(getWidth()/2 - 16 - BALL_DIAMETER/2);\n this.fakeBall.setY(getHeight()/2 - BALL_DIAMETER /2);\n this.fakeBall.setEnabled(false);\n\n checkWin();\n }\n }",
"@Test\r\n\tpublic void incrementScoretest() \r\n\t{\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(1, scoreBehavior.score());\r\n\t\t\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(2, scoreBehavior.score());\r\n\t}",
"public void act() \n {\n\n if(isTouching(Car.class))\n {\n Lap = Lap + 1;\n if ((Lap % 11) == 0)\n {\n String lap = Integer.toString(Lap / 11);\n\n getWorld().showText(lap, 450, 30);\n getWorld().showText(\"Lap:\", 400, 30);\n }\n } \n if (Lap == 47)\n {\n Greenfoot.stop();\n getWorld().showText(\"GameOver\",250,250);\n }\n }",
"public void Update(double elapsedTime){\n }",
"public void timePassed(double dt) {\r\n this.moveOneStep(dt);\r\n }",
"@Override\npublic void update(int score) {\n\t\n}",
"public void incGamesPlayed() {\n gamesPlayed++;\n }",
"private void processScore(long time) {\r\n String oldScore = myDb.getSquirtleScore(user);\r\n if (oldScore.equals(\"-1\")) {\r\n myDb.setSquirtleScore(user, Integer.toString(score));\r\n String message = \"Oh no, you killed Squirtle! You set a personal record of \" +\r\n Integer.toString(score) + \" points. You survived for \" + String.valueOf(time) + \" seconds. Check the PERSONAL RECORDS to see your updated score!\";\r\n showMessage(\"Game Over!\", message, this);\r\n } else if (score < Integer.valueOf(oldScore)) {\r\n String message = \"Oh no, you killed Squirtle! Unfortunately your score of \" +\r\n Integer.toString(score) + \" did not beat your record of \" + myDb.getSquirtleScore(user) +\r\n \" points.\" + \" You survived for \" + String.valueOf(time) + \" seconds. \" + \"Better luck next time!\";\r\n showMessage(\"Game Over!\", message, this);\r\n } else {\r\n myDb.setSquirtleScore(user, Integer.toString(score));\r\n String message = \"Oh no, you killed Squirtle! You set a new personal record of \" +\r\n Integer.toString(score) + \" points, beating your previous record of \" + oldScore +\r\n \" points. You survived for \" + String.valueOf(time) + \" seconds. Check the PERSONAL RECORDS to see your updated score!\";\r\n showMessage(\"Game Over!\", message, this);\r\n }\r\n\r\n }",
"public void tick(){\r\n if(timer != 0)\r\n timer++;\r\n }",
"public void countScore(int score)\n {\n scoreCounter.add(score);\n }",
"public void timePasses() {\r\n\t\tfor(Meter a: appMeters){\r\n\t\t\t//incremnts electric use each timepPasses as the fridge is always on\r\n\t\t\tif (a.getType().equals(\"Electric\")){\r\n\t\t\t\ta.incrementConsumed();\r\n\t\t}\r\n\t}\r\n\t}",
"public abstract float getSecondsPerUpdate();",
"float getScore();",
"float getScore();",
"public ScoreIndicator(Counter score) {\r\n this.score = score;\r\n }",
"double getHitRate();",
"double getHitRate();",
"public void tick()\n {\n \n move();\n if(redShellOn)\n moveShell();\n timer += .1;\n \n //adjusts the time based on the difficulty level\n if(!pause)\n {\n if(difficult.equals(\"EASY\"))\n {\n if(lastpowerUp.equals(\"RAINBOW\") && powerupTimer > 0) \n {\n timer2 += .045;\n powerupTimer -=.045;\n }\n else\n {\n timer2 += .067;\n if(powerupTimer > 0)\n {\n powerupTimer -= .067;\n }\n }\n }\n else if(modeT)\n {\n if(snakeOnDot() || wideSnakeOnDot())\n {\n tempScore = timer2;\n }\n if(!((lastpowerUp.equals(\"RAINBOW\")||lastpowerUp.equals(\"CRYSTAL\")) && powerupTimer>0))\n timer2 -= .025;\n //add here\n \n //System.out.println(\"Temp score: \" + tempScore + \"\\nTimer2: \" + timer2 + \"\\n\");\n if(tempScore -10 +3 < timer2)\n timer3 +=.025;\n if(lastpowerUp.equals(\"DOUBLE\") && powerupTimer > 0)\n {\n if(tempScore -20 + 6 < timer2)\n timer3 += .025;\n }\n if(powerupTimer > 0)\n {\n powerupTimer -= .025;\n }\n }\n else if(difficult.equals(\"MEDIUM\")||difficult.equals(\"GHOST\")|| difficult.equals(\"TROLL\"))\n {\n timer2 += .045;\n if(powerupTimer > 0)\n {\n powerupTimer -= .045;\n }\n }\n else if(difficult.equals(\"HARD\"))\n {\n timer2 += .03;\n if(powerupTimer > 0)\n {\n powerupTimer -= .03;\n }\n }\n else if(difficult.equals(\"YOU WILL NOT SURVIVE\"))\n {\n timer2 += .01;\n if(powerupTimer > 0)\n {\n powerupTimer -= .01;\n }\n }\n \n \n } \n }",
"public void run() {\n\t \tif(ScorePanel.getScore() == 100){\r\n\t \t\ttimer.cancel();\r\n\t \t}\r\n\t \t//se o Tempo se esgotar, é game over!!!\r\n\t \telse if (tempo == 0){\r\n\t \t timer.cancel();\r\n \t\tAvatar.noMotion();\r\n \t\t//System.exit(0);\r\n\t }\r\n\t \t//Senão, vai contando\r\n\t \telse{\r\n\t \tlbltimer.setText(\"Tempo: \"+ --tempo);\r\n\t }\r\n\t }",
"@Override\n\tpublic void loadScore() {\n\n\t}",
"public double getAnimationSeconds()\n\t{\n\t\treturn seconds_passed;\n\t}"
]
| [
"0.73287153",
"0.73287153",
"0.72776544",
"0.7265213",
"0.72493434",
"0.7157145",
"0.7157145",
"0.7071743",
"0.7071743",
"0.683316",
"0.6747915",
"0.6693586",
"0.6647395",
"0.6630172",
"0.66077673",
"0.66077673",
"0.64873147",
"0.6438254",
"0.6427134",
"0.63461846",
"0.6252348",
"0.62486285",
"0.6198848",
"0.61685514",
"0.61591953",
"0.6121101",
"0.61180556",
"0.61171067",
"0.6112259",
"0.6104427",
"0.6088703",
"0.6064337",
"0.60518515",
"0.60513675",
"0.60513437",
"0.60014534",
"0.5997277",
"0.5996843",
"0.59873503",
"0.59592766",
"0.5925026",
"0.58767456",
"0.58767325",
"0.58683527",
"0.5866403",
"0.584926",
"0.58410937",
"0.5836517",
"0.5836517",
"0.5836517",
"0.5836517",
"0.5828022",
"0.57996494",
"0.57963336",
"0.5795074",
"0.57934564",
"0.57886463",
"0.5781639",
"0.5773339",
"0.5771247",
"0.57551205",
"0.5749855",
"0.57457316",
"0.5740111",
"0.5735054",
"0.5732204",
"0.5727909",
"0.5726943",
"0.5723081",
"0.57229346",
"0.5712222",
"0.571106",
"0.57106",
"0.5710411",
"0.5709918",
"0.5702811",
"0.5697821",
"0.56918895",
"0.56908584",
"0.5680322",
"0.56752264",
"0.5660503",
"0.56557006",
"0.5653911",
"0.5652415",
"0.56510735",
"0.5648961",
"0.5645182",
"0.5639482",
"0.56340164",
"0.56262475",
"0.5625321",
"0.5625321",
"0.5620876",
"0.56175935",
"0.56175935",
"0.56102276",
"0.56052345",
"0.5604533",
"0.56031764"
]
| 0.7200361 | 5 |
Add the score indicator to the sprites list of the given game. | public void addToGame(GameLevel g) {
g.addSprite(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addTestScore(int score){\n test_score.add(test_count,score);\n test_count++;\n }",
"public void addScore(int score);",
"public void addScore(){\n\n // ong nuoc 1\n if(birdS.getX() == waterPipeS.getX1() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX1() + 50){\n score++;\n bl = false;\n }\n\n //ong nuoc 2\n if(birdS.getX() == waterPipeS.getX2() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX2() + 50){\n score++;\n bl = false;\n }\n\n // ong nuoc 3\n if(birdS.getX() == waterPipeS.getX3() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX3() + 50){\n score++;\n bl = false;\n }\n\n }",
"public void addScore(int score) {\n currentScore += score;\n }",
"public void addToScore(int score)\n {\n this.score += score;\n }",
"public void addScore(String name, int score) {\n loadScoreFile();\n scores.add(new Score(name, score));\n updateScoreFile();\n }",
"public static void addScore(int _value){\n scoreCount += _value;\n scoreHUD.setText(String.format(Locale.getDefault(),\"%06d\", scoreCount));\n }",
"public void addScore()\n {\n score += 1;\n }",
"public void loadScore() {\n for (int i = 0; i < 4; i++) {\n int[] enemyTankNum = CollisionUtility.getEnemyTankNum();\n tankNumList[i] = enemyTankNum[i];\n }\n for (int i = 0; i < 4; i++) {\n tankScoreList[i] = tankNumList[i] * 100 * (i + 1);\n }\n for (Integer score : tankScoreList) {\n totalScore += score;\n }\n for (Integer num : tankNumList) {\n totalTankNum += num;\n }\n }",
"public void setScores(ArrayList<Integer> scores) { this.scores = scores; }",
"public void countScore(int score)\n {\n scoreCounter.add(score);\n }",
"public final void addScore(int iScore) {\n\t\tscore += iScore;\n\t}",
"public int score(){\r\n\t\t//to be implemented: should return game score \r\n\t\tfor(int i=0; i<10; i++)\r\n\t\t{\r\n\t\t\tscore= frames.get(i).score();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn score + bonusGame;\r\n\t}",
"public void addScore(int s) {\n setScore(getScore() + s);\n }",
"@Override\n public void addToGame(GameLevel g) {\n if (g != null) {\n g.addSprite(this);\n g.getBallCounter().increase(1);\n }\n }",
"public void addScore(Pair<String, Integer> score) {\n if (!this.list.isPresent()) {\n this.readScores();\n }\n final List<Pair<String, Integer>> list = this.list.get();\n list.add(score);\n this.sortScores(list);\n this.cutScores(list);\n this.list = Optional.of(list);\n\n this.toSave = true;\n }",
"public void addScore(int score, String name){\n for(int i = 0; i < topScores.size(); i++) {\n if(score >= topScores.get(i)){\n topScores.add(i, score);\n topScores.remove(topScores.size()-1);\n if(name.isEmpty()){\n topName.add(i, \"Anonymous\");\n topName.remove(topName.size()-1);\n }else {\n topName.add(i, name);\n topName.remove(topName.size() - 1);\n }\n return;\n }\n }\n }",
"protected void addScoreToLeaderboard() {\n\n\t\tif (onlineLeaderboard) {\n\t\t jsonFunctions = new JSONFunctions();\n\t\t jsonFunctions.setUploadScore(score);\n\t\t \n\t\t Handler handler = new Handler() {\n\t\t\t @Override\n\t\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\t @SuppressWarnings(\"unchecked\")\n\t\t\t\t ArrayList<Score> s = (ArrayList<Score>) msg.obj;\n\t\t\t\t globalScores = helper.sortScores(s);\n\t\t\t }\n\t\t };\n\t\t \n\t\t jsonFunctions.setHandler(handler);\n\t\t jsonFunctions\n\t\t\t .execute(\"http://brockcoscbrickbreakerleaderboard.web44.net/\");\n\t\t}\n\t\tsaveHighScore();\n }",
"private void renderGuiScore(SpriteBatch batch)\n {\n float x = -15;\n float y = -15;\n float offsetX = 50;\n float offsetY = 50;\n \n /*\n if(worldController.scoreVisual < worldController.score)\n {\n long shakeAlpha = System.currentTimeMillis() % 360;\n float shakeDist = 1.5f;\n offsetX += MathUtils.sinDeg(shakeAlpha * 2.2f) * shakeDist;\n offsetY += MathUtils.sinDeg(shakeAlpha * 2.9f) * shakeDist;\n }*/\n \n batch.draw(Assets.instance.candy.candycorn, x, y, 50, 50, 100, 100, 0.35f, -0.35f, 0);\n Assets.instance.fonts.defaultBig.draw(batch, \"\" + worldController.score, x + 75, y + 37);\n }",
"private void addIndicators() {\r\n ScoreIndicator scoreIndicator = new ScoreIndicator(this.score);\r\n scoreIndicator.addToGame(this);\r\n LivesIndicator livesIndicator = new LivesIndicator(this.numberOfLives);\r\n livesIndicator.addToGame(this);\r\n NameLevelIndicator nameLevel = new NameLevelIndicator(info);\r\n nameLevel.addToGame(this);\r\n }",
"public void addGameScore(String gameArea, GameScore score)\r\n\t{\r\n\t\tif(gameArea.toLowerCase().equals(\"fireworks\"))\r\n\t\t{\r\n\t\t\tgameFireworks.addGameScore(score);\r\n\t\t}\r\n\t\telse if(gameArea.toLowerCase().equals(\"pirates\"))\r\n\t\t{\r\n\t\t\t//gamePirates.addGameScore(score);\r\n\t\t}\r\n\t}",
"public void add_to_score(int num){\n score+=num;\n }",
"@Override\r\n public void addToGame(GameLevel g) {\r\n g.addSprite(this);\r\n }",
"public void updateScore() {\n\t\tif (pellet.overlapsWith(avatar)) {\n\t\t\tavatar.addScore(1);\n\t\t\tpellet.removePellet(avatar.getLocation());\n\t\t\tSystem.out.println(\"collected pellet\");\n\t\t}\n\t}",
"private void scoreToImage(int score, int x, int y, Graphics g) {\r\n\t\tswitch (score) {\r\n\t\tcase 0:\r\n\t\t\tg.drawImage(num_0, x, y, gameView);\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tg.drawImage(num_1, x, y, gameView);\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tg.drawImage(num_2, x, y, gameView);\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tg.drawImage(num_3, x, y, gameView);\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tg.drawImage(num_4, x, y, gameView);\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tg.drawImage(num_5, x, y, gameView);\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tg.drawImage(num_6, x, y, gameView);\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tg.drawImage(num_7, x, y, gameView);\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tg.drawImage(num_8, x, y, gameView);\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\t\tg.drawImage(num_9, x, y, gameView);\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tg.drawImage(num_1, x - 10, y, gameView);\r\n\t\t\tg.drawImage(num_0, x + 15, y, gameView);\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tg.drawImage(num_1, x - 10, y, gameView);\r\n\t\t\tg.drawImage(num_1, x + 15, y, gameView);\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tg.drawImage(num_1, x - 10, y, gameView);\r\n\t\t\tg.drawImage(num_2, x + 15, y, gameView);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"private void drawScore() {\n\t\tString score = myWorld.getScore() + \"\";\n\n\t\t// Draw shadow first\n\t\tAssetLoader.shadow.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length()), 12);\n\t\t// Draw text\n\t\tAssetLoader.font.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length() - 1), 11);\n\n\t}",
"public void addOneToScore() {\r\n score++;\r\n }",
"private void renderGuiScore (SpriteBatch batch) \n\t{\n\t\t//float x = -15;\n\t\t//float y = -15;\n\t\t//batch.draw(Assets.instance.goldCoin.goldCoin, x, y, 50, 50, 100,\n\t\t//\t\t100, 0.35f, -0.35f, 0);\n\t\t//Assets.instance.fonts.defaultBig.draw(batch, \"\" + worldController.score,\n\t\t//\t\tx + 75, y + 37);\n\t\t\n\t\tfloat x = -15;\n\t\tfloat y = -15;\n\t\tfloat offsetX = 50;\n\t\tfloat offsetY = 50;\n\t\tif (worldController.scoreVisual<worldController.score) \n\t\t{\n\t\t long shakeAlpha = System.currentTimeMillis() % 360;\n\t\t float shakeDist = 1.5f;\n\t\t offsetX += MathUtils.sinDeg(shakeAlpha * 2.2f) * shakeDist;\n\t\t offsetY += MathUtils.sinDeg(shakeAlpha * 2.9f) * shakeDist;\n\t\t}\n\t\tbatch.draw(Assets.instance.goldCoin.goldCoin, x, y, offsetX,\n\t\toffsetY, 100, 100, 0.35f, -0.35f, 0);\n\t\tAssets.instance.fonts.defaultBig.draw(batch, \"\" + (int)worldController.scoreVisual, x + 75, y + 37);\n\t}",
"public void add(String nickname) {\n\t\tscoreboard.put(nickname, 0);\n\t}",
"public static void incrementScore() {\n\t\tscore++;\n\t}",
"@Override\n\tpublic void add(Game game) {\n\t\t\n\t}",
"void addGameScoreToMainScore(){\n sharedPreferences= PreferenceManager.getDefaultSharedPreferences(this);\n editor=sharedPreferences.edit();\n int score=sharedPreferences.getInt(\"gameScore\",0);\n score=score+userCoins;\n editor.putInt(\"gameScore\",score);\n editor.commit();\n\n }",
"public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}",
"void addPointsToScore(int points) {\n score += points;\n }",
"public void addToGame(GameLevel g) {\r\n g.addSprite(this);\r\n }",
"public void addToGame(GameLevel g) {\r\n g.addSprite(this);\r\n }",
"void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }",
"synchronized void addScore(String name, int score){\n\t\tif(!users.containsKey(name)){\n\t\t\tVector<Integer> scores = new Vector<Integer>();\n\t\t\tusers.put(name, scores);\n\t\t}\n\t\tusers.get(name).add(score);\n\t}",
"public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}",
"void addScore(double score){\n\t\tsumScore+=score;\n\t\tnumScores++;\n\t\taverage = sumScore/numScores;\n\t}",
"public void addToGame(GameLevel gameLevel) {\n gameLevel.addSprite(this);\n }",
"public void addToGame(GameLevel gameLevel) {\n gameLevel.addSprite(this);\n }",
"public synchronized void setScore(Integer score) {\n this.score += score;\n }",
"public void addScore(Double score) {\n this.scoreList.add(score);\n // each time a new score is added, sort it\n Collections.sort(scoreList, Collections.reverseOrder());\n }",
"public void addQuiz(int score) {\n\t\tif (score < 0 || score > 100) {\n\t\t\tscore = 0;\n\t\t}\n\t\telse {\n\t\t\ttotalScore = totalScore + score;\n\t\t\tquizCount++;\n\t\t}\n\t\t}",
"private void increaseScore() {\n this.game.getPlayers().values().forEach(ship -> {\n ship.increaseScore();\n if (ship.getScore() % 5 == 0) {\n this.asteroidsLimit++;\n }\n });\n }",
"public void addScore(int pointsToAdd) {\n\t\tthis.score = this.score + pointsToAdd;\n\t}",
"private void addPointsToPlayer(Player player, int marbleNum) {\n Long score = player.getScore();\n score += marbleNum;\n\n // add the score for the marble 7 places before\n Long value = (Long) placement.get(getMarbel7());\n score += value;\n\n player.setScore(score);\n }",
"@Test\n public void addScoreTest() {\n assertTrue(enemyGameBoard.getScore() == 0); //Check if initial value of points = 0\n\n enemyGameBoard.addScore(false, false); //Did not hit a ship\n assertTrue(enemyGameBoard.getScore() == 0);\n\n enemyGameBoard.addScore(true, false); //Hit a ship, but the ship did not sink\n assertTrue(enemyGameBoard.getScore() == 1); \n\n enemyGameBoard.addScore(false, false); //Did not hit a ship, so points should stay 1\n assertTrue(enemyGameBoard.getScore() == 1); \n\n enemyGameBoard.addScore(true, true); //Hit a ship, and ship has been sunk\n assertTrue(enemyGameBoard.getScore() == 3);\n\n enemyGameBoard.addScore(false, false); //Did not hit a ship, so points should stay 3 after a ship has been sunk\n assertTrue(enemyGameBoard.getScore() == 3);\n\n enemyGameBoard.addScore(false, true); //Did not hit a ship, but did sunk the ship. This should not add any points to the score\n assertTrue(enemyGameBoard.getScore() == 3);\n }",
"@Override\r\n\tpublic void add(Score s) throws IllegalArgumentException {\r\n\t\tif (s == null)\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\tscoreList[numItems] = s;\r\n\t\tnumItems++;\r\n\t}",
"public void incrementScore(int scoreToAdd) {\n this.score += scoreToAdd;\n }",
"public void setGameScore(Integer gameScore) {\n this.gameScore = gameScore;\n }",
"public void addScoreForTeamA(View v) {\n scoreTeamA += 1;\n updateText(scoreTeamA, v);\n }",
"public void setScore(int score) { this.score = score; }",
"public void addPoints(int earnedPoints) {score = score + earnedPoints;}",
"private void saveScore() {\n\t\tif (Serializer.deserialize(Main.SCORES_FILE)) {\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tArrayList<Integer> scores = (ArrayList<Integer>) Serializer\n\t\t\t\t\t.getRecovered();\n\n\t\t\tif (this.score > 0) {\n\t\t\t\tscores.add(this.score);\n\n\t\t\t\tSerializer.serialize(Main.SCORES_FILE, scores);\n\t\t\t}\n\t\t}\n\t}",
"public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }",
"public void addToGame(Game g) {\r\n g.addSprite(this);\r\n }",
"public void incrementScore(int val) {\n score += val;\n }",
"public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }",
"public void gameOver() {\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Game is over. Calculating points\");\r\n\t\tstatus = \"over\";\r\n\t\ttry {\r\n\t\t\tupdateBoard();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tupdateEvents(false);\r\n\t\tEmbedBuilder embed = new EmbedBuilder();\r\n\t\tembed.setTitle(\"Game Results\");\r\n\t\tMap<Integer, Integer> scores = new HashMap<Integer, Integer>();\r\n\t\t\r\n\t\tfor (int i = 0; i < players.size(); i++) {\r\n\t\t\tscores.put(i,players.get(i).calculatePoints());\r\n\t\t\t// Utils.getName(players.get(i).getPlayerID(),guild)\r\n\t\t}\r\n\t\t\r\n\t\tList<Entry<Integer, Integer>> sortedList = sortScores(scores);\r\n\t\t\r\n\t\t// If tied, add highest artifact values\r\n\t\tif ((playerCount > 1) && (sortedList.get(0).getValue().equals(sortedList.get(1).getValue()))) {\r\n\t\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Scores were tied\");\r\n\t\t\tint highestScore = sortedList.get(0).getValue();\r\n\t\t\tfor (Map.Entry<Integer, Integer> entry : sortedList) {\r\n\t\t\t\t// Only add artifacts to highest scores\r\n\t\t\t\tif (entry.getValue().equals(highestScore)) {\r\n\t\t\t\t\tscores.put(entry.getKey(),entry.getValue()+players.get(entry.getKey()).getHighestArtifactValue());\r\n\t\t\t\t\tplayers.get(entry.getKey()).setAddedArtifactValue(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Sort with added artifact values\r\n\t\tsortedList = sortScores(scores);\r\n\t\t\r\n\t\t// Assigns 1st, 2nd, 3rd\r\n\t\tfor (int i = 0; i < sortedList.size(); i++) {\r\n\t\t\tMap.Entry<Integer, Integer> entry = sortedList.get(i);\r\n\t\t\t// If tie, include artifact\r\n\t\t\tString name = Utils.getName(players.get(entry.getKey()).getPlayerID(),guild);\r\n\t\t\tif (players.get(entry.getKey()).getAddedArtifactValue()) {\r\n\t\t\t\tint artifactValue = players.get(entry.getKey()).getHighestArtifactValue();\r\n\t\t\t\tembed.addField(Utils.endGamePlaces[i],\"**\"+name+\"** - ``\"+(entry.getValue()-artifactValue)+\" (\"+artifactValue+\")``\",true);\r\n\t\t\t} else {\r\n\t\t\t\tembed.addField(Utils.endGamePlaces[i],\"**\"+name+\"** - ``\"+entry.getValue()+\"``\",true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tembed.setFooter(\"Credit to Renegade Game Studios\", null);\r\n\t\tgameChannel.sendMessage(embed.build()).queueAfter(dragonAttackingDelay+3000,TimeUnit.MILLISECONDS);\r\n\t\t\r\n\t\tGlobalVars.remove(this);\r\n\t}",
"public void calculateScores()\r\n {\r\n for(int i = 0; i < gameBoard.getBoardRows(); i++)\r\n for(int j = 0; j < gameBoard.getBoardCols(); j++)\r\n {\r\n if(gameBoard.tilePlayer(i,j) == 0)\r\n currentRedScore = currentRedScore + gameBoard.tileScore(i,j);\r\n if(gameBoard.tilePlayer(i,j) == 1)\r\n currentBlueScore = currentBlueScore + gameBoard.tileScore(i,j);\r\n }\r\n }",
"@Override\r\n public void addToGame(GameLevel g) {\r\n g.addSprite(this);\r\n g.addCollidable(this);\r\n }",
"public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }",
"public void addToScore(final int theScoreAddition) {\n this.myCurrentScoreInt += theScoreAddition;\n \n if (this.myCurrentScoreInt > this.myHighScoreInt) {\n this.myHighScoreInt = this.myCurrentScoreInt; \n this.persistHighScore();\n } \n }",
"public ScoreIndicator(Counter score) {\r\n this.score = score;\r\n }",
"public void addToScore(int points) {\n\t\tassert points >= 0 : \"Cannot add negative points\";\n\t\tscore += points;\n\t}",
"private void drawPlayer(Graphics g, Image playerImage){\n \n g.setColor(Color.WHITE);\n g.setFont(new Font(\"Arial\", Font.PLAIN, 20)); \n g.drawString(\"\"+player.getScore(),25,23);\n \n for(int i= 0; i<player.getLives(); i++){\n g.drawImage(lifeImage,600-i*30,5,this);\n }\n \n g.drawImage(playerImage, player.getX(), player.getY(), this); \n \n //Limit the players movement within the bound. Add score when moving\n \n if (key_down && player.getY()<620) {\n player.addY();\n player.addScore();\n }\n \n if (key_up && player.getY()>40) {\n player.subY();\n player.addScore();\n } \n \n if (key_right && player.getX()<650) {\n player.addX();\n player.addScore();\n }\n \n if (key_left && player.getX()>10) {\n player.subX();\n player.addScore();\n }\n \n moveCount++;\n repaint();\n \n }",
"private void updateSprites() {\n\t\tpaddle1.setX(paddle1X);\r\n\t\tpaddle1.setY(paddle1Y);\r\n\r\n\t\tpaddle2.setX(paddle2X);\r\n\t\tpaddle2.setY(paddle2Y);\r\n\r\n\t\tball.setX(ballX);\r\n\t\tball.setY(ballY);\r\n\r\n\t\tscore.setVisible(paused);\r\n\t}",
"public void addToScore(int id, int bonus){\n scores.set(id,scores.get(id) + bonus);\n }",
"public void addScore(int n){\n\t\tscore += n;\n\t}",
"public void setBonusScore() {\r\n count = count+50;\r\n }",
"private void affTabScore(int[] tabScore) {\r\n\t\tlbl_scoreJ1.setText(String.valueOf(tabScore[0]));\r\n\t\tlbl_scoreJ2.setText(String.valueOf(tabScore[1]));\r\n\t}",
"public void increase(String nickname) {\n\t\tint oldValue = this.getScore(nickname);\n\t\tscoreboard.replace(nickname, oldValue, oldValue + 1);\n\t}",
"public void updateScore()\n {\n nextPipe = pipes.get(score);\n if(CHARACTER_X > nextPipe.getPipeCapX() + 35)\n {\n score++;\n }\n if(score > highScore)\n {\n highScore = score;\n }\n }",
"private void sketchScore() {\r\n View.sketch(score, this.getSize().width + 15, 0);\r\n }",
"public void addQuiz(double score){\n quizzes.add(score);\n quizTotal += score;\n}",
"void onScoresChanged(int scores);",
"public void add_prev_rounds_score(int prevScore) {\n prev_rounds_score += prevScore;\n }",
"private void setPlayerScore(Player player, int newScore) {\n\t\tplayer.score = Math.max(newScore, 0);\n\t\tfor (ScoreMarker scoreMarker : playerScoreMarkers) {\n\t\t\tif (scoreMarker.getOwner() == player) {\n\t\t\t\tscoreMarker.value = String.valueOf(player.score);\n\t\t\t}\n\t\t}\n\t}",
"public void updateScoreboard() {\r\n \tif(parentActivity instanceof GameActivity) {\r\n \t\t((TextView)(((GameActivity)parentActivity).getScoreboard())).setText(\"\"+score);\r\n \t}\r\n }",
"void addScore(String sessionKey, Integer levelId, Integer score) throws SessionExpiredException;",
"public void setScore(int score) {this.score = score;}",
"public void score() {\n\t\tif (Integer.parseInt(px.getPosition()) != Integer.parseInt(getCurrentPositionX()))\n\t\t{\n\t\t\tpx.addObserver(Obsx);\n\t\t\tpx.setPosition(getCurrentPositionX());\n\t\t}\n\t\tif (Integer.parseInt(py.getPosition()) != Integer.parseInt(getCurrentPositionY()))\n\t\t{\n\t\t\tpy.addObserver(Obsy);\n\t\t\tpy.setPosition(getCurrentPositionY());\n\t\t}\n\t}",
"public ArrayList<Double> updateScores(int score){\n this.students.sort(Comparator.comparingDouble(Student::getScore).reversed());\n ArrayList<Double> scores = new ArrayList<>();\n for (Student s:this.students) {\n if(!s.getPlayer().getComponent(PlayerComponent.class).isDead()) s.setScore(s.getScore() + score);\n if (s.getScore() > this.globalBest) this.globalBest = s.getScore();\n scores.add(s.getScore());\n }\n return scores;\n }",
"public void addGames(String game) {\n this.games.add(game);\n }",
"public void addSprite(Sprite thisSprite) {\n\t\tthis.addList.add(thisSprite);\n\t\t\n\t}",
"public void addScoreToAthlete(Athlete athlete, int score) {\n for (Athlete a : getAllAthletes()) {\n if (athlete.getId() == a.getId()) {\n a.setScore(score);\n }\n }\n }",
"public void setScore(int score)\n {\n this.score = score;\n }",
"public void setVisibleScore(Group playerScore, int points) {\n playerScore.getChildren().clear();\n playerScore.getChildren().add(new NumberGroup(points));\n }",
"public void updateScores() {\n\t\tscoreText.setText(\"Score: \" + ultraland.getScore());\n\t}",
"public void shotShip() {\r\n score -= 20;\r\n System.out.println(\"Current Score = \"+score);\r\n }",
"public void setScore(int score) {\n this.score = score;\n }",
"public void updateScore(int score){ bot.updateScore(score); }",
"public void scoresForGameModes() {\r\n \tCalculateScore myScore = new CalculateScore();\r\n \tthis.score = myScore.giveScore();\r\n \tif (gamemode == 1) {\r\n \t\treturn;\r\n \t}\r\n \tif (gamemode ==2 ) {\r\n \t\tthis.score = this.score - (10 * (currentGraph.getCNumber() - set.size()));\r\n \t}\r\n \tif (gamemode ==3) {\r\n \t\tthis.score = this.score - (10 * (currentGraph.getCNumber() -set.size()));\r\n \t}\r\n }",
"public void updateHighscores(ArrayList<Player> tableContent) {\n // Add scores to table\n for (Player p : tableContent) {\n view.getHomePanel().getTableModel().addRow(playerToObjArray(p));\n }\n }",
"public void addHighscore(int i){\n highscores.add(i);\n sortHighscores();\n writeFile();\n }",
"public void addReview(double score){\n totalReviews++;\n totalScore += score;\n }"
]
| [
"0.63610196",
"0.6354216",
"0.62838274",
"0.6274573",
"0.61972994",
"0.61560446",
"0.6046679",
"0.5965584",
"0.58807415",
"0.58490443",
"0.5835675",
"0.5827471",
"0.58270675",
"0.5809972",
"0.5790714",
"0.5772608",
"0.5771409",
"0.57495093",
"0.57466346",
"0.573906",
"0.5736371",
"0.5736209",
"0.5731917",
"0.57311183",
"0.57293814",
"0.5703891",
"0.5692323",
"0.5649829",
"0.56379616",
"0.5588375",
"0.55805117",
"0.55795646",
"0.55492836",
"0.55461746",
"0.55451965",
"0.55451965",
"0.55439615",
"0.5543545",
"0.5525666",
"0.5519482",
"0.55104387",
"0.55104387",
"0.55088705",
"0.5501854",
"0.5501759",
"0.5500607",
"0.5498456",
"0.54871607",
"0.54797006",
"0.547902",
"0.54640234",
"0.5449378",
"0.54469395",
"0.5442205",
"0.5422861",
"0.54092556",
"0.5401387",
"0.53998655",
"0.5396574",
"0.5395882",
"0.5387198",
"0.5379395",
"0.53773457",
"0.5374221",
"0.5368574",
"0.53596807",
"0.53572416",
"0.53511864",
"0.53442085",
"0.5342427",
"0.5331761",
"0.5325977",
"0.5295622",
"0.52920103",
"0.5290595",
"0.52900743",
"0.5286386",
"0.5285277",
"0.52816594",
"0.5262985",
"0.5260288",
"0.52517545",
"0.52457315",
"0.52424055",
"0.52423954",
"0.52404314",
"0.5239728",
"0.5236881",
"0.52335405",
"0.522512",
"0.52198195",
"0.52138466",
"0.52125025",
"0.5204629",
"0.5198375",
"0.5198017",
"0.5196028",
"0.51956445"
]
| 0.55207396 | 41 |
Get Session und Request Attribute | @Override
public Optional<Response> handle(HandlerInput input) {
Map<String,Object> sessionAttribute = getSessionAttributes(input);
Intent requestIntent = ((IntentRequest) input.getRequestEnvelope().getRequest()).getIntent();
//Frage nach der Anzahl der Spieler
if((requestIntent.getSlots().get(Parameter.ANZAHL_SPIELER).getValue() == null || requestIntent.getSlots().get(Parameter.ANZAHL_SPIELER).getValue().equals("?")) && sessionAttribute.get(Parameter.ANZAHL_SPIELER) == null){
//if (requestIntent.getSlots().get(Parameter.ANZAHL_SPIELER).getValue() == null || requestIntent.getSlots().get(Parameter.ANZAHL_SPIELER).getValue().equals("?")) {
System.out.println("Ermittle Anzahl Spieler");
return frageAnzahlSpieler(input,requestIntent);
}
else {
System.out.println("SessionAttribute Zweig");
//Frage nach den Namen der Spieler
//Prüfe das sessionAttribut nicht leer ist
if(sessionAttribute.get(Parameter.SPIELER_NAMEN) != null){
System.out.println("Session Attribute nicht leer Zweig");
//Attribute auslesen
String neuerSpielerName = requestIntent.getSlots().get(Parameter.NEUER_SPIELER_NAME).getValue();
String spielerNamen[] = readPlayers(sessionAttribute);
int players = (int) sessionAttribute.get(Parameter.ANZAHL_SPIELER);
System.out.println("NeuerSpielerName: "+neuerSpielerName);
//Ermittle die Anzahl der ermittelnden Namen
int zaehleSpieler = zaehleSpieler(spielerNamen);
System.out.println("ZaehleSpieler = "+zaehleSpieler);
System.out.println("players = "+players);
//Prüfe ob es so viele Namen wie Spieler gibt
if (++zaehleSpieler < players){
System.out.println("ZahleSpieler != Players Zweig");
//Nummer des neuen Spielers ermitteln
int neuerSpieler = platzDesNeuenSpielersErmitteln(spielerNamen);
System.out.println("NeuerSpielerInt: "+neuerSpieler);
//Neuen Spieler an ersten zu findenden null Stelle hinzufügen
input = neuenSpielerHinzufuegen(spielerNamen,sessionAttribute,neuerSpielerName,input);
return frageSpielerNamen(input,neuerSpieler+2,requestIntent);
}
else if(zaehleSpieler==players){
System.out.println("ELSE Zweig ZahleSpieler != Players Zweig");
input = neuenSpielerHinzufuegen(spielerNamen,sessionAttribute,neuerSpielerName,input);
}
}
else {
System.out.println("Session Attribute leer Zweig");
//Wenn sessionAttribute leer sind
initialSessionAttribute(input,requestIntent,sessionAttribute);
return frageSpielerNamen(input,1,requestIntent);
}
}
sessionAttribute = setSpielcounter(sessionAttribute);
input.getAttributesManager().setSessionAttributes(sessionAttribute);
return ermittleNaechsteAktion(input,sessionAttribute);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(req.getSession().getAttribute(\"attr\"));\n\t\treq.getSession().setAttribute(\"attr\", req.getParameter(\"session\"));\n\t\tSystem.out.println(req.getSession().getAttribute(\"attr\"));\n\t}",
"public String getSession() {\n return this.session;\n }",
"public interface SessionAccess\n{\n /**\n * Returns the current session identifier.\n */\n String getSessionId();\n\n /**\n * Retrieves named attribute from the session\n *\n * @param name an attribute name\n * @return an attribute value stored in the session\n */\n Object getAttribute(String name);\n\n /**\n * Stores named attribute into the session\n *\n * @param name an attribute name\n * @param value an attribute value\n */\n void setAttribute(String name, Object value);\n}",
"public Object getSession(String attibuteName) {\n return servletRequest.getSession(true).getAttribute(attibuteName);\n }",
"public Object getProperty(String name) {\n HttpSession session = (HttpSession) _currentSession.get();\n if (session == null) {\n return null;\n }\n return session.getAttribute(name);\n }",
"private static String getSessionIDFromRequest (HTTPRequest aRequest)\n\t{\n\t\treturn aRequest.getQueryValue (\"sessionID\");\n\t}",
"public String getSession() {\n return session;\n }",
"protected Object getValFromSession(HttpSession session, String key) {\n if (session == null) {\n return null;\n }\n return session.getAttribute(key);\n }",
"Map<String, Object> getRequestContextLocalAttrs();",
"<T> T getSessionAttribute( String key );",
"String getAssociatedSession();",
"public HttpSession getHttpSession() {\n return servletRequest.getSession();\n }",
"public SessionInfo getSessionInfo() {\n\t\treturn sessionInfo;\n\t}",
"Session getCurrentSession();",
"Session getCurrentSession();",
"HttpServletRequest getCurrentRequest();",
"public static ApiSession getApiSession(HttpServletRequest request)\n {\n return (ApiSession) request.getSession().getAttribute(getSessionKey(request, Constants.SessionKeys.ApiSession));\n }",
"@Override\n\tpublic Object getAttribute(String appKey,String contextpath, String sessionID, String attribute,Session session) {\n\t\tString _attribute = SessionUtil.wraperAttributeName(appKey,contextpath, attribute);\n\t\tObject value = sessionStore.getAttribute(appKey, contextpath, sessionID, _attribute,session);\n\t\tif(session.isStoreReadAttributes() && value != null && readcanstore( value))\n\t\t\tsession.modifyAttribute(_attribute, value, ModifyValue.type_data, ModifyValue.type_read);\t\n\t\treturn value;\n\t}",
"protected String getUsernameFromSession(HttpServletRequest request) {\n\n\t\tHttpSession currentSession = request.getSession();\n\t\tif (currentSession.isNew())\n\t\t\treturn null;\n\n\t\treturn (String) currentSession.getAttribute(StringConstants.ATTRIBUTE_USERNAME_NAME);\n\n\t}",
"public Map getProperties() {\n HttpSession session = (HttpSession) _currentSession.get();\n if (session == null) {\n return new HashMap();\n }\n HashMap properties = new HashMap();\n Enumeration enuAttributes = session.getAttributeNames();\n while (enuAttributes.hasMoreElements()) {\n String nextAttribute = (String) enuAttributes.nextElement();\n Object value = session.getAttribute(nextAttribute);\n properties.put(nextAttribute, value);\n }\n return properties;\n }",
"public static String getKey(HttpServletRequest request){\r\n\t\t//String key=\"session_\"+request.getSession().getId();//CookieUtil.getUserPWD(request);\r\n\t\tString key=\"mysession\";\r\n\t\treturn key;\r\n\t}",
"public static UserSession getUserSession(HttpServletRequest request) {\n return (UserSession) request.getSession().getAttribute(Constants.USER_SESSION_KEY);\n }",
"public String getSessionContext() {\n return this.SessionContext;\n }",
"protected Session getSession() { return session; }",
"public Session getSession() { return session; }",
"public User getSession(){\n\t\treturn this.session;\n\t}",
"public static Object getAttribute(String name) {\n\t\treturn GPortalExecutionContext.getRequest().getSessionContext().getAttribute(name);\n\t}",
"@RequestMapping(\"/dept/sessionId\")\n\tpublic Object id(HttpServletRequest request) {\n\t\treturn request.getSession().getId() ;\n\t}",
"public Object getAttribute(String name) {\r\n\r\n /* Use cached values */\r\n Object object = super.getAttribute(name);\r\n\tif (object != null)\r\n return object;\r\n\r\n\t/* Fill the cache and return value if possible */\r\n if (!localstream.request.isSecure()) return null;\r\n\r\n /* Client Certificate */\r\n if (name.equals(\"javax.servlet.request.X509Certificate\")) {\r\n WarpCertificates cert = null;\r\n try {\r\n cert = new WarpCertificates(localstream.getX509Certificates());\r\n } catch (IOException e) {\r\n return null;\r\n }\r\n super.setAttribute(\"javax.servlet.request.X509Certificate\",\r\n cert.getCertificates());\r\n }\r\n\r\n /* other ssl parameters */\r\n if (name.equals(\"javax.servlet.request.cipher_suite\") ||\r\n name.equals(\"javax.servlet.request.key_size\") ||\r\n name.equals(\"javax.servlet.request.ssl_session\")) {\r\n WarpSSLData ssldata = null;\r\n try {\r\n ssldata = localstream.getSSL();\r\n } catch (IOException e) {\r\n return null;\r\n }\r\n if (ssldata == null) return null;\r\n\r\n super.setAttribute(\"javax.servlet.request.cipher_suite\",\r\n ssldata.ciph);\r\n if (ssldata.size!=0)\r\n super.setAttribute(\"javax.servlet.request.key_size\",\r\n new Integer (ssldata.size));\r\n super.setAttribute(\"javax.servlet.request.ssl_session\",\r\n ssldata.sess);\r\n }\r\n return(super.getAttribute(name));\r\n }",
"public Object getVariable(HttpServletRequest request, String name) {\n\t\tObject obj = request.getParameter(name);\n\t\tif (obj == null) {\n\t\t\tobj = request.getAttribute(name);\n\t\t\tif (obj == null) {\n\t\t\t obj = request.getSession().getAttribute(name);\n\t\t\t if (obj == null) {\n\t\t\t obj = getCookie(request, name);\n\t\t\t if (obj == null) {\n\t\t\t\t obj = getServletContext().getAttribute(name);\n\t\t\t }\n\t\t\t }\n\t\t\t}\n\t\t}\n\t\treturn obj;\n\t}",
"public abstract I_SessionInfo getSessionInfo(I_SessionName sessionName);",
"public static Object getObject(HttpSession session, String key) {\n return session.getAttribute(key);\n }",
"public synchronized RestRequest getRequest() {\n\t\treturn getContext().getLocalSession().getOpSession().getRequest();\n\t}",
"public String getSessionKey() {\n return sessionKey;\n }",
"@SuppressWarnings(\"unchecked\")\n private static Map<String, Object> sortSessionAttributes( HttpServletRequest request ) {\n Map<String, Object> sortedAttrs = new TreeMap<String, Object>();\n Enumeration<String> attrEnum = request.getSession().getAttributeNames();\n while ( attrEnum.hasMoreElements() ) {\n String s = attrEnum.nextElement();\n sortedAttrs.put( s, request.getAttribute( s ) );\n }\n return sortedAttrs;\n }",
"public IHTTPSession getSession() {\n\t\treturn session;\n\t}",
"public Object getRequest(String attibuteName) {\n return servletRequest.getAttribute(attibuteName);\n }",
"public Object getSessionAttribute(String name, String scope) { \n\t\treturn null;\n\t}",
"public HttpServletRequest getRequest() {\r\n return request;\r\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic <T> T getSessionAttr(String key) {\n\t\tSession session = getSession();\n\t\treturn session != null ? (T) session.getAttribute(key) : null;\n\t}",
"public HttpServletRequest getRequest() {\r\n\t\treturn request_;\r\n\t}",
"@Override\r\n\tpublic HttpSession getSession()\r\n\t{\r\n\t\t// This method was implemented as a workaround to __CR3668__ and Vignette Support ticket __247976__.\r\n\t\t// The issue seems to be due to the fact that both local and remote portlets try to retrieve\r\n\t\t// the session object in the same request. Invoking getSession during local portlets\r\n\t\t// processing results in a new session being allocated. Unfortunately, as remote portlets\r\n\t\t// use non-WebLogic thread pool for rendering, WebLogic seems to get confused and associates\r\n\t\t// the session created during local portlet processing with the portal request.\r\n\t\t// As a result none of the information stored originally in the session can be found\r\n\t\t// and this results in errors.\r\n\t\t// To work around the issue we maintain a reference to original session (captured on the\r\n\t\t// first invocation of this method during the request) and return it any time this method\r\n\t\t// is called. This seems to prevent the issue.\r\n\t\t// In addition, to isolate SPF code from the session retrieval issue performed by Axis\r\n\t\t// handlers used during WSRP request processing (e.g. StickyHandler), we also store\r\n\t\t// a reference to the session as request attribute. Newly added com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t// can then use the request attribute value instead of calling request.getSession()\r\n\t\t// which before this change resulted in new session being allocated and associated with\r\n\t\t// the portal request.\r\n\r\n\t\tif (mSession == null) {\r\n\t\t\tmSession = ((HttpServletRequest)getRequest()).getSession();\r\n\r\n\t\t\t// Store session in request attribute for com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t\tgetRequest().setAttribute(ORIGINAL_SESSION, mSession);\r\n\t\t}\r\n\r\n\t\treturn mSession;\r\n\t}",
"public Session getSession() {\n return session;\n }",
"public abstract I_SessionInfo getSession(I_SessionName sessionName);",
"public Session getSession(@NotNull Http.Request request) {\n Session session;\n String sessionKey = request.getHeader(SESSION_FIELD_NAME);\n\n // Check Session Key\n if (sessionKey == null || sessionKey.isEmpty()) {\n return null;\n }\n\n // Get Session by Key & check a session was found\n session = this.sessionRepository.getById(sessionKey);\n if (session == null || !session.isValid()) {\n return null;\n }\n\n return session;\n }",
"public LocalSession session() { return session; }",
"protected final Session getSession() {\n\t\treturn m_sess;\n\t}",
"public interface HttpSession {\n String getId();\n void setAttribute(String name, Object value);\n Object getAttribute(String name);\n void removeAttribute(String name);\n void invalidate();\n}",
"public String getSessionID ()\n\t{\n\t\treturn sessionID;\n\t}",
"public Session session() {\n return session;\n }",
"protected Session getSession() {\n\n return (Session) getExtraData().get(ProcessListener.EXTRA_DATA_SESSION);\n }",
"protected Object findInRequest(final ServletRequest request, final String attributName) {\r\n\r\n Object attr = request.getParameter(attributName);\r\n if (attr == null) {\r\n attr = request.getAttribute(attributName);\r\n }\r\n return attr;\r\n }",
"@JsonGetter(\"session_token\")\n public String getSessionToken ( ) { \n return this.sessionToken;\n }",
"public static String GetApiSessionId(HttpServletRequest request)\n {\n return (String) request.getSession().getAttribute(getSessionKey(request, Constants.SessionKeys.ApiSessionId));\n }",
"public String getSessionName();",
"protected final Session getSession() {\n return sessionTracker.getSession();\n }",
"protected HttpServletRequest getRequest() {\n return RequestUtil.getRequest();\n }",
"protected Object findInRequest(final HttpServletRequest request, final String attributName) {\r\n\r\n Object attr = request.getParameter(attributName);\r\n if (attr == null) {\r\n attr = request.getAttribute(attributName);\r\n }\r\n return attr;\r\n }",
"public java.lang.String getSessionToken() {\r\n return sessionToken;\r\n }",
"AuthenticationSessionModel getAuthenticationSession();",
"Session getSession();",
"Session getSession();",
"public Session getSession()\n {\n return session;\n }",
"private String getTopcatSessionId() {\r\n HttpServletRequest request = this.getThreadLocalRequest();\r\n HttpSession session = request.getSession();\r\n String sessionId = null;\r\n if (session.getAttribute(\"SESSION_ID\") == null) { // First time login\r\n try {\r\n sessionId = userManager.login();\r\n session.setAttribute(\"SESSION_ID\", sessionId);\r\n } catch (AuthenticationException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n } else {\r\n sessionId = (String) session.getAttribute(\"SESSION_ID\");\r\n }\r\n return sessionId;\r\n }",
"public static Session getSession() {\n return session;\n }",
"public static String getSessionCookie(final Request request) {\n if (request.raw().getCookies() == null) {\n return null;\n }\n for (Cookie cookie : request.raw().getCookies()) {\n if (cookie.getName().equals(\"session\")) {\n return cookie.getValue();\n }\n }\n return null;\n }",
"protected Session getSession() {\n return sessionUtility.getSession();\n }",
"protected abstract SESSION getThisAsSession();",
"public static void dumpSessionAttributes( HttpServletRequest request, StringBuilder b ) {\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis( request.getSession().getCreationTime() );\n b.append( \"Session \" );\n b.append( request.getSession().getId() );\n b.append( \" created at: \" );\n b.append( DATE_FORMAT.format( cal.getTime() ) );\n b.append( LF );\n b.append( \"Attributes:\" );\n b.append( LF );\n Map<String, Object> sortedAttrs = sortSessionAttributes( request );\n for ( Map.Entry<String, Object> entry : sortedAttrs.entrySet() ) {\n String description = \"\";\n try {\n description = entry.getValue().toString();\n } catch ( Exception e ) {\n LOG.warning( \"Exception describing attribute '\" + entry.getKey() + \"' \" + e.getMessage() );\n }\n b.append( \" \" );\n b.append( entry.getKey() );\n b.append( \": \" );\n b.append( description );\n b.append( LF );\n }\n b.append( \"---------------- End of Session Attributes\" );\n b.append( LF );\n }",
"final void request(HttpServletRequest request) {\n \n // Find the session ID in the cookies\n String sessionId = null;\n Cookie[] cookies = request.getCookies();\n int cookieCount = (cookies == null) ? 0 : cookies.length;\n for (int i = 0; i < cookieCount && sessionId == null; i++) {\n Cookie cookie = cookies[i];\n String name = cookie.getName();\n if (\"SessionId\".equals(name)) {\n sessionId = cookie.getValue();\n }\n }\n \n HttpSession session = request.getSession(true);\n _currentSession.set(session);\n \n // If the session ID is not found in the cookies, create a new one\n if (sessionId == null) {\n \n sessionId = session.getId();\n setProperty(sessionId, Boolean.FALSE);\n }\n \n // Fill the input parameters\n HashMap inputParameters = new HashMap();\n Enumeration params = request.getParameterNames();\n while (params.hasMoreElements()) {\n String name = (String) params.nextElement();\n String value = request.getParameter(name);\n if (\"\".equals(value) || name.equals(getSessionId())) {\n value = null;\n }\n inputParameters.put(name, value);\n }\n setProperty(\"_inputs\", inputParameters);\n }",
"public static CartModel getCartInSession(HttpServletRequest request) {\n CartModel cartInfo = (CartModel) request.getSession().getAttribute(\"myCart\");\r\n\r\n if (cartInfo == null) {\r\n cartInfo = new CartModel();\r\n request.getSession().setAttribute(\"myCart\", cartInfo);\r\n }\r\n\r\n return cartInfo;\r\n }",
"public Map getSessionMap() {\r\n\t\treturn sessionMap;\r\n\t}",
"public HttpServletRequest getHttpServletRequest()\n {\n return request;\n }",
"private void setSessionAttribs(HttpServletRequest req, BlogUser user) {\n\t\treq.getSession().setAttribute(\"current.user.id\", user.getId());\n\t\treq.getSession().setAttribute(\"current.user.fn\", user.getFirstName());\n\t\treq.getSession().setAttribute(\"current.user.ln\", user.getLastName());\n\t\treq.getSession().setAttribute(\"current.user.nick\", user.getNick());\n\t}",
"public Session getSession() {\n return session;\n }",
"@GET\n @Path(\"/session\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response getSessionInfo(@Context HttpServletRequest request) {\n try {\n BlahguaSession.ensureAdmin(request);\n return Response.ok(BlahguaSession.getSessionInfo(request)).build();\n } catch (Exception e) {\n return RestUtilities.make500AndLogSystemErrorResponse(request, e);\n }\n }",
"public static Object getApplicationAttribute(String key) {\r\n\t\tHttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext()\r\n\t\t .getRequest();\r\n\r\n\t\treturn request.getSession().getServletContext().getAttribute(key);\r\n\t}",
"public Object getObjFromSession(String key)\n\t{\n\t\treturn context.getSession().get(key);\n\t}",
"@Override\n\tpublic UtenteBase getSessionUser() {\n\t\tUtenteBase user = (UtenteBase) getThreadLocalRequest().getSession().getAttribute(\"user\");\n\t\treturn user;\n\t}",
"public String getSessionState();",
"public String getSessionId() {\n return this.sessionid;\n }",
"public String execute(){\n HttpSession session = request.getSession();\n System.out.println(request);\n System.out.println(response);\n System.out.println(application);\n System.out.println(session);\n\n return null;\n\n}",
"public String getSessionId() {\n return super.getSessionId();\n }",
"public static Session getSession(SlingHttpServletRequest request) {\n ResourceResolver resourceResolver = request.getResourceResolver();\n return resourceResolver.adaptTo(Session.class);\n }",
"public static String getRequest() {\n return request;\n }",
"final protected RobotSessionGlobals getSession() {\n return mSession;\n }",
"protected User getUser(HttpSession session) {\r\n\t\t// get the user form from the session\r\n\t\treturn (User) session.getAttribute(Constants.USER_KEY);\r\n\t}",
"private void getValues() {\n session = new UserSession(getApplicationContext());\n\n //validating session\n session.isLoggedIn();\n\n //get User details if logged in\n HashMap<String, String> user = session.getUserDetails();\n\n shopname = user.get(UserSession.KEY_NAME);\n shopemail = user.get(UserSession.KEY_EMAIL);\n shopmobile = user.get(UserSession.KEY_MOBiLE);\n System.out.println(\"nameemailmobile \" + shopname + shopemail + shopmobile);\n }",
"String getAttribute();",
"public Session getSession() {\n\t\treturn session;\n\t}",
"public Session getSession() {\n\t\treturn session;\n\t}",
"public Session getSession() {\n\t\treturn session;\n\t}",
"public Session getSession();",
"@SuppressWarnings(\"unchecked\")\n protected <T> T getValFromSession(HttpSession session, String key, Class<T> clsT) {\n if (session == null) {\n return null;\n }\n return (T) session.getAttribute(key);\n }",
"static String getSessionAttrNameKey(String attributeName) {\n return SESSION_ATTR_PREFIX + attributeName;\n }",
"public ShoppingCart getOrderInSession(HttpServletRequest request) {\n\t\tShoppingCart cart = (ShoppingCart) request.getSession().getAttribute(\"shoppingCart\");\n\t\treturn cart;\n\t\t\n\t}",
"Attribute getAttribute();",
"public SessionDetails getSessionDetails(JobStep js, Sessions s);",
"java.lang.String getAttribute();",
"@SuppressWarnings(\"unchecked\") public <T> T attribute (final String name) {\n return (T)session.getAttribute (name);\n }",
"public String getSessionID() {\n\t\treturn sessionId;\n\t}"
]
| [
"0.70312536",
"0.6713213",
"0.67117125",
"0.65581393",
"0.6533672",
"0.6531095",
"0.65006745",
"0.64759797",
"0.6444007",
"0.6418484",
"0.6401764",
"0.6399429",
"0.6369515",
"0.63383025",
"0.63383025",
"0.6334952",
"0.6317966",
"0.6317358",
"0.63109",
"0.6306016",
"0.6285266",
"0.6257816",
"0.6250943",
"0.6225988",
"0.6207056",
"0.6203091",
"0.6199811",
"0.6196679",
"0.61721414",
"0.6126949",
"0.61214226",
"0.6118507",
"0.6104719",
"0.6081766",
"0.6075894",
"0.6071311",
"0.6068755",
"0.6030013",
"0.6029023",
"0.60223335",
"0.6007048",
"0.5995776",
"0.598247",
"0.59735173",
"0.597328",
"0.5960896",
"0.595017",
"0.5950011",
"0.59492457",
"0.5930303",
"0.59295744",
"0.5925206",
"0.58997697",
"0.5894667",
"0.5887574",
"0.5884748",
"0.58845097",
"0.588384",
"0.5880339",
"0.587443",
"0.58621055",
"0.58621055",
"0.58473516",
"0.58445096",
"0.58437884",
"0.5829385",
"0.58251333",
"0.5823259",
"0.5823029",
"0.58229744",
"0.5816232",
"0.58141506",
"0.58084553",
"0.58021706",
"0.57996774",
"0.57979965",
"0.5795241",
"0.5786521",
"0.5783666",
"0.57816696",
"0.57754105",
"0.5775131",
"0.5775102",
"0.5773226",
"0.57713485",
"0.5770166",
"0.57625866",
"0.5761912",
"0.5744272",
"0.57361126",
"0.57361126",
"0.57361126",
"0.57134014",
"0.57107675",
"0.57087755",
"0.5700091",
"0.56985825",
"0.56896985",
"0.5681124",
"0.56802016",
"0.56738234"
]
| 0.0 | -1 |
Spielernamen auslesen, konfigurieren und in Array speichern | private String[] readPlayers(Map<String,Object> sessionAttribute){
Object spielerNamen2 = sessionAttribute.get(Parameter.SPIELER_NAMEN);
System.out.println(spielerNamen2.toString());
String convertSpielerNamen = spielerNamen2.toString();
convertSpielerNamen = convertSpielerNamen.replace("[", "");
convertSpielerNamen = convertSpielerNamen.replace("]", "");
return convertSpielerNamen.split(", ");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String[][] arrayAusgabe(){\n\t\treturn spielfeld;\n\t}",
"public Spieler(String spielfigur) {\n\n this.kontostand = 30000;\n this.spielfigur = spielfigur;\n this.istGefängnis = false;\n\n liste.put(\"braun\", braun);\n liste.put(\"hellblau\", hellblau);\n liste.put(\"pink\", pink);\n liste.put(\"orange\", orange);\n liste.put(\"rot\", rot);\n liste.put(\"gelb\", gelb);\n liste.put(\"grün\", grün);\n liste.put(\"duneklblau\", dunkelblau);\n liste.put(\"bahnhoefe\", bahnhoefe);\n liste.put(\"werke\", werke);\n felderInBesitz = new ArrayList<>();\n\n }",
"public void setSpielzuege1(int p[][]) {\n\t\tthis.spielfeld1 = p;\n\t}",
"@Override\n public List<String[]> namesAndValues() {\n List<String[]> nAv = new ArrayList<>();\n String[] m = {\"Meno\", this.meno};\n String[] i = {\"Iso\", this.iso};\n String[] b = {\"Brummitt 1\", this.brumit1.getMeno(), \"F Brumit1\"};\n nAv.add(m);\n nAv.add(i);\n nAv.add(b);\n return nAv;\n }",
"public String choseRep(){\n return \"array\";\n }",
"String[] getParts();",
"public String[] DevuelvecabeceraRen(){\r\n\t\tString vec[]={\" \",\"id\",\"int\",\"-\",\"*\",\"/\",\"(\",\")\",\"$\",\"E\",\"T\",\"F\"};\r\n\t\treturn vec;\r\n\t\t\r\n\t}",
"static void constructor(){\n /*SK*/ /*CZ*/ /*EN*/ \n /*0*/ SK.add(\"Základné nastavenia a konštanty\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); //language String value at position \n/*1*/ SK.add(\"A :\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*2*/ SK.add(\"Z :\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*3*/ SK.add(\"Dľžka rozpätia \"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*4*/ SK.add(\"Počítaná vzdialenosť od osi vedenia\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*5*/ SK.add(\"\\u0394l \"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*6*/ SK.add(\"Dľžka elementu reťazovky\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*7*/ SK.add(\"Aplikovať terén\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*8*/ SK.add(\"Aplikovat modelovaný terén?\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*9*/ SK.add(\"A/Z hranice\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*10*/ SK.add(\"hranice priestoru su v tvare obdlžnika dopočítaneho na základe hodnôt konštánt AZ\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\");\n/*11*/ SK.add(\"Generované hranice\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*12*/ SK.add(\"hranice priestoru sú generovane an základe vstupných bodov pozn. Comlex Hull\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*13*/ SK.add(\"Teren\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*14*/ SK.add(\"Model terénu\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*15*/ SK.add(\"Hlavná os rozpätia\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*16*/ SK.add(\"X1 :\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*17*/ SK.add(\"X-sová súradnica stožiara 1\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n /*18*/ SK.add(\"Z1 :\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*19*/ SK.add(\"Z-sová súradnica stožiara 1\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*20*/ SK.add(\"X2 :\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*21*/ SK.add(\"X-sová súradnica stožiara 2\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n /*22*/ SK.add(\"Z2 :\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*23*/ SK.add(\"Z-sová súradnica stožiara 2\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*24*/ SK.add(\"Ukažka terenu\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*25*/ SK.add(\"Y :\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*26*/ SK.add(\"Výškový offset\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*27*/ SK.add(\"block offset\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*28*/ SK.add(\"Blokuje daný ofset \"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*29*/ SK.add(\"Strana počitaneho štvorca\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\");\n/*30*/ SK.add(\"H :\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*31*/ SK.add(\"Vyska pre vertikalne mapovanie\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n \n \n \n \n \n \n \n \n \n \n \n \n // language_main_frame.LangLabel(constants.getLanguage_option(),0) \n inicializovane = true;\n}",
"public void makeArray(){\n for (int i = 0; i<length; i++){\n departements[i] = wallList.get(i).getName();\n }\n }",
"private static void standardPopulate(String[] s) {\n\t\tfor(/*int i = 0; i<s.length;i++*//* String z: s*/ int i = 0;i<s.length;i++){\r\n\t\t\t//s[i] = \"String #\"+(i+1);\r\n\t\t\t/*i++;\r\n\t\t\tz = \"String #\"+(i+1); */\r\n\t\t\tString string= \"String #\"+(i+1);\r\n\t\t\ts[i] = string; // setting position i into string\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public void setSpielzuege2(int p[][]) {\n\t\tthis.spielfeld2 = p;\n\t}",
"private void makeArrays()\n\t{\n\t\tfor (String key : sub.keySet())\n\t\t\tsub.put(key, ((List<String>) sub.get(key)).toArray(s0));\n\t\tfor (String key : attrs.keySet())\n\t\t\tattrs.put(key, ((List<String>) attrs.get(key)).toArray(s0));\n\t\tfor (String key : defs.keySet())\n\t\t\tdefs.put(key, ((List<String>) defs.get(key)).toArray(s0));\n\t\tfor (String key : smodes.keySet())\n\t\t{\n\t\t\tList<Integer> list = (List<Integer>) smodes.get(key);\n\t\t\tint[] array = new int[list.size()];\n\t\t\tfor (int i = 0; i < list.size(); i++)\n\t\t\t\tarray[i] = list.get(i);\n\t\t\tsmodes.put(key, array);\n\t\t}\n\t\tfor (String key : amodes.keySet())\n\t\t{\n\t\t\tList<Integer> list = (List<Integer>) amodes.get(key);\n\t\t\tint[] array = new int[list.size()];\n\t\t\tfor (int i = 0; i < list.size(); i++)\n\t\t\t\tarray[i] = list.get(i);\n\t\t\tamodes.put(key, array);\n\t\t}\n\t}",
"public String toString (){\n return \"tvalores[]\";\n }",
"public void readArray(String s){\r\n\t\tString[] s1=s.split(\"\");\r\n\t\tSystem.out.println(\"reading string array:-\");\r\n\t\tfor(int i=0;i<s1.length;i++){\r\n\t\t\tSystem.out.print(s1[i]);\r\n\t\t}System.out.println();\r\n\t}",
"public static String[] initializeQuestionName() {\n\n File ques_name = new File(\"Files/Question/question_name.txt\"); // creating file object\n\n try {\n Scanner que_name = new Scanner(ques_name); // creating Scanner for file\n\n while (que_name.hasNext()) { // iteration untill EOF\n String n = que_name.nextLine();\n t_que_name_o.add(n);\n }\n\n } catch (FileNotFoundException ex) {\n \n }\n\n String[] questionName = new String[t_que_name_o.size()]; // declaring and creating String[]\n t_que_name_o.toArray(questionName); // from arrayList to -> Array\n\n return questionName;\n\n }",
"private void createArray()\r\n\t{\r\n\t\tscorers = new String[NUMBER_OF_ENTRIES];\r\n\t\tfor(int i = 0; i < NUMBER_OF_ENTRIES; i += 2)\r\n\t\t{\r\n\t\t\tscorers[i] = \"[NULL]\";\r\n\t\t\tscorers[i + 1] = String.valueOf(-1);\r\n\t\t}\r\n\t}",
"public String[] getRecordOnPan() {\r\n String result[] = new String[6];\r\n result[0] = nameTf.getText();\r\n result[1] = locationTf.getText();\r\n result[2] = specialtiesTf.getText();\r\n result[3] = sizeTf.getText();\r\n result[4] = rateTf.getText();\r\n result[5] = ownerTf.getText();\r\n\r\n return result;\r\n }",
"@Override\n public String map(String value) throws Exception {\n String[] values=value.split(Constants.KEYSPLIT); // se obtiene en value cada row del data stream, y se le plica un split de acuerdo al\n //separador y se genera un array\n\n if(validateDataArray(values)){// se valida que el array cumpla con los valores necesarios\n dataTemp=values;// se le asigna el array valido al array_temporal\n generateParquet(dataTemp,Constants.PARQUETFILENAME,indexPostFileName,Constants.HDFSPATH,Constants.AVROSCHEMELOCATION,avroTagsNames);// es el metodo que genera los archivos parquet\n indexPostFileName++;\n }\n return Arrays.asList(dataTemp).toString();// se retorna el array_temporal el cual se va a imprimir en consola\n }",
"private static String actualParametersToString(Class[] pts) {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < pts.length; i++) {\n result.append(\"p\").append(i);\n if (i < pts.length - 1)\n result.append(\",\");\n }\n return result.toString();\n }",
"@Override\n\tpublic ArrayList<String> setValues() {\n\t\tList<String> str = new ArrayList<String>();\n\t\tstr.add(\"PcMan\");\n\t\tstr.add(\"gcMan\");\n\t\tstr.add(\"ycMan\");\n\t\tstr.add(\"kcMan\");\n\t\tstr.add(\"NoMan\");\n\t\treturn (ArrayList<String>) str;\n\t\t\n\t}",
"protected String[] getKeyPartValues(IPSKeyGenerator gen)\n {\n return new String[] {getFieldName()};\n }",
"@Before\r\n\tpublic void setup() {\n\t\twaS = new WeirdArray<String>(11);\r\n\t\t\r\n\t\t// Initialize the array.\r\n\t\twaS.setElement(0, \"a\");\r\n\t\twaS.setElement(1, \"bb\");\r\n\t\twaS.setElement(2, \"ccc\");\r\n\t\twaS.setElement(3, \"dddd\");\r\n\t\twaS.setElement(4, \"eeeee\");\r\n\t\twaS.setElement(5, \"ffffff\");\r\n\t\twaS.setElement(6, \"ggggg\");\r\n\t\twaS.setElement(7, \"hhhh\");\r\n\t\twaS.setElement(8, \"iii\");\r\n\t\twaS.setElement(9, \"jj\");\r\n\t\twaS.setElement(10, \"k\");\r\n\t}",
"public String[] camposDivididos(){\r\nString[] args=column().split(\"[,]\");\r\nreturn args;\r\n //return Arrays.toString(args);\r\n}",
"public static void main(String[] args) {\n String[] sa = {\"vier\",\"een\",\"twee\",\"drie\"};\n List<String> stringList = Arrays.asList(sa); // fixed-size !\n System.out.println(\"Array: \");\n ArrayUtil.showArray(sa);\n System.out.println(\"List: \");\n System.out.println(stringList);\n\n // Wijziging in array en list doorvoeren...\n sa[0] = \"Achttien\"; // Wijzig het array\n stringList.set(3, \"laatste\"); // Wijzig de List\n System.out.println(\"Array: \");\n ArrayUtil.showArray(sa);\n System.out.println(\"List: \");\n System.out.println(stringList);\n }",
"private static String[] getMapStrings(boolean desc) {\n\n\n\n ArrayList list = new ArrayList();\n Locale locale = Locale.getDefault();\n String name = locale.toString();\n if (desc)\n name = \"locale=\" + name;\n list.add(0, name);\n\n String os = \"-\" + getOSType();\n if (desc)\n os = \" (os=\" + System.getProperty(\"os.name\")\n + \", \" + System.getProperty(\"os.version\") + \")\";\n name += os;\n list.add(0, name);\n\n // Allow the invoker to override the keyStrokeMap to support\n // case where you are working on a remote machine with a different\n // local or platform.\n \n String override = System.getProperty(\"abbot.keyStrokeMap\");\n if (override!=null) {\n list.add(0, override);\n }\n \n \n /*\n String vm = System.getProperty(\"java.version\");\n name += \" vm=\" + vm;\n list.add(0, name);\n String version = System.getProperty(\"os.version\");\n name += \" version=\" + version;\n list.add(0, name);\n String arch = System.getProperty(\"os.arch\");\n name += \" arch=\" + arch;\n list.add(0, name);\n */\n return (String[])list.toArray(new String[list.size()]);\n }",
"String[][] packData();",
"public String[][] getNames () ;",
"public Slots()\n {\n //allocate memory for _fruits based on size of FRUITS:\n _fruits = new String[FRUITS.length];\n //copy elements of FRUITS into _fruits:\n for (int x = 0; x < FRUITS.length; x += 1){\n\t _fruits[x] = FRUITS[x];\n }\n\n }",
"String toStringStartValues();",
"String [] getParameters();",
"public Spielfeld() {\n\t\tmulden = new int[14];\n\t\tsetSteine();\n\t}",
"public String[] nombres(){\n return partida.nombres();\n }",
"public String[] getArrayValue();",
"private static void createMap()\r\n {\r\n position = new String[8][8];\r\n for(int i=0;i<8;i++)\r\n {\r\n int z=0;\r\n for(int j=72;j>=65;j--)\r\n {\r\n position[i][z]=(char)j+\"\"+(i+1); //uses ascii char placement for letters\r\n z++;\r\n }\r\n }\r\n \r\n }",
"private String[] formatEntry(String[] features) {\n if (this.format == DictionaryBuilder.DictionaryFormat.IPADIC) {\n return features;\n } else {\n String[] features2 = new String[13];\n features2[0] = features[0];\n features2[1] = features[1];\n features2[2] = features[2];\n features2[3] = features[3];\n features2[4] = features[4];\n features2[5] = features[5];\n features2[6] = features[6];\n features2[7] = features[7];\n features2[8] = features[8];\n features2[9] = features[9];\n features2[10] = features[11];\n\n // If the surface reading is non-existent, use surface form for reading and pronunciation.\n // This happens with punctuation in UniDic and there are possibly other cases as well\n if (features[13].length() == 0) {\n features2[11] = features[0];\n features2[12] = features[0];\n } else {\n features2[11] = features[13];\n features2[12] = features[13];\n }\n return features2;\n }\n }",
"public abstract String[] names() throws TrippiException;",
"public KI(String spielerwahl){\n\t\teigenerStein = spielerwahl;\n\t\t\n\t\tswitch (spielerwahl) {\n\t\tcase \"o\":\n\t\t\tgegnerStein = \"x\";\n\t\t\tbreak;\n\t\tcase\"x\":\n\t\t\tgegnerStein = \"o\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Ungueltige Spielerwahl.\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\thatAngefangen = gegnerStein;\n\t\t\n\t\tfor(int i=0; i<7; i++) { //initialisiert spielfeld\n\t\t\tfor(int j=0; j<6; j++){\t\t\t\t\n\t\t\t\tspielfeld[i][j] = \"_\";\n\t\t\t}\n\t\t\tmoeglicheZuege[i] = -1; //initialisiert die moeglichen zuege\n\t\t}\n\t\t\n\t}",
"public void displayData(String[] str);",
"public String[] getletra(){\n return letra;}",
"public static void getConfig(){\n\t\tSystem.out.println(\"Name = \" + name);\n\t\tSystem.out.println(\"PrepositionLength = \" + prepositionLength);\n\t\tSystem.out.println(\"PrepositionDelay = \" + prepositionDelay );\n\t\tSystem.out.println(\"Strings = \" + setOfStrings.length);\n\t\tfor(int i = 0; i < setOfStrings.length; i++){\n\t\t\tSystem.out.println(\"LowNote = \" + setOfStrings[i].lowNote);\n\t\t\tSystem.out.println(\"HighNote = \" + setOfStrings[i].highNote);\n\t\t\tString output = \"\";\n\t\t\tfor(int j = 0; j < setOfStrings[i].interval.length;j++){\n\n\t\t\t\toutput += setOfStrings[i].interval[j] + \",\";\n\t\t\t}\n\t\t\tSystem.out.println(output);\n\t\t}\n\t}",
"Object[][] procurarCampo(String nomeCampo, String chave, String campoDescricao);",
"@Override\n public String toString(){\n return (\"[\" + this.inf + \" ; \" + this.sup + \"]\");\n }",
"public ArrayVariable getPrefixedArray(String methodName, String className, String unprefixedName, int ssaNum) {\n\t\treturn (ArrayVariable)getPrefixed(methodName, className, unprefixedName,ssaNum);\n\t}",
"FormatSpecifier(final String[] sa) {\n this.sa = sa;\n }",
"public void inicializarArrays(){\n for(int i=0;i<=10;i++){\n dni[i] = 0;\n nombre[i] = \"\";\n apellido[i] = \"\";\n direccion[i] = \"\";\n telefono[i] = \"\";\n fNacimiento[i] = \"\";\n }\n }",
"private String[][] getDeckblattInhalt() {\r\n String tmpString[][] = new String[1][1];\r\n tmpString[0][0] = view.getDeckblattTextField().getText();\r\n\r\n return tmpString;\r\n }",
"public static void main(String[] args) {\n\tString [] ciudades_init = {\"Barcelona\", \"Madrid\", \"Valencia\", \"Malaga\", \"Cadis\", \"Santander\"};\t\r\n\t\r\n\t//Iniciar Arraylist. 4.1\r\n\tArrayList<char[]> CiudadArray = new ArrayList<char[]>();\r\n\tfor(int i = 0;i<ciudades_init.length;i++)\r\n\t{\r\n\t\t// Crear Char Array para cada ciudad\r\n\t\tCiudadArray.add(new char[ciudades_init[i].length()]);\r\n\t\t\r\n\t\t//4.2\r\n\t\tchar [] temp = new char[ciudades_init[i].length()];\r\n\t\t\r\n\t\tfor (int j = 0;j<ciudades_init[i].length();j++)\r\n\t\t{\r\n\t\t\ttemp[j]=ciudades_init[i].charAt(j);\r\n\t\t}\r\n\t\t\r\n\t\tCiudadArray.set(i, temp);\r\n\t\t\r\n\t\t//4.3\r\n\t\tSystem.out.print(ciudades_init[i] + \" - \");\r\n\t\tfor (int j = CiudadArray.get(i).length-1; j >= 0 ; j--){\r\n\t\t System.out.print(CiudadArray.get(i)[j]);\t\t\t\r\n\t\t}\r\n\t\tSystem.out.print(\"\\n\");\t\r\n\t}\r\n}",
"@SuppressWarnings( {\"unchecked\"})\n\t\t\tString[] getStuff() { \n\t\t\t\treturn (String[]) getSeveral().toArray(new String[getSeveral().size()]);\n\t\t\t}",
"@Override\n\tpublic String[] toArray() {\n\t\tString strValue[] = new String[DSPPackager.PACKAGER_MBASE_88301I\n\t\t\t\t.getFieldDefinitionList().length];\n\t\tString strHostName = null;\n\t\ttry {\n\t\t\tstrHostName = InetAddress.getLocalHost().getHostAddress();\n\t\t} catch (UnknownHostException ex) {\n\t\t\tstrHostName = \"localhost\";\n\t\t}\n\t\tstrValue[0] = \"*LINX\"; // Header type\n\t\tstrValue[1] = strHostName; // Device Name\n\t\tstrValue[5] = \"213\"; // Header Length\n\t\tstrValue[7] = \"0200\"; // Version\n\t\tstrValue[8] = \"*DSP\"; // Version\n\t\tstrValue[9] = \"MBSD\"; // Data format\n\t\tstrValue[10] = \"*LINX\"; // Source ID\n\t\tstrValue[14] = \"01\"; // Source ID\n\t\tstrValue[17] = \"BBMBSLNMNTFNC\"; // Scenario Number\n\t\tstrValue[22] = \"1\";\n\t\tstrValue[23] = \"10\";\n\t\tstrValue[24] = aa.getTeller(); // User ID\n\t\tstrValue[25] = strHostName; // Terminal ID\n\t\tstrValue[26] = \"88301\"; // Supervisor ID\n\t\tstrValue[27] = \"N\";\n\t\tstrValue[31] = aa.getTeller(); // Message Header\n\t\tstrValue[32] = \"1\"; // Message Header\n\t\tstrValue[34] = \"*END\";\n\t\tstrValue[36] = \"BTS\";\n\t\tstrValue[37] = \"RBS\";\n\t\tstrValue[39] = strHostName; // Terminal ID\n\t\tstrValue[40] = \"27\"; // Journal Seq\n\t\tstrValue[41] = aa.getBranch(); // Branch Code\n\t\tstrValue[45] = \"88301\"; // Transaction Code\n\t\tstrValue[46] = \"C\"; // add\n\t\tstrValue[47] = \"R\"; // response\n\t\tstrValue[48] = \"1\"; // Work station\n\t\tstrValue[49] = \"N\";\n\t\tstrValue[50] = \"F\";\n\t\tstrValue[56] = \"\";\n\t\tstrValue[67] = aa.getApplicationNo(); // application Number\n\t\tstrValue[68] = aa.getCifNum();\n\t\tstrValue[69] = aa.getApplicationDate();\n\t\tstrValue[71] = aa.getBranch(); // lpad 5 '0'\n\t\tstrValue[72] = aa.getWorkingEx();\n\t\tstrValue[73] = aa.getSpecProvision(); // Y/N\n\t\tstrValue[74] = aa.getClasifielDate();\n\t\tstrValue[75] = aa.getCarCode();\n\t\tstrValue[76] = aa.getReviewDate();\n\t\tstrValue[77] = aa.getRetention();\n\t\tstrValue[78] = aa.getReviewReMark();\n\t\tstrValue[79] = aa.getRefinanceFrom();\n\t\tstrValue[80] = aa.getTucachPn();\n\t\tstrValue[81] = aa.getTinhHinhTc();\n\t\tstrValue[82] = aa.getKhaNangVayVon();\n\t\tstrValue[83] = aa.getDamBaoTienVay();\n\t\tstrValue[84] = aa.getLimitAmount();\n\t\tstrValue[85] = aa.getCurencyType();\n\t\tstrValue[86] = aa.getOfficeCode();\n\t\tstrValue[87] = aa.getClassification();\n\t\tstrValue[88] = aa.getMARemarck();\n\t\tstrValue[89] = aa.getMADate();\n\t\treturn strValue;\n\t}",
"public void roomMems(){\r\n\tString[] names ={\"vivek\", \"satish\", \"neeraj\", \"Raju\", \"Dilip\"};\r\n\r\n\tfor(String i:names){ \r\n\t\tSystem.out.println(names[3]);\r\n\t}\r\n\t}",
"@Override\r\n\tpublic final String[] getHabilidadesRaza() {\r\n\t\treturn new String[] {\"Golpe Defensa\", \"Mordisco de Vida\"};\r\n\t}",
"public String[] list(){\n\t\t\n\t\tSet<String> t = contents.keySet();\n\t\tString s[] = t.toArray(new String[0]);\n\t\treturn s;\n\t}",
"@Parameters\n public static Collection<Object[]> data() {\n return Arrays.asList(new Object[][]{\n {4, 5, \"-\", \"-1\"},\n {6, 7, \"*\", \"42\"},\n {8, 4, \"/\", \"2\"},\n {2, 3, \"+\", \"5\"}\n });\n }",
"protected String[] arrayParser(String item){\n return item.replaceAll(\"\\\\{|\\\\}|\\\\[|\\\\]|(\\\\d+\\\":)|\\\"|\\\\\\\\\", \"\").split(\",\");\n }",
"private static String formalParametersToString(Class[] pts) {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < pts.length; i++) {\n result.append(getTypeName(pts[i])).append(\" p\").append(i);\n if (i < pts.length - 1)\n result.append(\",\");\n }\n return result.toString();\n }",
"public QwirkleSpiel()\n {\n beutel=new Beutel(3); //erzeuge Beutel mit 3 Steinfamilien\n spielfeld=new List<Stein>();\n\n rote=new ArrayList<Stein>(); //Unterlisten, die zum leichteren Durchsuchen des Spielfelds angelegt werden\n blaue=new ArrayList<Stein>();\n gruene=new ArrayList<Stein>();\n gelbe=new ArrayList<Stein>();\n violette=new ArrayList<Stein>();\n orangene=new ArrayList<Stein>();\n kreise=new ArrayList<Stein>();\n kleeblaetter=new ArrayList<Stein>();\n quadrate=new ArrayList<Stein>();\n karos=new ArrayList<Stein>();\n kreuze=new ArrayList<Stein>();\n sterne=new ArrayList<Stein>();\n\n erstelleListenMap();\n }",
"@Override\n protected List<String> initialize(int size) {\n String[] ia = Generated.array(String.class,\n new RandomGenerator.String(), size);\n return Arrays.asList(ia);\n }",
"@Override\r\n\tpublic float[] get(String ponits) {\n\t\treturn null;\r\n\t}",
"@Parameters\n\tpublic static Collection<Object[]> data() {\n\t\treturn Arrays.asList(new Object[][] { \n\t\t\t{ \"\" }, \n\t\t { \"14 12\" },\n\t { \"1A3*123\" },\n\t { \"1412abc\\n\" }, \n\t\t});\n\t}",
"Soldat[][] getUnites();",
"public abstract String[] getValues();",
"public String[] key_Array_list_rule() {\n String[] key_Array_list = {\"时间\", \"地点\", \"分类\"};\n return key_Array_list;\n }",
"@Parameters\r\n public static Collection<Object[]> data() {\r\n Object[][] data = new Object[][] { { \"Transportation\" ,\"auto\" } };\r\n return Arrays.asList(data);\r\n }",
"public interface Level {\r\n\tchar [][] tempLevel = {\r\n\t\t\t{'l','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m'},\r\n\t\t\t{'l','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m'},\r\n\t\t\t{'l','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m'},\r\n\t\t\t{'l','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m'},\r\n\t\t\t{'l','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m','m'}\r\n\t\t\t};\r\n\t\r\n\t//the method will print the state of the parking lot\r\n\tvoid printParking();\r\n\r\n}",
"public abstract ArrayList<String[]> toStrings();",
"static void initSample2(){\n // put values into the sField\n sField[0][0] = \"X\";\n sField[0][1] = \"X\";\n sField[0][3] = \"O\";\n sField[0][4] = \"X\";\n sField[0][5] = \"X\";\n \n sField[1][5] = \"O\";\n sField[1][6] = \"O\";\n sField[1][7] = \".\";\n sField[1][8] = \"O\";\n }",
"public abstract List toNameValueList();",
"public static void main(String[] D_Stark) {String[] y ={\n\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\",\"\",\"\",\"\",\"\",\n\"\"};\n\nfor( int i =0;i<2;++i){\n\nfor(String h:y){c(h);}}}",
"public Spieler(String name) {\n\t\tthis.name = name;\n\t}",
"org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType getGeneralNameArray(int i);",
"public void getPatterns(int pack){\n FileHandle file = Gdx.files.internal(\"patterns.txt\");\n String text = file.readString();\n patternPacks = text.split(\";\");\n //System.out.println(patternPacks[pack]);\n }",
"public void leituraMapa() throws IOException {\n BufferedReader br = new BufferedReader(new FileReader(caminho+\"/caminho.txt\"));\n String linha = br.readLine();\n String array[] = new String[3];\n while (linha != null){\n array = linha.split(\",\");\n dm.addElement(array[1]);\n nomeJanela[contador] = array[0];\n contador++;\n linha = br.readLine();\n }\n br.close();\n }",
"public String[][] get();",
"@Override\n\tprotected void initArrayTitle() {\n\t\tthis.arrayTitle.add(\"div[class=lft] > div > h2\");\n\n\t}",
"public String[] getDescription() {\n//\t\treturn super.getDescription(); // Replace with your code\n\t String[] arr = new String[description.size()];\n\t description.toArray(arr);\n\t return arr;\n\t}",
"public String[] toStrings();",
"public String[] setWord(int position)\r\n{\r\n\t//String word[];\r\n\tif(position == 0)\r\n\t{\r\n\t\tString word[]={\"A\",\"P\",\"P\",\"L\",\"E\"};\r\n\treturn word;\r\n\t}\r\n\telse if(position == 1)\r\n\t{\r\n\t\tString word[]={\"B\",\"R\",\"E\",\"A\",\"D\"};\r\n\t\treturn word;\r\n\t}\r\n\telse if(position == 2) \r\n\t{\r\n\t\tString word[]={\"C\",\"A\",\"M\",\"E\",\"L\"};\r\n\t\treturn word;\r\n\t}\r\n\telse if(position == 3)\r\n\t{\r\n\t\tString word[]={\"D\",\"O\",\"N\",\"U\",\"T\"};\r\n\t\treturn word;\r\n\t}\r\n\telse if(position == 4) \r\n\t{\r\n\t\tString word[]={\"E\",\"A\",\"G\",\"L\",\"E\"};\r\n\t\treturn word;\r\n\t}\r\n\telse if(position == 5) \r\n\t{\r\n\t\tString word[]={\"F\",\"L\",\"U\",\"T\",\"E\"};\r\n\t\treturn word;\r\n\t}\r\n\telse if(position == 6) \r\n\t{\r\n\t\tString word[]={\"G\",\"H\",\"O\",\"S\",\"T\"};\r\n\t\treturn word;\r\n\t}\r\n\telse if(position == 7) \r\n\t{\r\n\t\tString word[]={\"H\",\"O\",\"R\",\"S\",\"E\"};\r\n\t\treturn word;\r\n\t}\r\n\telse if(position == 8) \r\n\t{\r\n\t\tString word[]={\"I\",\"N\",\"D\",\"I\",\"A\"};\r\n\t\treturn word;\r\n\t}\r\n\telse \r\n\t{\r\n\t\tString word[]={\"J\",\"O\",\"K\",\"E\",\"R\"};\r\n\t\treturn word;\r\n\t}\r\n}",
"public XmlsonArray(String name) {\n\t\tsuper(name);\n\t}",
"static void initSample4(){\n // put values into the sField\n sField[5][4] = \"X\";\n sField[4][5] = \".\";\n sField[3][6] = \"X\";\n sField[2][7] = \"X\";\n sField[1][8] = \"X\";\n \n sField[1][5] = \"O\";\n sField[1][6] = \"O\";\n sField[1][7] = \".\"; \n }",
"public String[] camposDivididos3(String[] vars){\r\nString[] args=vars;\r\nreturn args;\r\n}",
"private List<String> build() {\n List<String> ags = new ArrayList<>();\n ags.add(\"European Union Chromosome 3 Arabidopsis Sequencing Consortium\");\n ags.add(\"Institute for Genomic Research\");\n ags.add(\"Kazusa DNA Research Institute\");\n return ags;\n }",
"public Canada() {\n\n //Initialize the array \n provinces = new String[NUM_PROVINCES][NUM_NAMES];\n\n // Set the elements in the array \n provinces[BC][NAME_OF_PROVINCE] = \"British Columbia\";\n provinces[BC][NAME_OF_CAPITAL_CITY] = \"Victoria\";\n provinces[BC][NAME_OF_BIGGEST_CITY] = \"Vancouver\";\n provinces[PE][NAME_OF_PROVINCE] = \"Prince Edward Island\";\n provinces[PE][NAME_OF_CAPITAL_CITY] = \"Charlottetown\";\n provinces[PE][NAME_OF_BIGGEST_CITY] = \"Charlottetown\";\n provinces[SK][NAME_OF_PROVINCE] = \"Saskatchewan\";\n provinces[SK][NAME_OF_CAPITAL_CITY] = \"Regina\";\n provinces[SK][NAME_OF_BIGGEST_CITY] = \"Saskatoon\";\n provinces[AB][NAME_OF_PROVINCE] = \"Alberta\";\n provinces[AB][NAME_OF_CAPITAL_CITY] = \"Edmonton\";\n provinces[AB][NAME_OF_BIGGEST_CITY] = \"Calgary\";\n provinces[NL][NAME_OF_PROVINCE] = \"Newfoundland and Labrador\";\n provinces[NL][NAME_OF_CAPITAL_CITY] = \"St. John's\";\n provinces[NL][NAME_OF_BIGGEST_CITY] = \"St. John's\";\n provinces[YK][NAME_OF_PROVINCE] = \"Yukon\";\n provinces[YK][NAME_OF_CAPITAL_CITY] = \"WhiteHorse\";\n provinces[YK][NAME_OF_BIGGEST_CITY] = \"Whitehorse\";\n provinces[NV][NAME_OF_PROVINCE] = \"Nunavut\";\n provinces[NV][NAME_OF_CAPITAL_CITY] = \"Iqaluit\";\n provinces[NV][NAME_OF_BIGGEST_CITY] = \"Iqaluit\";\n provinces[NT][NAME_OF_PROVINCE] = \"Northwest Territories\";\n provinces[NT][NAME_OF_CAPITAL_CITY] = \"Yellowknife\";\n provinces[NT][NAME_OF_BIGGEST_CITY] = \"Yellowknife\";\n provinces[ON][NAME_OF_PROVINCE] = \"Ontario\";\n provinces[ON][NAME_OF_CAPITAL_CITY] = \"Toronto\";\n provinces[ON][NAME_OF_BIGGEST_CITY] = \"Toronto\";\n provinces[QC][NAME_OF_PROVINCE] = \"Quebec\";\n provinces[QC][NAME_OF_CAPITAL_CITY] = \"Quebec City\";\n provinces[QC][NAME_OF_BIGGEST_CITY] = \"Montreal\";\n provinces[NS][NAME_OF_PROVINCE] = \"Nova Scotia\";\n provinces[NS][NAME_OF_CAPITAL_CITY] = \"Halifax\";\n provinces[NS][NAME_OF_BIGGEST_CITY] = \"Halifax\";\n provinces[NB][NAME_OF_PROVINCE] = \"New Brunswick\";\n provinces[NB][NAME_OF_CAPITAL_CITY] = \"Fredericton\";\n provinces[NB][NAME_OF_BIGGEST_CITY] = \"Saint John\";\n provinces[MB][NAME_OF_PROVINCE] = \"Manitoba\";\n provinces[MB][NAME_OF_CAPITAL_CITY] = \"Winnipeg\";\n provinces[MB][NAME_OF_BIGGEST_CITY] = \"Winnipeg\";\n }",
"private void initArrayHeightAndWidth() {\n\n\t\theight = 0;\n\t\twidth = 0;\n\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(mapFile));\n\t\t\tString line = br.readLine();\n\t\t\t// get length of map\n\t\t\twidth = line.length();\n\t\t\t// get height of map\n\t\t\twhile (line != null) {\n\t\t\t\theight += 1;\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.close();\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\theight_on_display = (height - 1) * 35;\n\t\twidth_on_display = (width - 1) * 35;\n\t\tmapElementStringArray = new String[height][width];\n\t\tmapElementArray = new MapElement[height][width];\n\n\t}",
"@DataProvider(name=\"datagenerator\")\n\tpublic String[][] providedate() {\n\t\tString[][] s= {{\"a\",\"b\"}};\n\t\t\n\t\tfor(Object s1:s) {\n\t\t\tSystem.out.println(s1);\n\t\t}\n\t\t\n\t\treturn s;\n\t\t\n\t\t\n\t}",
"public final String[] getSarakeAsteikko() {\r\n return sarakeAsteikko;\r\n }",
"public void createUnits(String unitName, String soldiers){\n\t\tString[] stringArray = soldiers.split(\"\\\\s*,\\\\s*\");\n\t\tString emptyString = \"\"; \n\t\t//array with integers for names\n\t\tint length = stringArray.length;\n\t\tArrayList<Integer> intArray = new ArrayList<Integer>();\n\t\t\n\t\tif(!soldiers.equals(emptyString)){\n\t\t\tfor(int i = 0; i < length; i++){\n\t\t\t\tintArray.add(Integer.parseInt(stringArray[i]));\n\t\t\t}\n\t\t}\n\t\n\t\tunitsAndSoldiers.put(unitName, intArray);\t\n\t}",
"public abstract String[] getDescriptions();",
"@Override\n\tprotected void initArrayTitle() {\n\t\tthis.arrayTitle.add(\"title\");\n\t\tthis.arrayTitle.add(\"td[id=font_title]\");\n\t\tthis.arrayTitle.add(\"tr > td[id=font_title]\");\n\n\t}",
"public static int[][] AssetCreater(String srt) {\n\r\n\t\tint Length = ArrLength(srt);\r\n\r\n\t\tint[][] TempArr = new int[5][Length];\r\n\r\n\t\tint Xoffset = 0;\r\n\r\n\t\t// goes through entire word and if any letter corrisponds with a letter it's\r\n\t\t// testing for\r\n\t\t// it calls a function to add the new symbol to 2d array\r\n\r\n\t\t// I considered commenting all this but I think it's pretty self explanitory\r\n\r\n\t\tfor (int k = 0; k < srt.length(); k++) {\r\n\r\n\t\t\tif (srt.charAt(k) == '0') {\r\n\t\t\t\t// if it's 0 add Zero Matrix to the matrix\r\n\t\t\t\tTempArr = AddToArr(TempArr, Zero, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '1') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, One, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '2') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Two, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '3') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Three, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '4') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Four, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '5') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Five, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '6') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Six, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '7') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Seven, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '8') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Eight, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '9') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Nine, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'a') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ALetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'b') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, BLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'c') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, CLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'd') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, DLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'e') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ELetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'f') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, FLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'g') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, GLetter, 4, Xoffset);\r\n\r\n\t\t\t\t// G is a bigger number so I just add 1 to offset\r\n\t\t\t\tXoffset += 1;\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'h') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, HLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'i') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ILetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'j') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, JLetter, 4, Xoffset);\r\n\r\n\t\t\t\tXoffset += 1;\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'k') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, KLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'l') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, LLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'm') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, MLetter, 5, Xoffset);\r\n\r\n\t\t\t\tXoffset += 2;\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'n') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, NLetter, 4, Xoffset);\r\n\r\n\t\t\t\tXoffset += 1;\r\n\t\t\t} else if (srt.charAt(k) == 'o') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, OLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'p') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, PLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'q') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, QLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'r') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, RLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 's') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, SLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 't') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, TLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'u') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ULetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'v') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, VLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'w') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, WLetter, 5, Xoffset);\r\n\r\n\t\t\t\tXoffset += 2;\r\n\t\t\t} else if (srt.charAt(k) == 'x') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, XLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'y') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, YLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'z') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ZLetter, 4, Xoffset);\r\n\r\n\t\t\t\tXoffset += 1;\r\n\t\t\t} else if (srt.charAt(k) == ' ') {\r\n\t\t\t\tXoffset -= 2;\r\n\t\t\t\t// space is too big number so I just sub 2 from offset\r\n\r\n\t\t\t} else if (srt.charAt(k) == '-') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, DashLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == ':') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ColonLetter, 3, Xoffset);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tXoffset += 4;\r\n\t\t}\r\n\t\treturn TempArr;\r\n\t}",
"@Override\n public MapperEmissionList call() {\n MapperEmissionList EmissionList = new MapperEmissionList();\n String[] splited = value.split(\"\\\\s+\");\n for (int ii=0; ii<splited.length; ii++) {\n splited[ii] = splited[ii].replaceAll(\"[^\\\\w]\", \"\");\n EmissionList.add(\n new MapperEmission(splited[ii] , 1) // emit the pair (ii-th character,1)\n );\n }\n return EmissionList;\n }",
"String getPais();",
"private void getArbeitspaketArray(ObservableList<ArbeitspaketTableData> paketList) {\r\n\t\t// Initialisieren des Arrays\r\n\t\tpakete = new Arbeitspaket[paketList.size()];\r\n\r\n\t\tfor (int i = 0; i < paketList.size(); i++) {\r\n\t\t\t// herauslesen der externen ID, damit diese nicht verloren geht (Konstruktor\r\n\t\t\t// nimmt nur einen Parameter für die ID entgegen und setzt die interne und\r\n\t\t\t// externe ID auf diesen Wert)\r\n\t\t\tString idExtern = paketList.get(i).getIdExtern();\r\n\r\n\t\t\t// automatisches Setzen der Vorgangsdauer, da diese in der Tabelle nicht\r\n\t\t\t// angegeben wird\r\n\t\t\tint vorgangsdauer = paketList.get(i).getFez() - paketList.get(i).getFaz() + 1;\r\n\r\n\t\t\t// setzen der einzelnen Werte der Arbeitspakte\r\n\t\t\tpakete[i] = new Arbeitspaket(paketList.get(i).getIdIntern(), paketList.get(i).getFaz(),\r\n\t\t\t\t\tpaketList.get(i).getFez(), paketList.get(i).getSaz(), paketList.get(i).getSez(), vorgangsdauer,\r\n\t\t\t\t\tpaketList.get(i).getMitarbeiteranzahl(), paketList.get(i).getAufwand());\r\n\r\n\t\t\t// Da die externe ID auf die interne ID gesetzt wurde, wird diese nun wieder auf\r\n\t\t\t// die vorher herausgelesene externe ID gesetzt\r\n\t\t\tpakete[i].setIdExtern(idExtern);\r\n\t\t}\r\n\t}",
"private String printSolicitudes(Boolean[] s) {\r\n\t\tString ret = \"[\";\r\n\t\tfor (int i=0; i<=ALTURA;i++) {\r\n\t\t\tret += (s[i] ? i : \"\") + \",\";\r\n\t\t}\r\n\t\treturn ret+\"]\";\r\n\t}",
"private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }",
"public void main(String[] args) {\n String datas=\"\";\n try {\n File myObj = new File(\"configuracion.txt\");\n Scanner myReader = new Scanner(myObj);\n while (myReader.hasNextLine()) {\n String data = myReader.nextLine();\n datas = datas + data;\n }\n myReader.close();\n }\n catch (FileNotFoundException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n\n String[] partes = datas.split(\">\"); //separa el contenido del fichero en diferentes string\n String[] cambios; //y lo vuelve a separar para quitar los titulos entre <>. Ej: <Localizaciones>\n for (int i = 1; i < 4; i++) {\n cambios=partes[i].split(\"<\");\n partes[i]=cambios[0];\n }\n \n //calcular num de elementos de cada parte\n int[] numelementos = new int[3];\n for (int i = 0; i < 3; i++) {\n for(int j=0; j<partes[i+1].length(); j++){\n if(partes[i+1].charAt(j)=='(')\n numelementos[i]++;\n if(partes[i+1].charAt(j)==')'){\n if(numelementos[i]==0)\n flag1=1;\n }\n }\n }\n\n localizacionesString = new String [numelementos[0]]; //incializa la informacion de cada objeto \n personajesString = new String [numelementos[1]]; //segun el largo de los strings que hemos separado\n objetosString = new String [numelementos[2]];\n String cambio = \"\";\n int count = 0 ;\n\n //Se rellena cada string con un for propio\n //Dentro de un try para deteccion de errores\n try {\n //for para Localizaciones\n for (int i=0; count<numelementos[0]; ++i){ \n if (partes[1].charAt(i)==')'){\n localizacionesString[count]=\"\";\n cambio=cambio+partes[1].charAt(i);\n localizacionesString[count]=localizacionesString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n if (partes[1].charAt(i)==','){ //Control de errores en el txt /*\n if(partes[1].charAt(i+1)!=' '){\n cambio=cambio+\", \";\n continue;\n }\n if(partes[1].charAt(i+1)==' '&&partes[1].charAt(i+2)==' '){\n cambio=cambio+\", \";\n ++i;\n for(;;i++){\n if(partes[1].charAt(i)!=' ')\n break;\n }\n }\n }\n cambio=cambio+partes[1].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\"; \n }\n for (int f,i = 0; i < numelementos[0]; i++) {\n f=0;\n for (int j = 0; j < localizacionesString[i].length(); j++) {\n if(localizacionesString[i].charAt(j)==')'||localizacionesString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag1=1;\n }\n } // */\n \n count = 0;\n\n //for para Personajes\n for (int i=0; count<numelementos[1]; ++i){\n if (partes[2].charAt(i)==')'){\n personajesString[count]=\"\";\n cambio=cambio+partes[2].charAt(i);\n personajesString[count]=personajesString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n cambio=cambio+partes[2].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\";\n }\n for (int f,i = 0; i < numelementos[1]; i++) { //Control de errores/*\n f=0;\n for (int j = 0; j < personajesString[i].length(); j++) {\n if(personajesString[i].charAt(j)==')'||personajesString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag1=1;\n }\n } // */\n \n count=0;\n\n //for para Objetos\n for (int i=0; count<numelementos[2]; ++i){\n if (partes[3].charAt(i)==')'){\n objetosString[count]=\"\";\n cambio=cambio+partes[3].charAt(i);\n objetosString[count]=objetosString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n cambio=cambio+partes[3].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\";\n }\n for (int f,i = 0; i < numelementos[2]; i++) { //Control de errores/*\n f=0;\n for (int j = 0; j < objetosString[i].length(); j++) {\n if(objetosString[i].charAt(j)==')'||objetosString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag1=1;\n }\n } // */\n\n \n } catch (Exception e) {\n System.out.println(\"ERROR EN LECTURA FICHERO\");\n flag1 = 1;\n }\n \n \n\n\n\n\n\n //leer fichero de objetivos(funciona igual que el de configuracion.txt)\n\n datas=\"\";\n try {\n File myObj = new File(\"objetivos.txt\");\n Scanner myReader = new Scanner(myObj);\n while (myReader.hasNextLine()) {\n String data = myReader.nextLine();\n datas = datas + data;\n }\n myReader.close();\n }\n\n catch (FileNotFoundException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n\n partes = datas.split(\">\");\n for (int i = 1; i < 3; i++) {\n cambios=partes[i].split(\"<\");\n partes[i]=cambios[0];\n }\n \n numelementos = new int[2];\n for(int i=0 ; i<2 ; i++){\n for(int j=0; j<partes[i+1].length(); j++){\n if(partes[i+1].charAt(j)=='('){\n numelementos[i]++;\n if(partes[i+1].charAt(j)==')'){\n if(numelementos[i]==0)\n flag2=1;\n }\n }\n }\n }\n\n localizacionesObjetivoString = new String [numelementos[0]];\n objetosObjetivoString = new String [numelementos[1]];\n cambio=\"\";\n\n count = 0;\n\n try {\n // for para las localizaciones objetivo\n for (int i=0; count<numelementos[0]; ++i){\n if (partes[1].charAt(i)==')'){\n localizacionesObjetivoString[count]=\"\";\n cambio=cambio+partes[1].charAt(i);\n localizacionesObjetivoString[count]=localizacionesObjetivoString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n cambio=cambio+partes[1].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\";\n }\n for (int f,i = 0; i < numelementos[0]; i++) { //Control de errores /*\n f=0;\n for (int j = 0; j < localizacionesObjetivoString[i].length(); j++) {\n if(localizacionesObjetivoString[i].charAt(j)==')'||localizacionesObjetivoString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag2=1;\n }\n } // */\n\n count=0;\n\n // for para los objetos objetivo\n for (int i=0; count<numelementos[1]; ++i){\n if (partes[2].charAt(i)==')'){\n objetosObjetivoString[count]=\"\";\n cambio=cambio+partes[2].charAt(i);\n objetosObjetivoString[count]=objetosObjetivoString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n cambio=cambio+partes[2].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\";\n }\n for (int f,i = 0; i < numelementos[0]; i++) { //Control de errores /*\n f=0;\n for (int j = 0; j < objetosObjetivoString[i].length(); j++) {\n if(objetosObjetivoString[i].charAt(j)==')'||objetosObjetivoString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag2=1;\n }\n } // */\n\n } catch (Exception e) {\n System.out.println(\"ERRROR EN LA LECTURA DE FICHERO\");\n flag2=1;\n }\n \n System.out.println(\"\");\n }",
"public String[] getAvailableSpelunkerDat()\n {\n return super.getAvailableDatList();\n }",
"public String[] getGeoSystem();",
"public String[] getTrainingSettings();",
"@Test\r\n public void testAngabenInArraySpeichern() {\r\n System.out.println(\"angabenInArraySpeichern\");\r\n Texteinlesen instance = new Texteinlesen();\r\n instance.angabenInArraySpeichern();\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"public static String[] setMaterialsName(String[] materialsName, int i, Scanner sc){\n\t\t\n\t\tSystem.out.println(\"Ingrese el nombre del material numero \" + (i+1) + \":\");\n\t\tmaterialsName[i] = sc.nextLine();\n\t\treturn materialsName;\n\t\t\n\t}"
]
| [
"0.60889566",
"0.5539262",
"0.5426713",
"0.5329979",
"0.53180856",
"0.52505434",
"0.5207947",
"0.51877314",
"0.5186714",
"0.5177333",
"0.51665914",
"0.51632833",
"0.5152",
"0.51451033",
"0.5143768",
"0.51370853",
"0.5098942",
"0.5084155",
"0.5082935",
"0.5079245",
"0.50418913",
"0.5041092",
"0.5019712",
"0.49973437",
"0.49792662",
"0.49727395",
"0.49707806",
"0.49623987",
"0.49619758",
"0.49591917",
"0.49550232",
"0.49484777",
"0.4947318",
"0.49412844",
"0.49409816",
"0.4940318",
"0.49371204",
"0.49310696",
"0.4927677",
"0.49050963",
"0.49030966",
"0.48982465",
"0.4897716",
"0.4886333",
"0.48832014",
"0.48701832",
"0.48654374",
"0.48568228",
"0.48531377",
"0.48471978",
"0.48433614",
"0.4842713",
"0.4819162",
"0.4817148",
"0.48124683",
"0.48115182",
"0.48043516",
"0.48039493",
"0.4803683",
"0.47994125",
"0.4796798",
"0.47898695",
"0.47893593",
"0.47881183",
"0.47840056",
"0.4778097",
"0.47715098",
"0.47704726",
"0.47632164",
"0.47614658",
"0.47611728",
"0.47598124",
"0.4756217",
"0.47552645",
"0.47503155",
"0.47484002",
"0.47428706",
"0.4742371",
"0.47408637",
"0.4740799",
"0.47371095",
"0.4735427",
"0.47348598",
"0.47296515",
"0.47287363",
"0.47239193",
"0.4721133",
"0.47204387",
"0.47174722",
"0.4712622",
"0.47059628",
"0.47044155",
"0.46997643",
"0.46963295",
"0.4693987",
"0.46932423",
"0.46931857",
"0.46911678",
"0.46911517",
"0.46878713"
]
| 0.5235487 | 6 |
Inner x = new Inner(); | private void demoInnerClass2() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Inner getInner(){\n Outer.this.toString();\n return this.new Inner();\n }",
"public static void main(String args[]){\n\tOuter.createInner();\r\n\t//new Outer.Inner();\r\n\t//new Outer.new Inner();\r\n}",
"void outerMethod() {\n\t\n\tclass Inner {\n\t \n\t protected Inner() { }\n\t public int publicInner = 100;\n\t int privateInner = Outer.this.privateOuter; \n\t \n\t Object foo = Outer.this.foo();\n\t \n\t void printOuterObjectFromInner() {\n\t\tSystem.out.println(\"Hello from inner: \" + foo);\n\t }\n\t \n\t}\n\tInner in2 = new Inner();\n\tin2.printOuterObjectFromInner();\n }",
"public void callInner() {\n Inner inner = new Inner();\n inner.go();\n int f = inner.private_int; //private inner fields visible to Outer class\n }",
"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}",
"void displayInner(){\r\n\t\t\tInnerClass inner = new InnerClass();\r\n\t\t\tinner.print();\r\n\t\t}",
"ClassType outer();",
"public static void innerClassUsage() {\n final SimpleInterface.InnerClass<String> inner =\n new SimpleInterface.InnerClass<String>();\n }",
"inner(int y) {\r\n\t\t\t\r\n\t\t\tthis.y = y;\r\n\t\t}",
"public static void main(String args[])\n\t{\n\t\tOuter outer = new Outer();\n\t\tOuter.Inner innerobj1 = (Inner) outer.method(outer);\n\t\tinnerobj1.print();\n\t}",
"public static void main(String[] args) {\n\t\tMembers_Inner_class a = new Members_Inner_class();\r\n\t\tMembers_Inner_class.Inner obj = a.new Inner();//Members\r\n\t\tobj.msg();\r\n\t\t\r\n\r\n\t}",
"public static void main(String []args){\n\t\tOuter o1 = new Outer();\n\t\to1.Method1Out();\n\n\t\t//Creating object of inner class: \n\t\t//Object creation method 1: (For using this method first we have to create the object of outer class)\n\t\tOuter.Inner i1 = o1.new Inner();\n\t\ti1.MethodIn();\n\n\t\t//Object creation method 2:\n\t\tOuter.Inner i2 = new Outer().new Inner();\n\t\ti2.MethodIn();\n\t}",
"public static void main(String[] args) throws Exception {\r\n\t\tInnerAnnomiousNestedClass n=new InnerAnnomiousNestedClass();\r\n\t BB b=new BB() {\r\n\t\t @Override\r\n\t\tpublic void show() {\r\n\t\t\tSystem.out.println(\"Hello How are you\");\r\n\t\t}\r\n\t};\r\n\t // AA a=new AA();\r\n\t}",
"private InnerClassSingleton(){}",
"public static void main(String[] args) {\n\t\tOuter o=new Outer();\n\t\tOuter.inner in=o.new inner();\n\t\tin.disp_inner();\n\n\t}",
"public void getInner(int newIn) {\r\n\t\tinner = newIn;\r\n\t}",
"private void printMe() {\n\t\tInnerClass inner = new InnerClass();\n\t\tinner.printMe();\n\t}",
"public static void main(String[] args){\n\t\tOuter o = new Outer();\n\t\to.method();\n\t}",
"LabInner innerModel();",
"public void m1(){\n\t\tfinal int x = 10;\n\n\t\tclass inner{\n\t\t\tpublic void m2(){\n\t\t\t\tSystem.out.println(x);\t// in java7 u can't access local variable of method.\n\t\t\t}\n\t\t}\n\n\t\tinner i = new inner();\n\t\ti.m2();\n\t}",
"public DownloadResponseInner() {\n }",
"public QueryResponseInner() {\n }",
"public ApiReleaseContractInner() {\n }",
"public IClassHolder getOuterClass() {\n return m_outerClass;\n }",
"@Override public void visitInnerClass(\n String name,\n String outerName,\n String innerName,\n int access) {\n }",
"public static void main(String[] args) {\n\t\tOuterClass.Inner in = new OuterClass.Inner();\n\t\tin.display();\n\t}",
"public VirtualNetworkPeeringInner() {\n }",
"public static void main(String[] arg){\n OuterClass2 outer = new OuterClass2();\n //Instantiating the inner class\n OuterClass2.InnerClass inner = outer.new InnerClass();\n \n System.out.println(inner.readNum());\n }",
"RepoInner innerModel();",
"public Inner(Inner other) {\n __isset_bitfield = other.__isset_bitfield;\n if (other.isSetInner_str()) {\n this.inner_str = other.inner_str;\n }\n this.inner_double = other.inner_double;\n }",
"public RulesEngineInner() {\n }",
"public interface InnerClass {\n int getNumber();\n}",
"boolean isInner();",
"public static void main(String[] args) {\n\t\tOuter.Inner inner=new Outer.Inner();\n\t\tinner.display();\n\n\t}",
"private static class <init>\n implements e\n{\n\n public String a()\n {\n return \"\";\n }",
"public static void main(String[] args) {\n\t\tnew MethodInnerclass().outerclassmethod();\r\n\t}",
"public EndpointPropertiesBaseInner() {\n }",
"public static void main(String[] args) {\n\t\tOuter1 O1=new Outer1();\n\t\tOuter1.Inner1 I1=O1.new Inner1();\n\t\tSystem.out.println(I1.getx());\n\t\tOuter2 O2=new Outer2();\n\t\tO2.function1();\n\t\tOuter3 o3=new Outer3();\n\t\to3.myFunction();\n\t\tOuter4 o4=new Outer4();\n\t\to4.DisplayMessage2();\n\t\t//Outer5.Inner5 i5=new Outer5.Inner5();\n\t\t//i5.MyMethod();\n\t\tOuter5.Inner5.MyMethod();\n\n\t}",
"@Override\n\tpublic void inner1() {\n\t\tSystem.out.println(\"Hello inner1()\");\n\t}",
"boolean isInnerClass();",
"public final void mT__72() throws RecognitionException {\r\n try {\r\n int _type = T__72;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // ../org.openmodelica.modelicaml.editor.xtext.modification.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/modification/ui/contentassist/antlr/internal/InternalModification.g:69:7: ( 'inner' )\r\n // ../org.openmodelica.modelicaml.editor.xtext.modification.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/modification/ui/contentassist/antlr/internal/InternalModification.g:69:9: 'inner'\r\n {\r\n match(\"inner\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }",
"SnapshotInner innerModel();",
"public void setUpOrangeBall(){\n ballName=\"Inside Inner class Ball\";\n ballSize=15;\n System.out.println(ballName + \" ,\" + ballSize);\n }",
"public static void main(String[] args) {\n\t\tI i = new I() {\n\t\tint iv=100;\n\t\t\n\t\t@Override\n\t\tpublic void test() {\n\t\t\tSystem.out.println(\"iv= \"+iv);\n\t\t\tSystem.out.println(\"this.iv= \"+this.iv);\n\t\t\tSystem.out.println(\"I 내부 클래스의 test 메서드\");\n\t\t\t}\n\t\t};\n\t\t\n\t\ti.test();\n\t\tint iv = 100;\n\t\tAbs a = new Abs() {\n\t\t\t@Override\n\t\t\tvoid test() {\n\t\t\t\tSystem.out.println(\"iv= \"+iv);\n\t\t\t\tSystem.out.println(\"Abs 내부 클래스의 test 메서드\");\n\t\t\t}\n\t\t};\n\t\ta.test();\n\t}",
"public static InnerAnimal createInnerClassInStaticMethod(MemberInnerClassAnimal animal) {\n\t\tInnerAnimal ianimal = animal.new InnerAnimal();\n\t\treturn ianimal;\n\t}",
"public NotebookWorkspaceInner() {\n }",
"private static void test3() {\n new Son();\n\n }",
"private E() {}",
"protected final void validateNotBuildingInner()\n {\n Validate.stateIsNull(myInner,What.INNERBLOCK);\n }",
"public void getOuter(int newOut) {\r\n\t\touter = newOut;\r\n\t}",
"public static void main(String[] args) {\n\t\tChild Child = new Child();\r\n\t\tSystem.out.println(\" ex \");\r\n\t}",
"public SlotDifferenceInner() {\n }",
"@Override\n\tpublic void inner2() {\n\t\tSystem.out.println(\"Hello inner2()\");\n\t}",
"@Test\n public void test6(){\n System.out.println(Son.son);\n System.out.println(Parent.parent);\n }",
"public static void main(String[] args) {\n\t\tint x[]= {2,9,5,6,0,3,10,1,8,4,7};\n\t\tOuter outOb=new Outer(x);\n\t\toutOb.analyze();\n\n\t}",
"public static void main(String[] args) {\n\t\t\tnew Inner().display();\n\t\t}",
"RolloutInner innerModel();",
"@Test\n public void test7(){\n System.out.println(Parent.parent);\n System.out.println(Son.son);\n }",
"public Parent() {\n super();\n }",
"public Iterator<ElementType> iterator(){\n return new InnerIterator();\n }",
"public static void main(String[] args) {\n\t\tOuterClass outer = new OuterClass();\n\t\touter.outerMethod();\n\t\t\n\t\t\n\n\t}",
"public FileDicomBaseInner() {}",
"public static void main(String[] args) {\nABC d= new ABC()\n{\n\tpublic void show() \n\t{\n\t\tSystem.out.println(\" i am in the B\"); \n\t}\n};\nd.show();\n\n\t}",
"AccountInner innerModel();",
"ParentClassTwo() {\n\t\tint i = 100;\n\t\tSystem.out.println(i);\n\t}",
"private ChildContract() {}",
"@Override // Runnable hat nur eine Methode => run()\n public void run() {\n System.out.println(localVariable);\n System.out.println(Excursus.this.outerAttribute);\n Excursus.this.outerMethod(localVariable);\n\n }",
"public static void main(String[] args) {\n\n Parent parent = new Parent();\n parent.name=\"asdfasdfas\";\n\n Son son = new Son();\n\n\n }",
"DimensionInner innerModel();",
"public OperationStatusResultInner() {\n }",
"public void testInnerClassName() {\n\t\tClassName name = this.compiler.createClassName(\"test.Example$Inner\");\n\t\tassertEquals(\"Incorrect pckage\", \"generated.officefloor.test.Example\", name.getPackageName());\n\t\tassertTrue(\"Incorrect class\", name.getClassName().startsWith(\"Inner\"));\n\t\tassertEquals(\"Incorrect qualified name\", name.getPackageName() + \".\" + name.getClassName(), name.getName());\n\t}",
"public Self__1() {\n }",
"public InstanceOverflowException() {\n\t\tsuper();\n\t}",
"private static void createThreadUsingAnonymousInnerClass() {\n\t\tRunnable rn = new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"My Anonymous Inner Class thread is executed.\");\n\t\t\t}\n\t\t};\n\n\t\tThread th = new Thread(rn);\n\t\tth.start();\n\t}",
"public DefaultCniNetworkInner() {\n }",
"boolean ignoreInner();",
"public static void main(String[] args) {\n\t\tParent obj = new Parent();\n\t\tobj.sings();\n\t\tobj.does();\n\t\tobj = new Child();\n\t\tobj.sings();\n\t\tobj.does();\n\t}",
"private Ex() {\n }",
"public void testAnonymousInnerClassName() {\n ClassScope s = new ClassScope();\n assertEquals(\"Anonymous$1\", s.getClassName());\n s = new ClassScope();\n assertEquals(\"Anonymous$2\", s.getClassName());\n }",
"void m1() {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(outer); // can access the outer CLASS context elements\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(finalVariable); // can access to the outer METHOD context elements if FINAL\n\t\t\t\t\tSystem.out.println(effectivellyFinal); // can access to the outer METHOD context elements if EFFECTIVELY FINAL\n\t\t\t\t}",
"@Test\n public void test4(){\n //parent\n System.out.println(Parent.parent);\n System.out.println(Son.parent);\n }",
"ProductInner innerModel();",
"DppBaseResourceInner innerModel();",
"interface In2 {\n String f();\n String g();\n class Nested {\n static void testIn(In2 i) {\n System.out.println(i.f() + i.g());\n }\n }\n}",
"public Stack() { \ntop = null; \n//A constructor to initialize top \n//The answer to (iii)\n}",
"interface SimpleInterface {\n\n /**\n * Inner class with generic parameter.\n * @param <E> generic parameter\n * @since 1.0.0\n */\n final class InnerClass<E> implements SimpleInterface {\n\n }\n }",
"@Override\r\n protected void innerInit() throws Exception {\n \r\n }",
"public static void main(String[] args) {\n\t\tNested n = new Nested();\n\t\tn.m1();\n\t}",
"public NestedInteger() { }",
"public Test()\n {\n }",
"public static void main(String[] args){\n\t\tSystem.out.println(\"method\");\n\t\tParent parent = new Parent();\n\t\tparent.i=40;\n\t\tParent.Test();\n\t}",
"public Test() {\n }",
"public static void main(String[] args) {\n\n //Implementation of Anonymous Inner Class using Interface\n PrintInterface pi = new PrintInterface() {\n @Override\n public void display() {\n System.out.println(\"Mayur knows Inner Class\");\n }\n\n @Override\n public boolean isDisplayed() {\n return false;\n }\n };\n pi.display();\n System.out.println(pi.isDisplayed());\n\n\n //Implementation of Anonymous Inner Class using abstract calss\n PrintMessage pm = new PrintMessage() {\n @Override\n void printMessage() {\n System.out.println(\"Print the Message----\");\n }\n };\n pm.printMessage();\n}",
"public Owner() {\n }",
"public boolean isInnerClassReference() {\n return isInnerClassReference;\n }",
"public Edge()\r\n {\r\n }",
"public Leaf(){}",
"@Test\n public void test8(){\n Son son = new Son();\n }",
"ContentItemContractInner innerModel();"
]
| [
"0.763393",
"0.73734355",
"0.6908401",
"0.6901275",
"0.68996966",
"0.6723017",
"0.6636543",
"0.65682864",
"0.64535916",
"0.6430626",
"0.64274204",
"0.63659126",
"0.63164735",
"0.63003445",
"0.6274776",
"0.62710905",
"0.5989528",
"0.5970635",
"0.5887985",
"0.58808434",
"0.58500344",
"0.58391523",
"0.58183306",
"0.579885",
"0.5742278",
"0.57033026",
"0.5702152",
"0.5690005",
"0.5686917",
"0.55962473",
"0.55844015",
"0.5583091",
"0.5543486",
"0.5543277",
"0.553784",
"0.55286366",
"0.5490285",
"0.5487892",
"0.54488844",
"0.5426154",
"0.54205775",
"0.5407847",
"0.53895736",
"0.5364748",
"0.5354073",
"0.5304712",
"0.53043205",
"0.52911115",
"0.5284244",
"0.526767",
"0.5251019",
"0.5247838",
"0.5244318",
"0.5237816",
"0.5232863",
"0.52293164",
"0.52276295",
"0.5225603",
"0.52245563",
"0.52162015",
"0.52081835",
"0.51818186",
"0.5171015",
"0.5164113",
"0.5160183",
"0.51596797",
"0.51591796",
"0.5157118",
"0.5146643",
"0.5111449",
"0.5093639",
"0.50925803",
"0.5088399",
"0.508467",
"0.50810486",
"0.50732416",
"0.50660115",
"0.50630146",
"0.5059476",
"0.50548023",
"0.504615",
"0.50354546",
"0.50314844",
"0.5028074",
"0.5023112",
"0.50152147",
"0.50115156",
"0.5008586",
"0.49929824",
"0.49879095",
"0.4986346",
"0.4981751",
"0.49781877",
"0.49665675",
"0.49665648",
"0.4966376",
"0.4964394",
"0.4961964",
"0.4950038",
"0.4948457"
]
| 0.6298102 | 14 |
TODO Autogenerated method stub | public void setActiveEditor(IAction action, IEditorPart targetEditor) {
action.setEnabled(false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
Get the full path of this replica's data file. | @VisibleForTesting
public File getBlockFile() {
return new File(getDir(), getBlockName());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getDataFilePath() {\r\n \t\treturn dataFile;\r\n \t}",
"private String getDataPath()\n {\n Location location = Platform.getInstanceLocation();\n if (location == null) {\n return \"@none\";\n } else {\n return location.getURL().getPath();\n }\n }",
"public String getPFDataPath() {\n\t\t// TODO Auto-generated method stub\n\t\tString path = pfDir.getPath()+\"/data/\";\n\t\treturn path;\n\t}",
"public String getDataPath() {\n\t\treturn \"data\";\r\n\t}",
"public String getWorkingDataFile()\n\t{\n\t return workingDataFileName;\n\t}",
"public String getLocalFilePath() {\n return loadConn.getProperty(\"filePath\");\n }",
"public String getCurrentPath() {\n\t\treturn DataManager.getCurrentPath();\n\t}",
"public String getPath() {\n\t\treturn file.getPath();\n\t}",
"public Path getDataDirectory();",
"public String path() {\n return filesystem().pathString(path);\n }",
"public String getFullPath()\n {\n return( fullPath );\n }",
"public static String getPath() { return Objects.requireNonNull(Bukkit.getServer().getPluginManager().getPlugin(\"Catacombs\"))\n .getDataFolder().getAbsolutePath(); }",
"public String getFilepath() {\n\t\treturn this.filepath;\n\t}",
"public String getPath() {\n\t\treturn this.baseDir.getAbsolutePath();\n\t}",
"public String getFilepath() {\n\t\treturn filepath;\n\t}",
"public String getFilepath()\n\t{\n\t\treturn filepath;\n\t}",
"public final String getFilePath() {\n\t\treturn m_info.getPath();\n\t}",
"public String getFilePath() {\n return getString(CommandProperties.FILE_PATH);\n }",
"public String getFilepath() {\n return filepath;\n }",
"public String getFilepath() {\n return filepath;\n }",
"public java.lang.String getFilepath()\n {\n return filepath;\n }",
"private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}",
"private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}",
"private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}",
"private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}",
"public String getConsistencyFilePath()\n {\n String consistency_file_path = getPreferenceStore().getString(CONSISTENCY_FILE_PATH);\n return consistency_file_path;\n }",
"public String getAbsolutePath() {\n\t\treturn Util.getAbsolutePath();\n\t}",
"@Override\r\n protected String getDiskLocation()\r\n {\r\n return dataFile.getFilePath();\r\n }",
"@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }",
"public String getWalletFileDirectoryFull() {\r\n return dataDirectory + walletFileDirectory;\r\n }",
"public String getLocalBasePath() {\n\t\treturn DataManager.getLocalBasePath();\n\t}",
"public String getDataParent () {\n if (dataParent == null) {\n return System.getProperty (GlobalConstants.USER_DIR);\n } else {\n return dataParent;\n }\n }",
"private String getPath() {\r\n\t\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\r\n\t\t}",
"public String getDataFileName() {\n return dataFileName;\n }",
"public String getFilePath() {\n\t\treturn Constants.CSV_DIR+getFileName();\n\t}",
"public String getDataDirectory() {\n return dataDirectory;\n }",
"public File getJobFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n String filePath = prefs.get(powerdropshipDir, null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }",
"public String getBlockFileDirectoryFull() {\r\n return dataDirectory + blockFileDirectory;\r\n }",
"java.lang.String getFilePath();",
"public static File getDataDirectory() {\n\t\treturn DATA_DIRECTORY;\n\t}",
"String getFilepath();",
"public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }",
"public final String getPath() {\n\t\treturn this.path.toString();\n\t}",
"public String getDataDir() {\n\t\treturn dataDir;\n\t}",
"private String getDataDirectory() {\n Session session = getSession();\n String dataDirectory;\n try {\n dataDirectory = (String) session.createSQLQuery(DATA_DIRECTORY_QUERY).list().get(0);\n } finally {\n releaseSession(session);\n }\n return dataDirectory;\n }",
"public String getPath() {\n\t\treturn pfDir.getPath();\n\t}",
"public String filePath() {\n\t\treturn m_filePath;\n\t}",
"public File getDataFolder() {\n return dataFolder;\n }",
"public static String getCurrentPath() {\n File file = new File(\"\");\n return file.getAbsolutePath();\n }",
"public static String getBasepath() {\n\t\treturn basepath;\n\t}",
"public static String getBasepath() {\n\t\treturn basepath;\n\t}",
"public String getUrlDataFile() {\n\t\treturn urlDataFile;\n\t}",
"public String getMainFilePath() {\n return primaryFile.getAbsolutePath();\n //return code[0].file.getAbsolutePath();\n }",
"public String toPathString() {\n return path();\n }",
"@java.lang.Override\n public java.lang.String getFilePath() {\n return instance.getFilePath();\n }",
"public String getFilePath() {\n return getSourceLocation().getFilePath();\n }",
"public final String getPath()\n {\n return path;\n }",
"private String getFilePath(){\n\t\tif(directoryPath==null){\n\t\t\treturn System.getProperty(tmpDirSystemProperty);\n\t\t}\n\t\treturn directoryPath;\n\t}",
"private String getDatabaseFilePath(NotesDatabase db) {\n try {\n return db.getFilePath();\n } catch (RepositoryException ex) {\n LOGGER.log(Level.WARNING, \"Unable to retrieve database's file path\", ex);\n return null;\n }\n }",
"String getFilePath();",
"public String getStorageLocation() {\n\t\treturn io.getFile();\n\t}",
"public File getDataStoreDir() {\n\t\treturn this.localDataStoreDir;\n\t}",
"public static String getPathDB() {\n return pathDB;\n }",
"protected String path() {\n return path(getName());\n }",
"public String getPath() { return db.getPath(); }",
"private String db4oDBFullPath(Context ctx) {\t\n\t\treturn ctx.getDir(\"data\", 0) + \"/\" + LOCAL_SERVER;\n\t\n\t}",
"public String path() {\n return this.path;\n }",
"public String path() {\n return this.path;\n }",
"Path getFilePath();",
"private File getDataDir(){\n\t\tFile file = new File(this.configManager.getConfigDirectory() +\n\t\t\t\tFile.separator + \n\t\t\t\tDATA_DIR);\n\t\t\n\t\tif(!file.exists()){\n\t\t\tfile.mkdirs();\n\t\t}\n\t\t\n\t\treturn file;\n\t}",
"public File getDataFile();",
"public String getShHarvestedDataDir() {\n\n\t\treturn shHarvestedDataDir;\n\n\t}",
"public abstract String getFullPath();",
"public static String m19635c() {\n String str;\n try {\n str = Environment.getDataDirectory().getPath();\n } catch (Throwable unused) {\n str = null;\n }\n return str == null ? \"\" : str.trim();\n }",
"public File getPath() {\n return this.path;\n }",
"public String getPath()\n {\n\n return _path;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getFilePathBytes() {\n return instance.getFilePathBytes();\n }",
"public String filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }",
"public URI getSwapFileDataRoot() {\n return swapFileDataRoot;\n }",
"public String getPath();",
"public String getPath();",
"public String getPath();",
"public final String getCanonicalPath()\n {\n return FileUtilities.getCanonicalPath(getLocalFile());\n }",
"Path getDoctorRecordsFilePath();",
"public String getFilePath()\n\t{\n\t\treturn filePath;\n\t}",
"String getUserDatabaseFilePath();",
"String getFullWorkfileName();",
"public String getPath() {\n\t\treturn getString(\"path\");\n\t}",
"public String getFilePath() {\n return ScreenRecordService.getFilePath();\n }",
"protected String getFileNamePath()\n {\n String sep = System.getProperty(\"file.separator\", \"/\");\n// String path = System.getProperty(\"user.dir\", \".\");\n\n String filename = getPath() + sep + \"sec.dat\";\n\n return filename;\n }",
"public String getAbsPath();",
"public File getApplicationPath()\n {\n return validateFile(ServerSettings.getInstance().getProperty(ServerSettings.APP_EXE));\n }",
"public String getFilePath()\n {\n return filePath;\n }",
"public String getHarvestedDataDir() {\n\n\t\treturn harvestedDataDir;\n\n\t}",
"public File getDataSaveFile() {\n return dataSaveFile;\n }",
"public String getPath()\n {\n return path;\n }",
"public String getPath()\n {\n return path;\n }",
"public File getPersonFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(LivrariaPrincipal.class);\n String filePath = prefs.get(\"filePath\", null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }",
"public String getFilePath() {\n return this.filePath;\n }",
"public String getFilePath() {\n return this.filePath;\n }",
"public String getFilePath() {\n return this.filePath;\n }"
]
| [
"0.73204887",
"0.71337533",
"0.70460016",
"0.6962477",
"0.6811593",
"0.67940813",
"0.6768709",
"0.67398566",
"0.6734608",
"0.6701541",
"0.66356236",
"0.66103137",
"0.66091794",
"0.65726906",
"0.6549185",
"0.654503",
"0.6514674",
"0.6484256",
"0.64732003",
"0.64732003",
"0.6445137",
"0.64417493",
"0.64417493",
"0.64417493",
"0.64417493",
"0.6436777",
"0.64365375",
"0.64127284",
"0.64044034",
"0.6402401",
"0.63991845",
"0.6388217",
"0.638406",
"0.6382503",
"0.63724816",
"0.6357804",
"0.6325372",
"0.632101",
"0.63178384",
"0.6298151",
"0.62872857",
"0.62741256",
"0.62593186",
"0.6247732",
"0.62228054",
"0.6221595",
"0.621192",
"0.62094086",
"0.62085813",
"0.6204044",
"0.6204044",
"0.6185462",
"0.6176367",
"0.61673504",
"0.6162366",
"0.614911",
"0.6143155",
"0.6126342",
"0.6124954",
"0.6097445",
"0.6071398",
"0.60671604",
"0.606139",
"0.60333174",
"0.6027639",
"0.6023745",
"0.6023025",
"0.6023025",
"0.6016852",
"0.6015613",
"0.60076845",
"0.60023093",
"0.5997733",
"0.5990637",
"0.5988701",
"0.5987265",
"0.5975758",
"0.59701407",
"0.5963386",
"0.5939929",
"0.5939929",
"0.5939929",
"0.5939067",
"0.5932313",
"0.5927204",
"0.5925699",
"0.59197265",
"0.59196395",
"0.591258",
"0.5909835",
"0.59078616",
"0.5903021",
"0.5901825",
"0.58964056",
"0.58871484",
"0.58845705",
"0.58845705",
"0.58780134",
"0.5871595",
"0.5871595",
"0.5871595"
]
| 0.0 | -1 |
Get the full path of this replica's meta file. | @VisibleForTesting
public File getMetaFile() {
return new File(getDir(),
DatanodeUtil.getMetaName(getBlockName(), getGenerationStamp()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getMetaFile() {\r\n return metaFile;\r\n }",
"public String getFullPath()\n {\n return( fullPath );\n }",
"public String getMetaDataFileName() {\n return null;\n }",
"public final String getFilePath() {\n\t\treturn m_info.getPath();\n\t}",
"public String getPath() {\n\t\treturn file.getPath();\n\t}",
"@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }",
"public static String getHelpContentFilePath() {\n\t\tFile jarPath = SX3Manager.getInstance().getInstallLocation();\n\t\tString sx3helpContentPath = jarPath.getParentFile().getAbsolutePath() + \"/SX3_CONFIGURATION_HELP_CONTENT.json\";\n\t\treturn sx3helpContentPath;\n\t}",
"public String getFilePath() {\n return getString(CommandProperties.FILE_PATH);\n }",
"public abstract String getFullPath();",
"public String getFilepath() {\n\t\treturn this.filepath;\n\t}",
"@java.lang.Override\n public java.lang.String getFilePath() {\n return instance.getFilePath();\n }",
"@Override\n\tpublic String toString() {\n\t\treturn getFullPath();\n\t}",
"public String path() {\n return filesystem().pathString(path);\n }",
"@Override\n public String getFilename() {\n if (workflowMeta == null) {\n return null;\n }\n return workflowMeta.getFilename();\n }",
"public static File getOzoneMetaDirPath(ConfigurationSource conf) {\n File dirPath = getDirectoryFromConfig(conf,\n HddsConfigKeys.OZONE_METADATA_DIRS, \"Ozone\");\n if (dirPath == null) {\n throw new IllegalArgumentException(\n HddsConfigKeys.OZONE_METADATA_DIRS + \" must be defined.\");\n }\n return dirPath;\n }",
"public String getLocalFilePath() {\n return loadConn.getProperty(\"filePath\");\n }",
"public String getFilepath() {\n\t\treturn filepath;\n\t}",
"public String getFullPathName() {\r\n return fullPathName;\r\n }",
"protected String path() {\n return path(getName());\n }",
"public java.lang.String getFilepath()\n {\n return filepath;\n }",
"public String getFilepath()\n\t{\n\t\treturn filepath;\n\t}",
"public String getFilepath() {\n return filepath;\n }",
"public String getFilepath() {\n return filepath;\n }",
"public String getAbsolutePath() {\n\t\treturn Util.getAbsolutePath();\n\t}",
"public abstract String getFileLocation();",
"public String getStorageLocation() {\n\t\treturn io.getFile();\n\t}",
"public String customPath() {\n return this.customPath;\n }",
"public String getCurrentPath() {\n\t\treturn DataManager.getCurrentPath();\n\t}",
"public String path() {\n return this.path;\n }",
"public String path() {\n return this.path;\n }",
"Path getModBookFilePath();",
"private static File resolveMetaFile(String path) {\n return new File(StringUtils.substringBefore(path, DEF_LOC_ARTIFACT) + DEF_REL_META + File.separator + \"project.tms.json\");\n }",
"public final String getCanonicalPath()\n {\n return FileUtilities.getCanonicalPath(getLocalFile());\n }",
"public abstract String getFotoPath();",
"public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }",
"public String getFilePath() {\n return getSourceLocation().getFilePath();\n }",
"java.lang.String getFilePath();",
"public final String getPath() {\n\t\treturn this.path.toString();\n\t}",
"public String getPath() {\n\t\treturn getString(\"path\");\n\t}",
"public final String getFilename() {\n return properties.get(FILENAME_PROPERTY);\n }",
"public String getPath() {\n if (fileType == HTTP) {\n return fileName.substring(0, fileName.lastIndexOf(\"/\"));\n } else {\n return fileName.substring(0, fileName.lastIndexOf(File.separator));\n }\n }",
"public String getFileName()\r\n\t{\r\n\t\treturn settings.getFileName();\r\n\t}",
"private String getDatabaseFilePath(NotesDatabase db) {\n try {\n return db.getFilePath();\n } catch (RepositoryException ex) {\n LOGGER.log(Level.WARNING, \"Unable to retrieve database's file path\", ex);\n return null;\n }\n }",
"Path getManageMeFilePath();",
"public String getRemoteFileName() {\n\t\treturn this.reader.getRemoteFileName();\n\t}",
"public String getPathName()\n {\n return getString(\"PathName\");\n }",
"public String getName() {\n return _file.getAbsolutePath();\n }",
"public String getFile() {\n return \"null\"; // getFileTopic().getCompositeValue().getTopic(FILE_PATH);\n }",
"public String getMainFilePath() {\n return primaryFile.getAbsolutePath();\n //return code[0].file.getAbsolutePath();\n }",
"public String getMetaUrl() {\r\n return metaUrl;\r\n }",
"public String filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }",
"public String getFilePath() {\n return ScreenRecordService.getFilePath();\n }",
"public java.lang.String getAltcontentpath() {\n return altcontentpath;\n }",
"@Override\n protected String getFileName() {\n return path;\n }",
"public final String getPath()\n {\n return path;\n }",
"public String getFileName(){\r\n\t\treturn linfo != null ? linfo.getFileName() : \"\";\r\n\t}",
"public String getPath();",
"public String getPath();",
"public String getPath();",
"String getFilepath();",
"public final String getFileName() {\n\t\treturn m_info.getFileName();\n\t}",
"private String getFullPath()\n\t{\n\t\tif (libraryName.equals(\"\"))\n\t\t{\n\t\t\treturn fileName;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn libraryName + \"/\" + fileName;\n\t\t}\n\t}",
"public String path() {\n\treturn path;\n }",
"public static String getBasepath() {\n\t\treturn basepath;\n\t}",
"public static String getBasepath() {\n\t\treturn basepath;\n\t}",
"public String getName() { return FilePathUtils.getFileName(getPath()); }",
"public String getPath() throws Exception {\n\t\t/*\n\t\t * return \"/news-oppsRecord\" + doc.selectSingleNode\n\t\t * (\"/metadataFieldInfo/field/@path\").getText();\n\t\t */\n\t\treturn doc.selectSingleNode(\"/metadataFieldInfo/field/@path\").getText();\n\t}",
"public File getPath() {\n return this.path;\n }",
"String getFile() {\n\t\treturn file;\n\t}",
"String getFilePath();",
"@Nullable public String getFileName() {\n return getSourceLocation().getFileName();\n }",
"@Override\n\tpublic String getFilename() {\n\t\treturn this.path.getFileName().toString();\n\t}",
"public String file() {\n return this.file;\n }",
"File getTilePathBase();",
"public File getJobFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n String filePath = prefs.get(powerdropshipDir, null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }",
"public String getFile()\n\t{\n\t\treturn file;\n\t}",
"public String getFile()\n\t{\n\t\treturn file;\n\t}",
"private String getDataPath()\n {\n Location location = Platform.getInstanceLocation();\n if (location == null) {\n return \"@none\";\n } else {\n return location.getURL().getPath();\n }\n }",
"public Object getEntryFilePath() {\n return this.entryFilePath;\n }",
"public String getLocationPath();",
"public String getFilePath() {\n return null;\n }",
"public String getShMetadataPrefix() {\n\n\t\treturn shMetadataPrefix;\n\n\t}",
"public String getFilePath() {\n return theRemoteFilePath;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String getPath() {\n return this.path;\n }",
"public String toPathString() {\n return path();\n }",
"public String getPath() {\n\t\treturn this.path;\n\t}",
"public String getPath() {\r\n return path;\r\n }"
]
| [
"0.70902354",
"0.6455019",
"0.62872326",
"0.6280424",
"0.6235555",
"0.6133137",
"0.60631055",
"0.6049344",
"0.6018001",
"0.6012094",
"0.60059536",
"0.59950614",
"0.5991921",
"0.5939168",
"0.59061164",
"0.5902771",
"0.5900265",
"0.5897243",
"0.58531195",
"0.5835934",
"0.5835788",
"0.5826203",
"0.5826203",
"0.58132255",
"0.5811334",
"0.5805484",
"0.5798482",
"0.57910484",
"0.57826155",
"0.57826155",
"0.57786417",
"0.5764621",
"0.57545817",
"0.57544434",
"0.5739067",
"0.5734791",
"0.57337224",
"0.5718263",
"0.5707475",
"0.5686183",
"0.56650937",
"0.56428295",
"0.5641841",
"0.5641275",
"0.5639415",
"0.5638234",
"0.5635211",
"0.5629817",
"0.5605069",
"0.5602245",
"0.55978906",
"0.55965495",
"0.559363",
"0.5575986",
"0.55732924",
"0.55658555",
"0.55645347",
"0.55645347",
"0.55645347",
"0.5553632",
"0.5553452",
"0.5551306",
"0.5535653",
"0.553306",
"0.553306",
"0.55321985",
"0.55276203",
"0.5525932",
"0.5524079",
"0.5516558",
"0.5514565",
"0.55121666",
"0.55116504",
"0.55105865",
"0.55044013",
"0.5501465",
"0.5501465",
"0.5501034",
"0.54993963",
"0.54981804",
"0.54967296",
"0.5493124",
"0.5492975",
"0.54863286",
"0.54863286",
"0.54863286",
"0.54863286",
"0.54863286",
"0.54863286",
"0.54863286",
"0.54863286",
"0.54863286",
"0.54863286",
"0.54863286",
"0.54863286",
"0.54863286",
"0.54844326",
"0.548195",
"0.5479496",
"0.5468562"
]
| 0.6893212 | 1 |
Return the parent directory path where this replica is located. | protected File getDir() {
return hasSubdirs ? DatanodeUtil.idToBlockDir(baseDir,
getBlockId()) : baseDir;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public File getWorkingParent()\n {\n return validatePath(ServerSettings.getInstance().getProperty(ServerSettings.WORKING_PARENT));\n }",
"public String getParent() {\n Path path = getPathNIO();\n if (path == null) {\n return \"\";\n }\n\n Path parent = Paths.get(this.dataSource).toAbsolutePath().relativize(path.getParent());\n\n return parent.toString();\n }",
"public String getPath()\n\t{\n\t\tString previousPath = File.separator;\n\t\t\n\t\t//if there is a parent\n\t\tif(getParentDirectory() != null)\n\t\t{\n\t\t\t//write over the previous path with the parent's path and a slash\n\t\t\t// /path/to/parent\n\t\t\tpreviousPath = getParentDirectory().getPath() + File.separator;\n\t\t}\n\t\t//else- no parent, this is the root \"/\"\n\t\t\n\t\t//add the name, /path/to/parent/thisdir \n\t\treturn previousPath + getName();\t\t\n\t}",
"public String getDataParent () {\n if (dataParent == null) {\n return System.getProperty (GlobalConstants.USER_DIR);\n } else {\n return dataParent;\n }\n }",
"@Override\r\n public FileName getParent() {\r\n final String parentPath;\r\n final int idx = getPath().lastIndexOf(SEPARATOR_CHAR);\r\n if (idx == -1 || idx == getPath().length() - 1) {\r\n // No parent\r\n return null;\r\n }\r\n if (idx == 0) {\r\n // Root is the parent\r\n parentPath = SEPARATOR;\r\n } else {\r\n parentPath = getPath().substring(0, idx);\r\n }\r\n return createName(parentPath, FileType.FOLDER);\r\n }",
"public String getParentId() {\n return getProperty(Property.PARENT_ID);\n }",
"public String getSourceDir() {\n\t\tif (sourceDir != null)\n\t\t\treturn sourceDir;\n\t\telse if (parent == null)\n\t\t\treturn \"./\";\n\t\telse\n\t\t\treturn parent.getSourceDir();\n\t}",
"protected Directory getParent() {\n return parent;\n }",
"public String getPath() {\n\t\treturn this.baseDir.getAbsolutePath();\n\t}",
"public com.vmware.converter.ManagedObjectReference getParentFolder() {\r\n return parentFolder;\r\n }",
"public String getParent() {\n int index = filename.lastIndexOf(separatorChar);\n\n if (index > 0) {\n return filename.substring(0, index);\n } else {\n return null;\n }\n\n }",
"public Path parent() {\n if (isRoot()) {\n return this;\n } else {\n String[] newParts = new String[parts.length - 1];\n for (int i = 0; i < parts.length - 1; i++) {\n newParts[i] = parts[i];\n }\n return new Path(newParts, true);\n }\n }",
"public String getParentName() {\n return getProperty(Property.PARENT_NAME);\n }",
"public VRL getParentLocation()\n {\n \tif (this.getVRL()==null)\n \t\treturn null; \n \t\n \treturn this._nodeVRL.getParent();\n }",
"public File getGitRepoContainerDir() {\n return config.getGitReposParentDir();\n }",
"private String getParentPath(String path) {\n int slash = path.lastIndexOf('/');\n if (slash == -1) {\n return null;\n } else {\n if (slash == 0) {\n // return \"root\" if parent path is empty string\n return \"/\";\n } else {\n return path.substring(0, slash);\n }\n }\n }",
"public String getTargetDir() {\n\t\tif (targetDir != null)\n\t\t\treturn targetDir;\n\t\telse if (parent == null)\n\t\t\treturn \"./\";\n\t\telse\n\t\t\treturn parent.getTargetDir();\n\t}",
"public Folder getParentFolder() {\n\t\treturn parentFolder;\n\t}",
"public String getParentFolderId() {\n return parentFolderId;\n }",
"public Path getParent(\n ) {\n return this.parent;\n }",
"public IDirectory getParent() {\n return this.parent;\n }",
"public Long getParentFolderId() {\n return parentFolderId;\n }",
"public Long getParentFolderId() {\r\n\t\treturn parentFolderId;\r\n\t}",
"public String getParentId() {\n return getParent() != null ? getParent().getId() : null;\n }",
"public static String getParentDirPath(String file) {\n Path path = Paths.get(file);\n String dirPath = path.getParent().toString();\n dirPath = formatDirectoryPath(dirPath);\n return dirPath;\n }",
"public String getPath() {\n String result = \"\";\n Directory curDir = this;\n // Keep looping while the current directories parent exists\n while (curDir.parent != null) {\n // Create the full path string based on the name\n result = curDir.getName() + \"/\" + result;\n curDir = (Directory) curDir.getParent();\n }\n // Return the full string\n result = \"/#/\" + result;\n return result;\n }",
"public static String sBasePath() \r\n\t{\r\n\t\tif(fromJar) \r\n\t\t{\r\n\t\t\tFile file = new File(System.getProperty(\"java.class.path\"));\r\n\t\t\tif (file.getParent() != null)\r\n\t\t\t{\r\n\t\t\t\treturn file.getParent().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public File getDirectory() {\n\t\treturn file.getParentFile();\n\t}",
"public int getParentFolderID() {\n\t\treturn parentFolderID;\n\t}",
"public static String getBaseDir() {\r\n Path currentRelativePath = Paths.get(System.getProperty(\"user.dir\"));\r\n return currentRelativePath.toAbsolutePath().toString();\r\n }",
"public final String getCanonicalPath()\n {\n return FileUtilities.getCanonicalPath(getLocalFile());\n }",
"public String getAbsolutePath() {\n String path = null;\n if (parent != null) {\n path = parent.getAbsolutePath();\n path = String.format(\"%s/%s\", path, name);\n } else {\n path = String.format(\"/%s\", name);\n }\n return path;\n }",
"public static IPath getInputParentPath(IEditorInput input) {\r\n IPath inputPath = null;\r\n if (input instanceof ILocationProvider) {\r\n inputPath = ((ILocationProvider) input).getPath(input);\r\n } else if (input instanceof IFileEditorInput) {\r\n IFile inputFile = ((IFileEditorInput) input).getFile();\r\n if (inputFile != null) {\r\n inputPath = inputFile.getLocation();\r\n }\r\n }\r\n if (inputPath != null && !inputPath.isEmpty()) {\r\n inputPath = inputPath.removeLastSegments(1);\r\n }\r\n return inputPath;\r\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public String getParentId() {\n return parentId;\n }",
"public Optional<NamespaceId> getParentId() {\n return parentId;\n }",
"private String getInitialDirectory() {\n String lastSavedPath = controller.getLastSavePath();\n\n if (lastSavedPath == null) {\n return System.getProperty(Constants.JAVA_USER_HOME);\n }\n\n File lastSavedFile = new File(lastSavedPath);\n\n return lastSavedFile.getAbsoluteFile().getParent();\n }",
"public static String getClassPathFileParentDir(String resFile)\n\t{\n\t\tURL url = ClassUtils.getClassLoader(ResourceUtil.class).getResource(resFile) ;\n\n\t\t//System.out.println( \"url============\" + url ) ;\n\n\t\tString fullPath = null ;\n\t\ttry\n\t\t{\n\t\t\tfullPath = new File(url.getFile(), \".\").getCanonicalPath() ;\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\tthrow new RuntimeException(\"获取配置文件路径出错:\" + e.getMessage(), e) ;\n\t\t}\n\n\t\tfullPath = fullPath.replaceAll(\"\\\\\\\\\", SEPARATOR) ;\n\n\t\tString parentPath = fullPath.substring(0, fullPath.lastIndexOf(SEPARATOR)) ;\n\n\t\tif (!parentPath.endsWith(SEPARATOR))\n\t\t{\n\t\t\tparentPath = parentPath + SEPARATOR ;\n\t\t}\n\n\t\treturn parentPath ;\n\t}",
"public String getRelativePath() {\n if (repository == null) {\n return name;\n } else {\n StringBuffer b = new StringBuffer();\n repository.getRelativePath(b);\n b.append(name);\n return b.toString();\n }\n }",
"public String getWorkRelativePath() {\n return getWorkRelativePath(testURL);\n }",
"public String getParentContainerXPath()\n\t{\n\t\treturn this.parentContainerXPath;\n\t}",
"public long getParentId()\n {\n return parentId;\n }",
"public java.lang.Long getParentId() {\n return parentId;\n }",
"public String getParent() {\n return _theParent;\n }",
"com.google.protobuf.ByteString\n getParentBytes();",
"public Long getParentId() {\n return parentId;\n }",
"public Long getParentId() {\n return parentId;\n }",
"public Long getParentId() {\n return parentId;\n }",
"public Long getParentId() {\n return parentId;\n }",
"public Integer getParentLocationId() {\n return parentLocationId;\n }",
"public String getParent() {\n return _parent;\n }",
"Path getRootPath();",
"public Integer getParentid() {\n\t\treturn parentid;\n\t}",
"public int getParent_id() {\n return this.parent_id;\n }",
"public String workingDirectory() {\n\t\treturn workingDir.getAbsolutePath();\n\t}",
"public int getParentID() {\n\t\treturn parentID;\n\t}",
"public String getParentName() {\n return parentName;\n }",
"public String getParent() {\n return parent;\n }",
"@Override\n\tpublic String getWorkingDir() {\n\t\treturn model.getWorkingDir();\n\t}",
"public String getParentName() {\n return parentName;\n }",
"public int getParentID() {\n\t\treturn _parentID;\n\t}",
"private static String getParentPath(String path) {\n return path.contains(\".\") ? path.substring(0, path.lastIndexOf('.')) : \"\";\n }",
"public int getParentId() {\r\n\t\treturn parentId;\r\n\t}",
"public String getParent() {\r\n return this.parent;\r\n }",
"public Long getParentId() {\n return this.parentId;\n }",
"public FileIndex getParent()\n {\n return( parent );\n }",
"public String getParent() {\r\n return parent;\r\n }",
"private Path safeGetParentsParent(Path path) {\n if (path.getParent() != null && path.getParent().getParent() != null\n && path.getParent().getParent().getParent() != null) {\n return path.getParent().getParent().getParent();\n }\n return null;\n }",
"public Path getParent() {\n if (!isAbsolute()) {\n throw new UnsupportedOperationException();\n }\n\n // return null for empty paths (root node or empty relative path)\n if (segments.length == 0) {\n return null;\n }\n\n return new Path(Arrays.copyOfRange(segments, 0, segments.length - 1));\n }",
"public String getParentName() {\n\t\treturn parentName;\n\t}",
"public Long getParentConversationId()\r\n\t{\r\n\t\treturn parentConversationId;\r\n\t}",
"public Integer getParentId() {\n return parentId;\n }",
"public Integer getParentId() {\n return parentId;\n }",
"public Integer getParentId() {\n return parentId;\n }",
"public static String getInstanceWorkerIdRootNodePath() {\n return String.join(\"/\", \"\", ROOT_NODE, COMPUTE_NODE, WORKER_ID);\n }",
"public File getConfigRoot()\r\n\t{\n\t\treturn file.getParentFile();\r\n\t}",
"com.google.protobuf.ByteString getParentBytes();",
"public int parentInode() { return ROOT_INODE; }",
"public java.lang.Integer getParentId();",
"public long getParentKey() {\n\t\treturn parentKey;\n\t}",
"public String getCurrentPath() {\n\t\treturn DataManager.getCurrentPath();\n\t}",
"java.lang.String getParent();",
"java.lang.String getParent();",
"public static String getBaseDir() {\n // 'basedir' is set by Maven Surefire. It always points to the current subproject,\n // even in reactor builds.\n String baseDir = System.getProperty(\"basedir\");\n\n // if 'basedir' is not set, try the current directory\n if (baseDir == null) {\n baseDir = System.getProperty(\"user.dir\");\n }\n return baseDir;\n }",
"public XMLPath getParent() {\r\n return this.parent == null ? null : this.parent.get();\r\n }",
"@Override\n\tpublic String getDirName() {\n\t\treturn StringUtils.substringBeforeLast(getLocation(), \"/\");\n\t}",
"@DISPID(53)\r\n\t// = 0x35. The runtime will prefer the VTID if present\r\n\t@VTID(58)\r\n\tint parentID();",
"FsPath baseDir();",
"public String getRelativeFolderPath() {\r\n return relativeFolderPath;\r\n }",
"public String getParentKey() {\n\n return this.parentKey;\n }",
"public String getParent() {\r\n return (String) getAttributeInternal(PARENT);\r\n }",
"public Resource getParent()\n {\n if(parent == null)\n {\n if(parentId != -1)\n {\n try\n {\n parent = new ResourceRef(coral.getStore().getResource(parentId), coral);\n }\n catch(EntityDoesNotExistException e)\n {\n throw new BackendException(\"corrupted data parent resource #\"+parentId+\n \" does not exist\", e);\n }\n }\n else\n {\n parent = new ResourceRef(null, coral);\n }\n }\n try\n {\n return parent.get();\n }\n catch(EntityDoesNotExistException e)\n {\n throw new BackendException(\"in-memory data incosistency\", e);\n }\n }",
"public String getLocalBasePath() {\n\t\treturn DataManager.getLocalBasePath();\n\t}"
]
| [
"0.7477085",
"0.74165463",
"0.6903848",
"0.6833138",
"0.6563253",
"0.65422434",
"0.65295863",
"0.64952284",
"0.6454258",
"0.64431036",
"0.6415412",
"0.63491374",
"0.63452554",
"0.6290644",
"0.62690705",
"0.62529176",
"0.62428653",
"0.62253344",
"0.62041384",
"0.6170881",
"0.6152705",
"0.6142253",
"0.6113953",
"0.6074825",
"0.6074735",
"0.60369796",
"0.6032257",
"0.60073537",
"0.59992844",
"0.59925634",
"0.59873855",
"0.59865505",
"0.597686",
"0.5966018",
"0.5966018",
"0.5966018",
"0.5966018",
"0.5966018",
"0.5966018",
"0.5966018",
"0.5966018",
"0.5966018",
"0.59409505",
"0.5930709",
"0.5927866",
"0.59203297",
"0.59109753",
"0.59054595",
"0.590015",
"0.5898099",
"0.58870894",
"0.5885174",
"0.58841133",
"0.58841133",
"0.58841133",
"0.58841133",
"0.58833057",
"0.58633214",
"0.5857019",
"0.58564013",
"0.5827076",
"0.5825154",
"0.5824664",
"0.5817414",
"0.5815994",
"0.5811988",
"0.58099407",
"0.5800734",
"0.5784813",
"0.5777867",
"0.5772649",
"0.57702965",
"0.576592",
"0.5764182",
"0.5753473",
"0.5750764",
"0.575071",
"0.57469004",
"0.57451195",
"0.57451195",
"0.57451195",
"0.5744125",
"0.57419467",
"0.572895",
"0.57258236",
"0.5718264",
"0.5716244",
"0.571377",
"0.57119584",
"0.57119584",
"0.5707852",
"0.5701897",
"0.56963724",
"0.5694112",
"0.56920236",
"0.5682169",
"0.56781125",
"0.56596845",
"0.56533456",
"0.5636551"
]
| 0.5640654 | 99 |
Set the parent directory where this replica is located. | private void setDirInternal(File dir) {
if (dir == null) {
baseDir = null;
return;
}
ReplicaDirInfo dirInfo = parseBaseDir(dir, getBlockId());
this.hasSubdirs = dirInfo.hasSubidrs;
synchronized (internedBaseDirs) {
if (!internedBaseDirs.containsKey(dirInfo.baseDirPath)) {
// Create a new String path of this file and make a brand new File object
// to guarantee we drop the reference to the underlying char[] storage.
File baseDir = new File(dirInfo.baseDirPath);
internedBaseDirs.put(dirInfo.baseDirPath, baseDir);
}
this.baseDir = internedBaseDirs.get(dirInfo.baseDirPath);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setWorkingParent(String path) throws IllegalArgumentException\n {\n ServerSettings.getInstance().setProperty(\n ServerSettings.WORKING_PARENT,\n \"\"+validatePath(path)\n );\n }",
"public void setParent(String aParent) {\n _theParent = aParent;\n }",
"public void setParent(FileNode parent) {\r\n this.parent = parent;\r\n }",
"public void setParent(String parent) {\r\n this.parent = parent;\r\n }",
"public File getWorkingParent()\n {\n return validatePath(ServerSettings.getInstance().getProperty(ServerSettings.WORKING_PARENT));\n }",
"public void setParent(String parent) {\n _parent = parent;\n }",
"public void setParent(String parent) {\n this.parent = parent;\n }",
"@Override\n public void updateWithReplica(StorageLocation replicaLocation) {\n File diskFile = null;\n try {\n diskFile = new File(replicaLocation.getUri());\n } catch (IllegalArgumentException e) {\n diskFile = null;\n }\n\n if (null == diskFile) {\n setDirInternal(null);\n } else {\n setDirInternal(diskFile.getParentFile());\n }\n }",
"public void setParent(Node parent){\n this.parent = parent;\n }",
"protected Directory getParent() {\n return parent;\n }",
"private void setParent(Node<T> parent) {\n this.parent = parent;\n }",
"public void setParent(Node parent) {\n this.parent = parent;\n }",
"protected void setParentFolder(Folder f) {\n\t\tparentFolder = f;\n\t\tif(f!= null) {\n\t\t\tparentFolderID = f.getMyID();\n\t\t} else {\n\t\t\tparentFolderID = 0;\n\t\t}\n\t}",
"void setParent(Resource parent)\n {\n this.parent = new ResourceRef(parent, coral);\n if(parent != null)\n {\n \tparentId = parent.getId();\n }\n else\n {\n \tparentId = -1;\n }\n }",
"public void setParent(Node node) {\n parent = node;\n }",
"public void setParent(TaskFolder parent)\n {\n super.setParent(parent);\n if (parent != null) parent.addFolder(this);\n }",
"public void setParent(AbstractConfigNode parent) {\n this.parent = parent;\n }",
"public void testSetParent_fixture27_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture27();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void setParent(String value) {\r\n setAttributeInternal(PARENT, value);\r\n }",
"public void setParent(ASTNeoNode parent) {\r\n \t\tassertTrue(parent != null);\r\n \t\tassertTrue(this.parent == null); // Can only set parent once\r\n \t\tthis.parent = parent;\r\n \t}",
"public void setParent(Node<T> parent) {\n this.parent = parent;\n }",
"public void testSetParent_fixture16_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture16();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void setRootDir(String rootDir);",
"public void setParentCalendarPath(final String val) {\n parentCalendarPath = val;\n }",
"public void testSetParent_fixture13_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture13();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void testSetParent_fixture24_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture24();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void setORM_Parent(orm.Nomenclature value) {\r\n\t\tthis.parent = value;\r\n\t}",
"void setParent(TreeNode<T> parent);",
"public void setParentOne(int parent)\n\t{\n\t\tparentSetOne = parent;\n\t}",
"public void setParentFolder(com.vmware.converter.ManagedObjectReference parentFolder) {\r\n this.parentFolder = parentFolder;\r\n }",
"@Override\n\tpublic void setParent(ASTNode node) {\n\t\tthis.parent = node;\n\t\t\n\t}",
"public void testSetParent_fixture18_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture18();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void testSetParent_fixture17_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture17();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public String getTargetDir() {\n\t\tif (targetDir != null)\n\t\t\treturn targetDir;\n\t\telse if (parent == null)\n\t\t\treturn \"./\";\n\t\telse\n\t\t\treturn parent.getTargetDir();\n\t}",
"public void setParent (TreeNode parent)\r\n {\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\"setParent parent=\" + parent + \" for \" + this);\r\n }\r\n\r\n this.parent = parent;\r\n }",
"public void testSetParent_fixture23_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture23();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void testSetParent_fixture28_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture28();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void testSetParent_fixture12_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture12();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void setParent(IAVLNode node) {\n\t\t\tthis.parent = node; // to be replaced by student code\n\t\t}",
"public void gotoParentDir() {\n boolean z;\n if (!isRootDir() && this.mCurrentDir != null && this.mBox.hasAuthenticated()) {\n String sb = new StringBuilder(getCurrentDirPath()).toString();\n if (sb.endsWith(File.separator)) {\n sb = sb.substring(0, sb.lastIndexOf(File.separator));\n }\n String substring = sb.substring(0, sb.lastIndexOf(File.separator) + 1);\n if (!substring.equals(getCurrentDirName())) {\n if (!substring.equals(File.separator) && substring.endsWith(File.separator)) {\n substring = substring.substring(0, substring.length() - 1);\n }\n BoxFileObject boxFileObject = null;\n if (this.mDirCached.containsKey(substring)) {\n boxFileObject = (BoxFileObject) this.mDirCached.get(substring);\n }\n if (boxFileObject == null) {\n z = this.mBox.asyncLoadDir(substring, this.mLoadFolderListener);\n } else {\n z = this.mBox.asyncLoadDir(boxFileObject, this.mLoadFolderListener);\n }\n if (z) {\n showWaitingDialog(this.mActivity.getString(C4538R.string.zm_msg_loading), this.mWaitingDialogCancelListener);\n }\n }\n }\n }",
"public void setParent(Instance parent) {\r\n \t\tthis.parent = parent;\r\n \t}",
"public void testSetParent_fixture4_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture4();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void testSetParent_fixture21_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture21();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"private void setWorkDiretory() {\n\t\tthis.workDiretory = System.getProperty(\"user.dir\");\n\t}",
"public void testSetParent_fixture14_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture14();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"void setParent(TestResultTable.TreeNode p) {\n parent = p;\n }",
"public void setParent(RBNode<T> node, RBNode<T> parent) {\n if(node != null)\r\n node.parent = parent;\r\n }",
"public void setParent(State aParent);",
"public void testSetParent_fixture19_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture19();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void testSetParent_fixture7_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture7();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void testSetParent_fixture11_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture11();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void testSetParent_fixture9_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture9();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void testSetParent_fixture22_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture22();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void setParent(Kit parentKit) {\n this.parent = parentKit;\n }",
"public void testSetParent_fixture26_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture26();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void setParent(DocxContext<?> parent) {\n\n }",
"public void setParent(Node newParent) {\r\n\t\t\tparent = newParent;\r\n\t\t}",
"public void testSetParent_fixture20_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture20();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void testSetParent_fixture8_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture8();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"abstract public void setParent(Command cmd);",
"public void setParent(LeafTreeNode parent) {\n this.parent = parent;\n }",
"public void setParent(View parent) {\n throw new Error(\"Can't set parent on root view\");\n }",
"protected void setParent(CodeItem codeItem) {\n this.parent = codeItem;\n }",
"void setParent(IGLProperty parent);",
"public void testSetParent_fixture1_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture1();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void setParent(final ParseTreeNode parent) {\r\n _parent = parent;\r\n }",
"public void setParent(TreeNode parent)\r\n\t{\r\n\t\tm_parent = parent;\r\n\t}",
"@Override\n\tpublic void setParent(WhereNode parent) {\n\t\tthis.parent = parent;\n\t}",
"public final synchronized void setParent(final ICache<K, V, D> parent) {\n ICache<K, V, D> current = parent;\n while (current != null) {\n if (current == this)\n throw new IllegalArgumentException(\"Cycle detected, cannot set parent to \" + parent);\n current = current.getParent();\n }\n this.parent = parent;\n }",
"public String getDataParent () {\n if (dataParent == null) {\n return System.getProperty (GlobalConstants.USER_DIR);\n } else {\n return dataParent;\n }\n }",
"public void setParent(IAVLNode node);",
"public void setParent(IAVLNode node);",
"public void setParent(@CheckForNull final OtuSet parent) {\n\t\tthis.parent = parent;\n\t}",
"public void setBasedir( File basedir )\n {\n this.basedir = basedir;\n }",
"public void testSetParent_fixture25_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture25();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void setParent(MenuTree parent){\n this.parentMenuTree = parent;\n }",
"@Override\n\tpublic void setParent(TreeNode parent) {\n\t\tthis.parent = parent ;\n\t}",
"@Override\n\tpublic void setParent(TreeNode parent) {\n\t\tthis.parent = parent ;\n\t}",
"public void setParent(ProviderStore parent) {\n this.parent = parent;\n }",
"public void setParent (com.redsaga.hibnatesample.step2.Board _parent) {\n\t\tthis._parent = _parent;\n\t}",
"public void setParentController(HomeController parent) {\n\t\tthis.parent = parent;\n\t}",
"public void testSetParent_fixture15_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture15();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public void testSetParent_fixture10_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture10();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}",
"public Path parent() {\n if (isRoot()) {\n return this;\n } else {\n String[] newParts = new String[parts.length - 1];\n for (int i = 0; i < parts.length - 1; i++) {\n newParts[i] = parts[i];\n }\n return new Path(newParts, true);\n }\n }",
"public void setParent(Concept _parent) { parent = _parent; }",
"<E extends CtElement> E setParent(E parent);",
"public void setParent(PafDimMember parent) {\r\n\t\tthis.parent = parent;\r\n\t}",
"public void setParent(int id);",
"public void setParentPanel(UIPanel parent) {\n this.parentPanel = parent;\n updateBounds();\n }",
"public void setParent(ASPMSyntaxElement parent) {\n\t\tassert this.parent == null;\n\t\tthis.parent = parent;\n\t}",
"void setParentInstId(String parentInstId);",
"@Override\n public void setParentNode(ConfigurationNode parent)\n {\n this.parent = parent;\n }",
"public void setParent(SearchNode<S, A> parent) {\r\n\t\tthis.parent = parent;\r\n\t}",
"public void setParent(AsNode parent) {\n\t\tthis.state.setG(parent.getState().getG() + parent.childCost.get(this));\n\t\tthis.parent = parent;\n\t}",
"public abstract void setParent (XMLReader parent);",
"public IDirectory getParent() {\n return this.parent;\n }",
"public com.vmware.converter.ManagedObjectReference getParentFolder() {\r\n return parentFolder;\r\n }",
"public String getSourceDir() {\n\t\tif (sourceDir != null)\n\t\t\treturn sourceDir;\n\t\telse if (parent == null)\n\t\t\treturn \"./\";\n\t\telse\n\t\t\treturn parent.getSourceDir();\n\t}",
"public static void setRootDir() {\n for(int i = 0; i < rootDir.length; i++){\n Character temp = (char) (65 + i);\n Search.rootDir[i] = temp.toString() + \":\\\\\\\\\";\n }\n }",
"final void setParent(ShapeParent newParent)\n {\n this.parent = newParent;\n }"
]
| [
"0.68353754",
"0.61835766",
"0.60569406",
"0.5922813",
"0.591475",
"0.5913333",
"0.587766",
"0.58624357",
"0.585566",
"0.5847257",
"0.5767707",
"0.5763134",
"0.57559687",
"0.57496744",
"0.5742406",
"0.57338184",
"0.5715586",
"0.57096046",
"0.56865513",
"0.5654666",
"0.5651804",
"0.56454355",
"0.56430596",
"0.5616884",
"0.5601215",
"0.55918837",
"0.5591857",
"0.55821836",
"0.55682045",
"0.5560726",
"0.5560261",
"0.5551136",
"0.5549788",
"0.55317163",
"0.5519416",
"0.5510038",
"0.5505698",
"0.54911405",
"0.54844886",
"0.54817486",
"0.5480058",
"0.54754686",
"0.5474865",
"0.54669",
"0.54625815",
"0.54610604",
"0.5459699",
"0.54467726",
"0.5437192",
"0.5431187",
"0.5429517",
"0.54271835",
"0.5417605",
"0.54129416",
"0.54117054",
"0.5408339",
"0.5405953",
"0.540556",
"0.54049385",
"0.5404302",
"0.53929895",
"0.53883755",
"0.5377248",
"0.53745526",
"0.5373126",
"0.53645307",
"0.5362766",
"0.53619474",
"0.5361203",
"0.53600526",
"0.53565127",
"0.53565127",
"0.5356149",
"0.5351012",
"0.53507644",
"0.53325784",
"0.53310144",
"0.53310144",
"0.5328316",
"0.5328271",
"0.53279746",
"0.5326395",
"0.53248286",
"0.53178865",
"0.53099173",
"0.5309449",
"0.52966374",
"0.5291034",
"0.5276845",
"0.52757967",
"0.52623034",
"0.52620506",
"0.5244673",
"0.5241185",
"0.52389604",
"0.5235684",
"0.52179956",
"0.52161837",
"0.52129406",
"0.52088416"
]
| 0.5480481 | 40 |
Copy specified file into a temporary file. Then rename the temporary file to the original name. This will cause any hardlinks to the original file to be removed. The temporary files are created in the same directory. The temporary files will be recovered (especially on Windows) on datanode restart. | private void breakHardlinks(File file, Block b) throws IOException {
final FileIoProvider fileIoProvider = getFileIoProvider();
final File tmpFile = DatanodeUtil.createFileWithExistsCheck(
getVolume(), b, DatanodeUtil.getUnlinkTmpFile(file), fileIoProvider);
try {
try (FileInputStream in = fileIoProvider.getFileInputStream(
getVolume(), file)) {
try (FileOutputStream out = fileIoProvider.getFileOutputStream(
getVolume(), tmpFile)) {
IOUtils.copyBytes(in, out, 16 * 1024);
}
}
if (file.length() != tmpFile.length()) {
throw new IOException("Copy of file " + file + " size " + file.length()
+ " into file " + tmpFile + " resulted in a size of "
+ tmpFile.length());
}
fileIoProvider.replaceFile(getVolume(), tmpFile, file);
} catch (IOException e) {
if (!fileIoProvider.delete(getVolume(), tmpFile)) {
DataNode.LOG.info("detachFile failed to delete temporary file " +
tmpFile);
}
throw e;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private File moveTempFile(final CommonsMultipartFile fileData, final String originalFileName) throws IOException {\n String deployFileName = buildDeployFileName(originalFileName);\n logger.info(\"Moving to {}\", deployFileName);\n final File tempFile = new File(deployFileName);\n fileData.transferTo(tempFile);\n return tempFile;\n }",
"private static void backupSafely(File file) throws IOException {\n File parent = file.getParentFile();\n String name = file.getName();\n\n File backup = new File(parent, name + \".bak\");\n for (int i = 2; backup.exists(); i++) {\n backup = new File(parent, name + \".\" + i + \".bak\");\n }\n\n log.info(\"Backing up \" + file + \" to \" + backup.getName());\n if (!file.renameTo(backup)) {\n log.warn(\"Renaming failed, so using copy to backup {}\", file);\n FileUtils.copyFile(file, backup);\n if (!file.delete()) {\n throw new IOException(\n \"Could not remove broken tar file \" + file);\n }\n }\n }",
"void copyFile(File sourcefile, File targetfile) throws Exception {\n\t\tif(targetfile.exists()) targetfile.delete();\n\t\ttargetfile.createNewFile();\n\t\tFileChannel source = null;\n\t\tFileChannel target = null;\n\t\ttry{\n\t\t\tsource = new FileInputStream(sourcefile).getChannel();\n\t\t\ttarget = new FileOutputStream(targetfile).getChannel();\n\t\t\ttarget.transferFrom(source, 0, source.size());\n\t\t}\n\t\tfinally{\n\t\t\tif(source!=null) source.close();\n\t\t\tif(target!=null) target.close();\n\t\t}\n\t\ttargetfile.setLastModified(sourcefile.lastModified());\n\t}",
"public void deleteUrl() throws IOException\n\t{\n\t\tFile tempFile = new File(\"Resource/test.txt\");\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(tempFile));\n\t\twriter.write(newFile);\n\t\twriter.close();\n\t\t\n\t\t//boolean successful = tempFile.renameTo(inputFile);\n\t}",
"public static boolean forceRename(File a, File b) {\n boolean success = a.renameTo(b);\n \n // If that didn't work, try copying the file.\n if (!success) {\n success = CommonUtils.copy(a, b);\n //if copying succeeded, get rid of the original\n //at this point any active uploads will have been killed\n if (success)\n \ta.delete();\n }\n return success;\n }",
"@Test\n public void testCopyToTempDir() throws IOException {\n File fileA = null;\n\n try {\n fileA = File.createTempFile(\"fileA\", \"fileA\");\n System.out.println(fileA.getAbsolutePath());\n FileOutputStream fos = new FileOutputStream(fileA);\n InputStream sis = new StringInputStream(\"some content\");\n StreamUtil.copy(sis, fos);\n sis.close();\n fos.close();\n\n copyToTempDir(fileA);\n\n File fileACopy = new File(new File(getTempDirPath()), fileA.getName());\n assertTrue(fileACopy.exists());\n assertTrue(fileACopy.isFile());\n } finally {\n boolean deleted = fileA.delete();\n assertTrue(deleted);\n }\n\n File dirB = null;\n\n try {\n dirB = Files.createTempDirectory(\"dirB\").toFile();\n System.out.println(dirB.getAbsolutePath());\n\n copyToTempDir(dirB);\n\n File dirBCopy = new File(new File(getTempDirPath()), dirB.getName());\n assertTrue(dirBCopy.exists());\n assertTrue(dirBCopy.isDirectory());\n } finally {\n boolean deleted = dirB.delete();\n assertTrue(deleted);\n }\n }",
"public File mo27424a(File file) throws IOException {\n return File.createTempFile(this.f17426b + \".\", \".tmp\", file);\n }",
"public final void deleteTemporaryFile()\n\t\tthrows IOException {\n\t\t\t\n // DEBUG\n \n if ( isQueued()) {\n Debug.println(\"@@ Delete queued file segment, \" + this);\n Thread.dumpStack();\n }\n \n\t\t//\tDelete the temporary file used by the file segment\n\n\t\tFile tempFile = new File(getTemporaryFile());\n\t\t\t\t\n\t\tif ( tempFile.exists() && tempFile.delete() == false) {\n\n\t\t //\tDEBUG\n\t\t \n\t\t Debug.println(\"** Failed to delete \" + toString() + \" **\");\n\t\t \n\t\t //\tThrow an exception, delete failed\n\t\t \n\t\t\tthrow new IOException(\"Failed to delete file \" + getTemporaryFile());\n\t\t}\n\t}",
"protected File copyURLToFile(String filename) throws IOException {\r\n\t\tURL deltaFileUrl = getClass().getResource(filename);\t\t\r\n\t\tFile tempFile = File.createTempFile(\"test\", \".dlt\");\r\n\t\t_tempFiles.add(tempFile);\r\n\t\tFileUtils.copyURLToFile(deltaFileUrl, tempFile);\t\t\r\n\t\treturn tempFile;\t\r\n\t}",
"public final void setTemporaryFile(String tempFile) {\n\t\tm_tempFile = tempFile;\n\t}",
"private static Path saveTempFile(InputStream input) throws IOException {\n\t\tPath tempFile = Files.createTempFile(null, \".csv\");\n\t\tFiles.copy(input, tempFile, StandardCopyOption.REPLACE_EXISTING);\n\n\t\tinput.close();\n\n\t\t// TODO delete tempFile\n\t\treturn tempFile;\n\t}",
"public static void copy(File destDir, File file) throws Exception {\r\n \t\tString name = file.getName();\r\n \t\tif (!destDir.exists()) destDir.mkdirs();\r\n \t\tFile oldFile = new File(destDir.getAbsolutePath() + File.separatorChar + name);\r\n \t\tif (oldFile.exists()) oldFile.delete();\r\n\t\tFile fileout = new File(destDir.getAbsolutePath() + File.separatorChar + name);\r\n\t FileInputStream fileinstr = new FileInputStream(file);\r\n\t FileOutputStream fileoutstr = new FileOutputStream(fileout);\r\n\t BufferedOutputStream bufout = new BufferedOutputStream(fileoutstr); \r\n\t byte [] b = new byte[1024];\r\n\t\tint len = 0;\r\n\t\twhile ( (len=fileinstr.read(b))!= -1 ) {\r\n\t\t bufout.write(b,0,len);\r\n\t\t}\r\n\t\tbufout.flush();\r\n\t\tbufout.close();\r\n\t\tfileinstr.close();\r\n\t}",
"private void copyOrMoveFile(File file, File dir,boolean isCopy) throws IOException {\n File newFile = new File(dir, file.getName());\n FileChannel outChannel = null;\n FileChannel inputChannel = null;\n try {\n outChannel = new FileOutputStream(newFile).getChannel();\n inputChannel = new FileInputStream(file).getChannel();\n inputChannel.transferTo(0, inputChannel.size(), outChannel);\n inputChannel.close();\n if(!isCopy)\n file.delete();\n } finally {\n if (inputChannel != null) inputChannel.close();\n if (outChannel != null) outChannel.close();\n }\n }",
"private void finalizeFileSystemFile() throws IOException {\n Path finalConfigPath = getFinalConfigPath(tempConfigPath);\n fileSystem.rename(tempConfigPath, finalConfigPath);\n LOG.info(\"finalize temp configuration file successfully, finalConfigPath=\"\n + finalConfigPath);\n }",
"public static void moveFile(File source, File destination) throws Exception {\n\tif (destination.exists()) {\n\t destination.delete();\n\t}\n\tsource.renameTo(destination);\n }",
"private void tempTOuserFolder (HttpServletRequest request,String folderName,String fileName,String original_name,String fileType)throws IOException{\n try {\n String tempPath=request.getSession().getServletContext().getRealPath(\"/\")+\"\\\\\"+REPOSITORY+\"\\\\\"+username+\"\\\\\"+TEMP;\n String persistentPath=request.getSession().getServletContext().getRealPath(\"/\")+\"\\\\\"+REPOSITORY+\"\\\\\"+username+\"\\\\\"+PERSISTENT+\"\\\\\"+folderName;\n File newFile=new File(persistentPath);\n if(!newFile.exists()){\n newFile.mkdirs();//创建永久文件路径\n }\n if(original_name.endsWith(\".csv\")){\n original_name.replace(\"csv\",\"xls\");\n System.out.println(original_name);\n }\n if(original_name.endsWith(\".txt\")){\n original_name.replace(\"txt\",\"xls\");\n System.out.println(original_name);\n }\n //临时文件\n File oldFile=new File(tempPath,original_name);\n if(oldFile==null){\n return;\n }\n //永久文件\n StringBuffer strBuffer=new StringBuffer(fileName);\n strBuffer.append(\".\").append(fileType);\n System.out.println(\"strbuffer:\"+strBuffer);\n File file=new File(newFile,new String(strBuffer));\n Files.copy(oldFile.toPath(), file.toPath());\n oldFile.delete();\n }catch (IOException io){\n io.printStackTrace();\n throw new IOException(\"文件移动失败!\");\n\n }\n }",
"private void rename(File file, String name) {\n\t\t\r\n\t}",
"@Test(groups = \"Integration\")\n public void testCopyFileTo() throws Exception {\n File dest = Os.newTempFile(getClass(), \".dest.tmp\");\n File src = Os.newTempFile(getClass(), \".src.tmp\");\n try {\n Files.write(\"abc\", src, Charsets.UTF_8);\n host.copyTo(src, dest);\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n src.delete();\n dest.delete();\n }\n }",
"public final static void rename(File file, String newName){\r\n File newFile = new File(newName);\r\n file.renameTo(newFile);\r\n }",
"@Test(timeout = SWIFT_TEST_TIMEOUT)\n public void testRenameFileToSelf() throws Throwable {\n if (!renameSupported()) return;\n Path filepath = path(\"test/file\");\n createFile(filepath);\n //HDFS expects rename src, src -> true\n rename(filepath, filepath, true, true, true);\n //verify the file is still there\n assertIsFile(filepath);\n }",
"public void setTmpFile(File tmpFile) {\n this.tmpFile = tmpFile;\n }",
"private static void copyFile(File in, File out)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFileChannel inChannel = new\tFileInputStream(in).getChannel();\n\t\t\tFileChannel outChannel = new FileOutputStream(out).getChannel();\n\t\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\t\t\tinChannel.close();\n\t\t\toutChannel.close();\t\t\t\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.copyFile(): \" + e);\n\t\t}\n\n\t}",
"void copyFile(String sourceFile, String destinationFile, boolean overwrite) throws IOException;",
"public void deleteTempDir(File file) {\n if (!shouldReap()) {\n return;\n }\n\n // If the tempfile can be removed, delete it. If not, it wasn't created by us.\n if (temporaryFiles.remove(file)) {\n FileHandler.delete(file);\n }\n }",
"private static void copyFile(File scrFile, File file) {\n\t\r\n}",
"public void save(String newFilePath) {\r\n File deletedFile = new File(path);\r\n deletedFile.delete();\r\n path = newFilePath;\r\n File dataFile = new File(path);\r\n File tempFile = new File(path.substring(0, path.lastIndexOf(\"/\")) + \"/myTempFile.txt\");\r\n\r\n try {\r\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(\r\n new FileOutputStream(tempFile), \"UTF-8\"));\r\n\r\n for (String line : data) {\r\n bw.write(line);\r\n bw.newLine();\r\n }\r\n\r\n bw.close();\r\n dataFile.delete();\r\n tempFile.renameTo(dataFile);\r\n } catch (IOException ex) {\r\n System.out.println(\"IOException in save2 : FileData\");\r\n }\r\n }",
"private void deleteTempHTMLFile()\n {\n File file = new File(\"resources/tempHTML\" +Thread.currentThread().getName() +\".html\");\n file.delete();\n }",
"public File createTempInputFile(final File csvFile,\r\n final List<String> newHeader) throws IOException\r\n {\r\n BufferedReader br = null;\r\n BufferedWriter bw = null;\r\n\r\n File tmp = new File(csvFile.toString() + \"_tmp\");\r\n\r\n try\r\n {\r\n br = new BufferedReader(new FileReader(csvFile));\r\n bw = new BufferedWriter(new FileWriter(tmp));\r\n\r\n bw.write(createNewHeader(newHeader) + \"\\n\");\r\n br.readLine(); // read header and throw it away\r\n\r\n for (String line = br.readLine(); line != null;)\r\n {\r\n bw.write(line + \"\\n\");\r\n line = br.readLine();\r\n }\r\n\r\n }\r\n finally\r\n {\r\n if (br != null)\r\n {\r\n br.close();\r\n }\r\n if (bw != null)\r\n {\r\n bw.close();\r\n }\r\n }\r\n\r\n return tmp;\r\n }",
"void copyFile(String sourceFile, String destinationFile) throws IOException;",
"private void copyFile(String source, String destination) throws IOException {\n File inputFile = new File(source);\n File outputFile = new File(destination);\n\t\n BufferedInputStream in = new BufferedInputStream(\n\t\t\t\t new FileInputStream(inputFile));\n BufferedOutputStream out = new BufferedOutputStream(\n\t\t\t\t new FileOutputStream(outputFile));\n int c;\n\tbyte[] tmp = new byte[4096];\n\t\n while ((c = in.read(tmp, 0, 4096)) != -1)\n\t out.write(tmp, 0, c);\n\t\n in.close();\n out.close();\n }",
"@SuppressWarnings(\"resource\")\r\n\tpublic static synchronized void copyFile(File source, File dest)\r\n\t\t\tthrows IOException {\r\n\t\tFileChannel srcChannel = null;\r\n\t\tFileChannel dstChannel = null;\r\n\t\ttry {\r\n\t\t\tsrcChannel = new FileInputStream(source).getChannel();\r\n\t\t\tdstChannel = new FileOutputStream(dest).getChannel();\r\n\t\t\tdstChannel.transferFrom(srcChannel, 0, srcChannel.size());\r\n\t\t} finally {\r\n\t\t\tsrcChannel.close();\r\n\t\t\tdstChannel.close();\r\n\t\t}\r\n\t}",
"public interface TempFile {\n\n\t\tpublic void delete() throws Exception;\n\n\t\tpublic String getName();\n\n\t\tpublic OutputStream open() throws Exception;\n\t}",
"public static void createTempFileForLinux() throws IOException {\n Path path = Files.createTempFile(\"temp_linux_file\", \".txt\",\n PosixFilePermissions.asFileAttribute(PosixFilePermissions.fromString(\"rw-------\")));\n System.out.println(\"Path is : \" + path.toFile().getAbsolutePath());\n }",
"public void copyFileToSafe(String sourceFilename, String targetFilename) {\r\n\t\tfinal String fileContent = readStringFromFileSafe(sourceFilename);\r\n\t\ttry {\r\n\t\t\toverwriteStringToFile(fileContent, targetFilename);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\thandleFileNotFoundException(e, targetFilename);\r\n\t\t} catch (IOException e) {\r\n\t\t\thandleIOException(e, targetFilename);\r\n\t\t}\r\n\t}",
"@Test(timeout = 4000)\n public void test34() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n fileUtil0.renameFile(\"nf`=i9F^I\", \"nf`=i9F^I\");\n }",
"private static void recoverTempFiles(String logPath)\n {\n\n File logPathFile = new File(logPath).getParentFile();\n File[] tempFiles = logPathFile.listFiles((dir, name) -> name.endsWith(TEMP_FILE_EXTENSION));\n\n if (tempFiles == null) {\n return;\n }\n\n for (File tempFile : tempFiles) {\n String newName = tempFile.getName().substring(0, tempFile.getName().length() - TEMP_FILE_EXTENSION.length());\n File newFile = new File(tempFile.getParent(), newName + LOG_FILE_EXTENSION);\n\n if (!tempFile.renameTo(newFile)) {\n log.warn(\"Could not rename temp file [%s] to [%s]\", tempFile, newFile);\n }\n }\n }",
"@Test(timeout = 4000)\n public void test33() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n fileUtil0.renameFile(\"\", \"j@uFOT>+?Kq_S&<|u-\");\n }",
"public void fileRename(String sourcePath, String targetPath) {\n\t \tFile file = new File(sourcePath); \n\t \tfile.renameTo(new File(targetPath));\n\t \t}",
"private void renameFile() {\n ProjectFile file = (ProjectFile) viewer.getSelectedNode();\n String newName = (String)\n JOptionPane.showInputDialog(\n viewer,\n \"Enter the new name of the file:\",\n \"Rename file\",\n JOptionPane.PLAIN_MESSAGE,\n null,\n null,\n file.toFile().getName()\n );\n \n if (newName != null) {\n Project p = viewer.getCurrentProject();\n \n File oldFile = file.toFile();\n\n Buffer b = jEdit.getBuffer(oldFile.getAbsolutePath());\n if (b != null) {\n jEdit.closeBuffer(viewer.getView(),b);\n }\n \n File newFile = new File(oldFile.getParent() + File.separator + newName);\n if (!oldFile.renameTo(newFile)) {\n JOptionPane.showMessageDialog(\n viewer,\n \"Could not rename selected file!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE\n );\n }\n \n if (b != null) {\n jEdit.openFile(viewer.getView(),newFile.getAbsolutePath());\n }\n \n p.removeFile(file);\n p.importFile(new ProjectFile(newFile.getAbsolutePath()));\n }\n }",
"public static void copy(File file, File file2) {\n Throwable th;\n Throwable th2;\n Throwable th3;\n Throwable th4 = null;\n FileInputStream fileInputStream = new FileInputStream(file);\n FileOutputStream fileOutputStream = new FileOutputStream(file2);\n byte[] bArr = new byte[1024];\n while (true) {\n int read = fileInputStream.read(bArr);\n if (read > 0) {\n fileOutputStream.write(bArr, 0, read);\n } else {\n fileOutputStream.close();\n fileInputStream.close();\n return;\n }\n }\n throw th2;\n if (th4 == null) {\n }\n throw th;\n throw th;\n if (th3 != null) {\n try {\n fileOutputStream.close();\n } catch (Throwable th5) {\n }\n } else {\n fileOutputStream.close();\n }\n throw th2;\n }",
"public static void renameFileName(File srcFile, File destFile)\n throws IOException {\n FileUtils.copyFile(srcFile, destFile);\n }",
"@Override\r\n\tpublic String write(File origFile, String destPath) {\n\t\ttry {\r\n\t\t\tString uuid = UUID.randomUUID().toString().replaceAll(\"-\", \"\")\r\n\t\t\t\t\t+ \".jpg\";\r\n\t\t\tFile destFile = new File(destPath, uuid);\r\n\t\t\tFileUtils.copyFile(origFile, destFile);\r\n\t\t\treturn uuid;\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private void removeTempData(CopyTable table)\n\t{\n\t\tFile dataFile = new File(config.getTempDirectory(), table.getTempFilePrefix() + \"_data.csv\");\n\t\tFile countFile = new File(config.getTempDirectory(), table.getTempFilePrefix() + \"_count.txt\");\n\t\tFile metaDataFile = new File(config.getTempDirectory(), table.getTempFilePrefix() + \"_metadata.ser\");\n\t\t\n\t\tdataFile.delete();\n\t\tcountFile.delete();\n\t\tmetaDataFile.delete();\n\t\t\n\t\tFile tempDir = new File(config.getTempDirectory());\n\t\ttempDir.delete();\n\t}",
"public void renameFile(File from, File to) {\n if (!from.renameTo(to)) {\n Log.e(ConstantVariables.ERR, ConstantVariables.RENAME_FAILED);\n }\n }",
"boolean renameFile(File f, File newName);",
"public void copy(String name, String oldPath, String newPath);",
"public static void copyFile(File source, File destination) throws IOException {\n\tFileChannel sourceChannel = null;\n\tFileChannel destinationChannel = null;\n\ttry {\n\t if (destination.exists()) {\n\t\tdestination.delete();\n\t }\n\t sourceChannel = new FileInputStream(source).getChannel();\n\t destinationChannel = new FileOutputStream(destination).getChannel();\n\t int maxCount = (64 * 1024 * 1024) - (32 * 1024);// magic number for Windows, 64Mb - 32Kb\n\t long size = sourceChannel.size();\n\t long position = 0;\n\t while (position < size) {\n\t\tposition += sourceChannel.transferTo(position, maxCount, destinationChannel);\n\t }\n\t} catch (IOException e) {\n\t throw e;\n\t} finally {\n\t if (null != sourceChannel) {\n\t\tsourceChannel.close();\n\t }\n\t if (null != destinationChannel) {\n\t\tdestinationChannel.close();\n\t }\n\t}\n }",
"public static File CreateTempFile(String fileName, String resourcePath) throws IOException {\n \n /*if (tempDirectoryPath == null) {\n tempDirectoryPath = Files.createTempDirectory(null);\n System.getSecurityManager().checkDelete(tempDirectoryPath.toFile().toString());\n System.out.println(\"Temp path: \" + tempDirectoryPath);\n System.out.println(\"Temp path: \" + tempDirectoryPath.toString());\n System.out.println(\"Temp path: \" + tempDirectoryPath.toFile().toString());\n }*/\n \n File tempFile = null;\n InputStream input = null;\n OutputStream output = null;\n \n try {\n // Create temporary file\n //tempFile = File.createTempFile(tempDirectoryPath.getFileName() + File.separator + fileName , null);\n //System.out.println(\"Temp file: \" + tempFile);\n tempFile = File.createTempFile(filePrefix + fileName , null);\n tempFile.setReadable(false , false);\n tempFile.setReadable(true , true);\n tempFile.setWritable(true , true);\n tempFile.setExecutable(true , true);\n tempFile.deleteOnExit();\n \n // Read resource and write to temp file\n output = new FileOutputStream(tempFile);\n if (resourcePath != null) {\n input = Main.class.getClassLoader().getResourceAsStream(resourcePath);\n\n byte[] buffer = new byte[1024];\n int read;\n\n if (input == null) {\n Logger.log(\"Resource '\" + fileName + \"' at '\" + resourcePath + \"' not available!\");\n } else {\n while ((read = input.read(buffer)) != -1) {\n output.write(buffer , 0 , read);\n }\n }\n }\n } catch (IOException ex) {\n throw(ex);\n } finally {\n close(input);\n close(output);\n }\n return tempFile;\n }",
"private File copyFiles(String filename, String directoryName) throws IOException { //after\n boolean success = false;\n String finalPath = this.rootLocation + \"/\" + directoryName +\"/\"+ filename;\n String tmpPath = this.tmpLocation + \"/\"+ filename;\n File finalFile = new File(finalPath);\n File directory = new File(this.rootLocation + \"/\" +directoryName);\n if (!directory.exists()) {\n directory.mkdir();\n }\n File tmpFile = new File(tmpPath);\n if(tmpFile.exists() && !tmpFile.isDirectory() && directory.exists() && directory.isDirectory()){\n if(finalFile.exists() && !finalFile.isDirectory()){\n finalFile = getNewName(finalPath);\n log.debug(\"compareToFiles -> rename to \"+ finalFile.getName());\n }\n success = copyFileUsingStream(tmpFile, finalFile);\n }\n\n log.debug(\"success copy...\"+success);\n return finalFile;\n }",
"public void copyFileChannel(String inputFile, String outputFile) throws IOException {\n\t\tFileInputStream inputStream = new FileInputStream(inputFile);\n\t\tFileOutputStream outputStream = new FileOutputStream(outputFile);\n\n\t\tFileChannel inChannel = inputStream.getChannel();\n\t\tFileChannel outChannel = outputStream.getChannel();\n\n\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\n\t\tinputStream.close();\n\t\toutputStream.close();\n\t}",
"protected SlotFile copyAndOpen(String fileName) throws IOException {\r\n\t\t\r\n\t\tURL deltaFileUrl = getClass().getResource(fileName);\t\t\r\n\t\tFile tempDeltaFile = File.createTempFile(\"test\", \".dlt\");\r\n\t\t\r\n\t\t_tempFiles.add(tempDeltaFile);\r\n\t\t\r\n\t\tFileUtils.copyURLToFile(deltaFileUrl, tempDeltaFile);\r\n\t\tSlotFile slotFile = new SlotFile(tempDeltaFile.getAbsolutePath(), BinFileMode.FM_EXISTING);\r\n\t\t\r\n\t\treturn slotFile;\r\n\t}",
"public static File createTemporaryCacheFile(CacheKey cacheKey) throws IOException {\n // Create a file in Java temp directory with cacheKey.toSting() as file name.\n\n File file = File.createTempFile(cacheKey.toString(), \".tmp\");\n if (null != file) {\n log.debug(\"Temp file created with the name - {}\", cacheKey.toString());\n }\n return file;\n }",
"public File writeBackFileToDvn(RConnection c, String targetFilename,\n String tmpFilePrefix, String tmpFileExt, int fileSize){\n File tmprsltfl = null;\n \n String resultFilePrefix = tmpFilePrefix + PID + \".\";\n \n String rfsffx = \".\" + tmpFileExt;\n RFileInputStream ris = null;\n OutputStream outbr = null;\n try {\n tmprsltfl = File.createTempFile(resultFilePrefix, rfsffx);\n \n //outbr = new FileOutputStream(tmprsltfl);\n outbr = new BufferedOutputStream(new FileOutputStream(tmprsltfl));\n //File tmp = new File(targetFilename);\n //long tmpsize = tmp.length();\n // open the input stream\n ris = c.openFile(targetFilename);\n \n if (fileSize < 1024*1024*500){\n int bfsize = fileSize +1;\n byte[] obuf = new byte[bfsize];\n ris.read(obuf);\n //while ((obufsize =)) != -1) {\n outbr.write(obuf, 0, bfsize);\n //}\n }\n ris.close();\n outbr.close();\n return tmprsltfl;\n } catch (FileNotFoundException fe){\n fe.printStackTrace();\n dbgLog.fine(\"FileNotFound exception occurred\");\n return tmprsltfl;\n } catch (IOException ie){\n ie.printStackTrace();\n dbgLog.fine(\"IO exception occurred\");\n } finally {\n if (ris != null){\n try {\n ris.close();\n } catch (IOException e){\n \n }\n }\n \n if (outbr != null){\n try {\n outbr.close();\n } catch (IOException e){\n \n }\n }\n \n }\n return tmprsltfl;\n }",
"public void copyFile(String inputFile, String outputFile)\r\n\t{\r\n\t\tif(new File(inputFile).exists())\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tInputStream in = new FileInputStream(inputFile);\r\n\t\t\t\tOutputStream out = new FileOutputStream(outputFile);\r\n\t\t\t\t// Transfer bytes from in to out\r\n\t\t\t\tbyte[] buf = new byte[1024];\r\n\t\t\t\tint length;\r\n\t\t\t\twhile ((length = in.read(buf)) > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tout.write(buf, 0, length);\r\n\t\t\t\t}\r\n\t\t\t\tin.close();\r\n\t\t\t\tout.close();\r\n\t\t\t\tSystem.out.println(inputFile + \" file copied to \" + outputFile);\r\n\t\t\t\tLog.info(inputFile + \" file copied.\");\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) \r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}",
"public static File writeObjectToTempFile(Serializable o, String filename)\n/* */ throws IOException\n/* */ {\n/* 76 */ File file = File.createTempFile(filename, \".tmp\");\n/* 77 */ file.deleteOnExit();\n/* 78 */ ObjectOutputStream oos = new ObjectOutputStream(new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(file))));\n/* 79 */ oos.writeObject(o);\n/* 80 */ oos.close();\n/* 81 */ return file;\n/* */ }",
"public boolean moveFile(final File source, final File target) throws WritePermissionException\n\t{\n\t\t// First try the normal rename.\n\t\tif (source.renameTo(target)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tboolean success = copyFile(source, target);\n\t\tif (success) {\n\t\t\tsuccess = deleteFile(source);\n\t\t}\n\t\treturn success;\n\t}",
"private void copyFile( final File source, final File target )\n throws MojoExecutionException\n {\n if ( source.exists() == false )\n {\n throw new MojoExecutionException( \"Source file '\" + source.getAbsolutePath() + \"' does not exist!\" );\n }\n if ( target.exists() == true )\n {\n throw new MojoExecutionException( \"Target file '\" + source.getAbsolutePath() + \"' already existing!\" );\n }\n\n try\n {\n this.logger.debug( \"Copying file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'.\" );\n PtFileUtil.copyFile( source, target );\n }\n catch ( PtException e )\n {\n throw new MojoExecutionException( \"Could not copy file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'!\", e );\n }\n }",
"public File replaceDuplicateColumn(final File csvFile)\r\n {\r\n File returnFile = null;\r\n\r\n try\r\n {\r\n List<String> originalHeader = readHeader(csvFile);\r\n List<String> remDuplicateHeader = replaceDuplicates(originalHeader);\r\n\r\n if (originalHeader.equals(remDuplicateHeader))\r\n {\r\n returnFile = csvFile;\r\n }\r\n else\r\n {\r\n returnFile = createTempInputFile(csvFile, remDuplicateHeader);\r\n }\r\n\r\n }\r\n catch (IOException e)\r\n {\r\n Logger.error(\"Fehler\", e);\r\n }\r\n\r\n return returnFile;\r\n }",
"public void copyToUnix(String mon_file) throws FileNotFoundException {\n\n\t\ttry {\n\t\t\tUnixConnection.connectToUnix();\n\t\t\tChannel channel = sesConnection.openChannel(\"sftp\");\n\t\t\tchannel.connect();\n\t\t\tChannelSftp sftpChannel = (ChannelSftp) channel;\n\t\t\t// ChannelExec channelExe =\n\t\t\t// (ChannelExec)sesConnection.openChannel(\"exec\");\n\n\t\t\tsftpChannel.put(mon_file, mon_file);\n\n\t\t\t// works!!\n\t\t\tthis.execute(\"tr -d '\\015' <\" + mon_file + \">temp.sh\");\n\t\t\tthis.execute(\"rm \" + mon_file);\n\t\t\tthis.execute(\"mv temp.sh \" + mon_file);\n\t\t\tthis.execute(\"chmod 0775 \" + mon_file);\n\n\t\t\tsftpChannel.exit();\n\t\t\tsftpChannel.disconnect();\n\t\t\tchannel.disconnect();\n\t\t\tUnixConnection.disconnectFromUnix();\n\t\t} catch (JSchException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SftpException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static Path createSimpleTmpFile( final Configuration conf, boolean deleteOnExit ) throws IOException\r\n\t{\r\n\t\t/** Make a temporary File, delete it, mark the File Object as delete on exit, and create the file with data using hadoop utils. */\r\n\t\tFile localTempFile = File.createTempFile(\"tmp-file\", \"tmp\");\r\n\t\tlocalTempFile.delete();\r\n\t\tPath localTmpPath = new Path( localTempFile.getName());\r\n\t\t\r\n\t\tcreateSimpleFile(conf, localTmpPath, localTmpPath.toString());\r\n\t\tif (deleteOnExit) {\r\n\t\t\tlocalTmpPath.getFileSystem(conf).deleteOnExit(localTmpPath);\r\n\t\t}\r\n\t\treturn localTmpPath;\r\n\t}",
"public String copy(MultipartFile file) throws IOException;",
"static void copyFile(File srcFile, File destFile) {\n\t\ttry {\n\t\t\tLong start = System.currentTimeMillis();\n\t\t\tdestFile.createNewFile();\n\t\t\tInputStream oInStream = new FileInputStream(srcFile);\n\t\t\tOutputStream oOutStream = new FileOutputStream(destFile);\n\n\t\t\t// Transfer bytes from in to out\n\t\t\tbyte[] oBytes = new byte[1024];\n\t\t\tint nLength;\n\t\t\tBufferedInputStream oBuffInputStream = \n\t\t\t\t\tnew BufferedInputStream( oInStream );\n\t\t\twhile ((nLength = oBuffInputStream.read(oBytes)) > 0) {\n\t\t\t\toOutStream.write(oBytes, 0, nLength);\n\t\t\t}\n\t\t\toInStream.close();\n\t\t\toOutStream.close();\n\t\t\tLong end = System.currentTimeMillis();\n\t\t\tSystem.out.println((end-start));\n\t\t} catch (IOException e) {\n\t\t\tlogger.info(\"Error in creating the excels :\" +e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public void rename(File dir) {\n assert (dir.exists());\n File tempFile = new File(dir.getAbsolutePath() + \".original\");\n if (tempFile.exists()) {\n String baseName = tempFile.getAbsolutePath();\n int count = 0;\n while (tempFile.exists()) {\n tempFile = new File(baseName + \".\" + count++);\n }\n }\n if (common.getSource().getDomainRoot().equals(\n common.getTarget().getInstallDir())) {\n \n // backup source domain and upgrade original in place\n logger.info(stringManager.getString(\"enterprise.tools.upgrade.util.copyDir\", dir, tempFile));\n cloneDomain(dir.getAbsolutePath(), tempFile.getAbsolutePath());\n common.setAlreadyCloned(true);\n } else {\n logger.info(stringManager.getString(\n \"enterprise.tools.upgrade.util.moveDir\", dir, tempFile));\n dir.renameTo(tempFile);\n }\n }",
"public final String getTemporaryFile() {\n\t\treturn m_tempFile;\n\t}",
"public static FileNode newTmpFile(FileNode parent) {\n FileNode file;\n\n while (true) {\n file = parent.join(\"_tmp_\" + tmpNo);\n try {\n file.mkfile();\n file.getWorld().onShutdown().deleteAtExit(file);\n return file;\n } catch (MkfileException e) {\n // continue\n tmpNo++;\n }\n }\n }",
"public static File createTempFile() throws Exception {\n File dir = tempFileDirectory();\n dir.mkdirs();\n File tempFile = File.createTempFile(\"tst\", null, dir);\n dir.deleteOnExit(); // Not fail-safe on android )¬;\n return tempFile;\n }",
"public static void renameFile(String inputFile, String newFileName){\n File file = new File(inputFile);\n \n //validate the file\n if(file.isFile()){\n String fileDirectory = file.getParent();\n File newName = new File(fileDirectory + \"/\" + newFileName);\n \n //renaming the file and validate it\n if(file.renameTo(newName))\n System.out.println(\"File has been renamed to \"+ newFileName);\n else\n System.out.println(\"Error in renaming the File.\");\n }else {\n System.out.println(\"Invalid File Path or file of that name does not exists\");\n }\n }",
"private void removeTmpConfigFile() throws IOException {\n fileSystem.delete(tempConfigPath, true);\n LOG.info(\"delete temp configuration file: \" + tempConfigPath);\n }",
"public static File extractTmpFileFromJar(String path, boolean deleteOnExit) throws IOException{\n \t\n // Prepare temporary file\n File temp = File.createTempFile(\"abcd\", \"efgh\");\n temp.delete();\n temp = new File(temp.getParentFile().getAbsolutePath() + path);\n if(deleteOnExit) temp.deleteOnExit();\n if(temp.exists()) return temp;\n \n // Prepare buffer for data copying\n byte[] buffer = new byte[1024];\n int readBytes;\n \n // Open and check input stream\n InputStream is = NativeUtils.class.getResourceAsStream(path);\n if (is == null) {\n throw new FileNotFoundException(\"File \" + path + \" was not found inside JAR.\");\n }\n \n // Open output stream and copy data between source file in JAR and the temporary file\n OutputStream os = new FileOutputStream(temp);\n try {\n while ((readBytes = is.read(buffer)) != -1) {\n os.write(buffer, 0, readBytes);\n }\n } finally {\n // If read/write fails, close streams safely before throwing an exception\n os.close();\n is.close();\n }\n \n return temp;\n }",
"public File makeTemporaryBAMFile() throws IOException{\n final File file = IOUtils.createTempFile(\"tempBAM\", \".bam\");\n return makeBAMFile(file);\n }",
"void moveFile(String sourceName, String destinationName, boolean overwrite) throws IOException;",
"private File createTempFile(TransferSongMessage message)\n throws IOException {\n File outputDir = MessagingService.this.getCacheDir(); // context being the Activity pointer\n String filePrefix = UUID.randomUUID().toString().replace(\"-\", \"\");\n int inx = message.getSongFileName().lastIndexOf(\".\");\n String extension = message.getSongFileName().substring(inx + 1);\n File outputFile = File.createTempFile(filePrefix, extension, outputDir);\n return outputFile;\n }",
"private static Path replacePath(Path srcFile, Path srcPath, Path dstPath) {\n\n // get actual path\n String path = srcFile.toAbsolutePath().toString();\n // delete source path from actual path\n String cut = path.substring(srcPath.toAbsolutePath().toString().length(), path.length());\n\n if (!cut.startsWith(File.separator)) {\n cut = File.separator + cut;\n }\n // add destination path with remaining actual path\n String newPath = dstPath.toAbsolutePath().toString() + cut;\n\n return new File(newPath).toPath();\n }",
"public String uploadFile(UploadedFile file) {\n String fileName = (file.getFileName());\r\n System.out.println(\"***** fileName: \" + file.getFileName());\r\n \r\n System.out.println(System.getProperty(\"os.name\"));\r\n String basePath = \"C:\" + File.separator + \"aquivosCI\" + File.separator;\r\n System.out.println(\"BasePath: \" + basePath);\r\n File outputFilePath = new File(basePath + fileName);\r\n\r\n// Copy uploaded file to destination path\r\n InputStream inputStream = null;\r\n OutputStream outputStream = null;\r\n try {\r\n inputStream = file.getInputstream();\r\n outputStream = new FileOutputStream(outputFilePath);\r\n\r\n int read = 0;\r\n final byte[] bytes = new byte[1024];\r\n while ((read = inputStream.read(bytes)) != -1) {\r\n outputStream.write(bytes, 0, read);\r\n }\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n\r\n } finally {\r\n if (outputStream != null) {\r\n try {\r\n outputStream.close();\r\n } catch (IOException ex) {\r\n Logger.getLogger(ComunicacaoInternaMB.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (inputStream != null) {\r\n try {\r\n inputStream.close();\r\n } catch (IOException ex) {\r\n Logger.getLogger(ComunicacaoInternaMB.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return outputFilePath.getAbsolutePath(); // return to same page\r\n }",
"protected FileObject getUniqueFile(Connection connection, FtpSession session, FileObject oldFile) throws FtpException {\n FileObject newFile = oldFile;\n FileSystemView fsView = session.getFileSystemView();\n String fileName = newFile.getFullName();\n while( newFile.doesExist() ) {\n newFile = fsView.getFileObject(fileName + '.' + System.currentTimeMillis());\n if(newFile == null) {\n break;\n }\n }\n return newFile;\n }",
"@Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n Path targetFile = this.currentTargetDirectory.resolve(file.getFileName());\n Files.copy(file, targetFile);\n logger.output(\"Copied file: \" + targetFile);\n return FileVisitResult.CONTINUE;\n }",
"private static void copyFile(Path srcPath, Path destPath) throws IOException {\n try (FileWriter outputStream = new FileWriter(destPath.toFile().getAbsolutePath(), false);\n FileReader inputStream = new FileReader(srcPath.toFile().getAbsolutePath())) {\n int i;\n while ((i = inputStream.read()) != -1) {\n outputStream.write(toChars(i));\n }\n }\n }",
"private void migrate (String name)\t{\n\t\ttry{\n\t\t\tFile f1 = new File( sourceDir + name);\n\t\t\t\n\t\t\tif (!f1.exists())\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tFile f2 = new File(targetDir +name);\n\t\t\t\n\t\t InputStream in = new FileInputStream(f1);\n\t\t \n\t\t OutputStream out = new FileOutputStream(f2);\n\n\t\t byte[] buf = new byte[1024];\n\t\t int len;\n\t\t while ((len = in.read(buf)) > 0){\n\t\t out.write(buf, 0, len);\n\t\t }\n\t\t in.close();\n\t\t out.close();\n\t\t System.out.println(\"File copied.\");\n\t\t }\n\t\t catch(FileNotFoundException ex){\n\t\t System.out.println(ex.getMessage() + \" in the specified directory.\");\n\t\t System.exit(0);\n\t\t }\n\t\t catch(IOException e){\n\t\t System.out.println(e.getMessage()); \n\t\t }\n\t}",
"static void copyFile(File src, File dest) throws IOException {\r\n\t\tFileInputStream fis = new FileInputStream(src);\r\n\t\tFileOutputStream fos = new FileOutputStream (dest);\r\n\t\tbyte[] bytes = new byte[4*1048576];\r\n\t\tint numRead;\r\n\t\twhile ((numRead = fis.read(bytes)) > 0) {\r\n\t\t\tfos.write(bytes, 0, numRead);\r\n\t\t}\r\n\t\tfis.close();\r\n\t\tfos.close();\r\n\t}",
"private void gzipFile(File file) throws IOException\n {\n InputStream input = null;\n GZIPOutputStream gzipOutput = null;\n try\n {\n input = new BufferedInputStream(new FileInputStream(file));\n\n String zippedPath = file.getAbsolutePath() + \".gz\";\n gzipOutput = new GZIPOutputStream(new BufferedOutputStream(new FileOutputStream(zippedPath)));\n\n int value = input.read();\n while (value >= 0)\n {\n gzipOutput.write(value);\n value = input.read();\n }\n gzipOutput.flush();\n gzipOutput.close();\n if (replaceOriginals)\n {\n file.delete();\n }\n }\n finally\n {\n if (input != null)\n {\n input.close();\n }\n if (gzipOutput != null)\n {\n gzipOutput.close();\n }\n }\n }",
"public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from);\r\n Path dest = Paths.get(to);\r\n Files.copy(src, dest, StandardCopyOption.REPLACE_EXISTING);\r\n }",
"public void remove(File file) throws IOException {\n String fileName = file.getName();\n File realFile = new File(INDEX, fileName);\n boolean isStaged = realFile.exists();\n Commit curCommit = getHeadCommit();\n if (isStaged) {\n realFile.delete();\n }\n HashMap<String, Blob> filesInHeadCommit = curCommit.getFile();\n boolean trackedByCurrCommit = filesInHeadCommit.containsKey(fileName);\n if (trackedByCurrCommit) {\n if (file.exists()) {\n file.delete();\n }\n String content = filesInHeadCommit.get(fileName).getContent();\n File fileInRemovingStage = new File(REMOVAL, fileName);\n if (!fileInRemovingStage.exists()) {\n fileInRemovingStage.createNewFile();\n }\n Utils.writeContents(fileInRemovingStage, content);\n }\n if (!isStaged && !trackedByCurrCommit) {\n System.out.println(\"No reason to remove the file.\");\n System.exit(0);\n }\n\n }",
"public void copy(){\n\t\tFileInputStream is = null;\n\t\tFileOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(source);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\tif(dest.exists())\n\t\t\t\tdest.delete();\n\t\t\tint i = -1;\n\t\t\twhile((i = is.read()) != -1)\n\t\t\t\tos.write(i);\n\t\t\tsource.deleteOnExit();\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t} finally {\n\t\t\tif(is != null)\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException ignored) {}\n\t\t\tif(os != null)\n\t\t\t\ttry {\n\t\t\t\t\tos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t\t\t}\n\t\t}\n\t}",
"@Test\n public final void whenConvertingToFile_thenCorrect() throws IOException {\n final Path path = Paths.get(\"src/test/resources/sample.txt\");\n final byte[] buffer = java.nio.file.Files.readAllBytes(path);\n\n final File targetFile = new File(\"src/test/resources/targetFile.tmp\");\n final OutputStream outStream = new FileOutputStream(targetFile);\n outStream.write(buffer);\n\n IOUtils.closeQuietly(outStream);\n }",
"@Test\r\n public void moveToFileWithSameName() {\r\n currentDirectory.addNewFile(\"file\");\r\n Dir dirWithFile = currentDirectory.getSubDirectoryByName(\"child\");\r\n File fileWithContents = dirWithFile.getFileByName(\"file\");\r\n fileWithContents.setContent(\"content\");\r\n command.executeCommand(\"file\", \"child/file\", root, currentDirectory);\r\n File fileInRoot = currentDirectory.getFileByName(\"file\");\r\n // content in file in root is removed\r\n assertTrue(fileInRoot.getContents().equals(\"\"));\r\n }",
"public void copyFileTo(String sourceFilename, String targetFilename)\r\n\tthrows FileNotFoundException, IOException {\r\n\t\tString theFileContent = readStringFromFile(sourceFilename);\r\n\t\toverwriteStringToFile(theFileContent, targetFilename);\r\n\t}",
"public static void copyFile(File sourceFile, File destFile)\n throws IOException {\n if (!destFile.exists()) {\n destFile.createNewFile();\n }\n FileChannel source = null;\n FileChannel destination = null;\n try {\n source = new FileInputStream(sourceFile).getChannel();\n destination = new FileOutputStream(destFile).getChannel();\n destination.transferFrom(source, 0, source.size());\n } catch (Exception e) {} finally {\n if (source != null) {\n source.close();\n }\n if (destination != null) {\n destination.close();\n }\n }\n }",
"public static void copyFile(File src, File dst) throws IOException {\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(dst);\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) out.write(buf, 0, len);\n in.close();\n out.close();\n }",
"public void copy(String file1, String file2) throws FileNotFoundException{\r\n\t\tFile original = new File(file1);\r\n\t\tFile copied = new File(file2);\r\n\t\t\r\n\t\tScanner input = new Scanner(original);\r\n\t\tPrintWriter output = new PrintWriter(copied);//writes new file\r\n\t\t\r\n\t\twhile(input.hasNextLine()){\r\n\t\t\tString next = input.nextLine();\r\n\t\t\toutput.println(next);\t\t\t\r\n\t\t}\r\n\t\toutput.close();\r\n\t\tinput.close();\r\n\t}",
"public void moveFile(String url) throws IOException {\n\n\t\tSystem.out.println(\"folder_temp : \" + folder_temp);\n\t\tPath Source = Paths.get(folder_temp + url);\n\t\tPath Destination = Paths.get(folder_photo + url);\n\t\tSystem.out.println(\"folder_photo : \" + folder_photo);\n\n\t\tif (Files.exists(Source)) {\n\t\t\t// Files.move(Source, Destination,\n\t\t\t// StandardCopyOption.REPLACE_EXISTING);\n\t\t\t// cpie du fichiet au lieu de deplaacer car il est enn coiurs\n\t\t\t// d'utilisation\n\t\t\tFiles.copy(Source, Destination, StandardCopyOption.REPLACE_EXISTING);\n\t\t}\n\n\t}",
"public void clearFile(File file){\n try{\n PrintWriter writer = new PrintWriter(file);\n writer.close();\n }\n catch(IOException e){\n System.out.println(\"IOException\");\n }\n }",
"public void copyImageFile() throws IOException {\n Path sourcePath = imageFile.toPath();\n\n String selectFileName = imageFile.getName();\n\n Path targetPath = Paths.get(\"/Users/houumeume/IdeaProjects/Assignment2/image/\" + selectFileName);\n\n //copy the file to the new directory\n Files.copy(sourcePath, targetPath, StandardCopyOption.REPLACE_EXISTING);\n\n //update the imageFile to point to the new File\n imageFile = new File(targetPath.toString());\n }",
"public String storeFile(MultipartFile file) {\n // Normalize file name\n String fileName = StringUtils.cleanPath(file.getOriginalFilename());\n\n try {\n // Check if the file's name contains invalid characters\n if(fileName.contains(\"..\")) {\n throw new FileStorageException(\"Sorry! Filename contains invalid path sequence \" + fileName);\n }\n\n // Copy file to the target location (Replacing existing file with the same name)\n Path targetLocation = this.fileStorageLocation.resolve(fileName);\n Files.copy(file.getInputStream(), targetLocation, StandardCopyOption.REPLACE_EXISTING);\n\n return fileName;\n } catch (IOException ex) {\n throw new FileStorageException(\"Could not store file \" + fileName + \". Please try again!\", ex);\n }\n }",
"private void copyCoverageFile(String sourceResourceName, String targetFileName, WorkflowJob job) throws Exception {\n FilePath directory = ensureWorkspaceExists(job);\n\n FilePath dest = directory.child(targetFileName);\n org.apache.commons.io.IOUtils.copy(getClass().getResourceAsStream(sourceResourceName), dest.write());\n }",
"public static void backupFileWithTimestamp(String fileName) {\n String timeStamp = new SimpleDateFormat(\"yyyy.MM.dd.HH.mm.ss\").format(new Date());\n String[] parts = fileName.split(\"\\\\.\");\n if (parts.length != 2) {\n try {\n throw new Exception(\"File name must have one and only one dot\");\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n else {\n String newFileName = parts[0] + \"_\" + timeStamp + \".\" + parts[1];\n Path source = Paths.get(fileName);\n Path target = Paths.get(newFileName);\n try {\n Files.copy(source, target, StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }",
"public void copyOne(String from, String to) {\n\t\tFile source = new File(from);\n\t\tif (sourceExists(source)) {\n\t\t\tFile target = new File(to);\n\t\t\ttry{\n\t\t\t\tif(!targetExists(target)){\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath());\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName()\n\t\t\t\t\t\t\t+ \" COPIED!\");\n\t\t\t\t} else if (target.exists() && confirmReplace()) {\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath(),\n\t\t\t\t\t\t\tREPLACE_EXISTING);\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName() + \" REPLACED!\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"File WASN'T copied!\");\n\t\t\t\t}\n\t\t\t}catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void mo83565a(File file) {\n if (!file.delete()) {\n file.deleteOnExit();\n }\n }",
"public void add(File file) throws IOException {\n File realFile = new File(Main.CWD, file.getName());\n File rmStage = new File(REMOVAL, file.getName());\n if (rmStage.exists()) {\n rmStage.delete();\n }\n if (realFile.exists()) {\n if (curAndCWDIdentical(file, realFile)) {\n File stagingFile = new File(INDEX, file.getName());\n if (stagingFile.exists()) {\n stagingFile.delete();\n }\n } else {\n File resultingFile = new File(INDEX, file.getName());\n if (!resultingFile.exists()) {\n resultingFile.createNewFile();\n }\n String content = Utils.readContentsAsString(realFile);\n Utils.writeContents(resultingFile, content);\n }\n }\n }",
"private static URL toFileURL(URL resource) throws IOException {\n\t\t// Don't bother copying file urls\n\t\t//\n\t\tif (resource.getProtocol()\n\t\t\t.equalsIgnoreCase(\"file\"))\n\t\t\treturn resource;\n\n\t\t//\n\t\t// Need to make a copy to a temp file\n\t\t//\n\n\t\tFile f = File.createTempFile(\"resource\", \".jar\");\n\t\tFiles.createDirectories(f.getParentFile()\n\t\t\t.toPath());\n\t\ttry (InputStream in = resource.openStream(); OutputStream out = Files.newOutputStream(f.toPath())) {\n\t\t\tbyte[] buffer = new byte[BUFFER_SIZE];\n\t\t\tfor (int size; (size = in.read(buffer, 0, buffer.length)) > 0;) {\n\t\t\t\tout.write(buffer, 0, size);\n\t\t\t}\n\t\t}\n\t\tf.deleteOnExit();\n\t\treturn f.toURI()\n\t\t\t.toURL();\n\t}",
"private static File generateTemp(Path path) {\n File tempFile = null;\n try {\n InputStream in = Files.newInputStream(path);\n String tDir = System.getProperty(\"user.dir\") + File.separator + ASSETS_FOLDER_TEMP_NAME;\n tempFile = new File(tDir + File.separator + path.getFileName());\n try (FileOutputStream out = new FileOutputStream(tempFile)) {\n IOUtils.copy(in, out);\n }\n album.addToImageList(tempFile.getAbsolutePath());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return tempFile;\n }"
]
| [
"0.63194627",
"0.6129217",
"0.6016188",
"0.59620935",
"0.59073186",
"0.5899682",
"0.5836104",
"0.5826138",
"0.5701778",
"0.5681258",
"0.5669165",
"0.5658914",
"0.5576389",
"0.55576795",
"0.5482945",
"0.5482863",
"0.54804635",
"0.54719114",
"0.54247457",
"0.5385117",
"0.53799146",
"0.5337974",
"0.53370833",
"0.53367215",
"0.53188294",
"0.53093934",
"0.53093123",
"0.5305548",
"0.5255844",
"0.524921",
"0.5199769",
"0.51993537",
"0.51836085",
"0.5176725",
"0.51655644",
"0.5164919",
"0.51639843",
"0.51524633",
"0.513999",
"0.51386106",
"0.51273733",
"0.5105753",
"0.51050866",
"0.5104691",
"0.50997645",
"0.5082142",
"0.50719005",
"0.50708187",
"0.50659287",
"0.50573605",
"0.5053193",
"0.5042983",
"0.500353",
"0.5000622",
"0.49828532",
"0.4976625",
"0.49648294",
"0.49643806",
"0.4963848",
"0.49583393",
"0.4955837",
"0.49481717",
"0.49463564",
"0.49338496",
"0.49293533",
"0.49007016",
"0.4895758",
"0.48844165",
"0.4867697",
"0.486769",
"0.48635906",
"0.48586836",
"0.48558795",
"0.48548493",
"0.48432827",
"0.48368776",
"0.48359236",
"0.48286617",
"0.48124486",
"0.48059556",
"0.4800904",
"0.47977284",
"0.47927248",
"0.47909838",
"0.47818884",
"0.4781779",
"0.4775666",
"0.4772887",
"0.4771247",
"0.47666162",
"0.47649705",
"0.47622365",
"0.4757179",
"0.4757042",
"0.47566956",
"0.4752495",
"0.47504845",
"0.47499624",
"0.4749584",
"0.4747458"
]
| 0.5682017 | 9 |
This function "breaks hardlinks" to the current replica file. When doing a DataNode upgrade, we create a bunch of hardlinks to each block file. This cleverly ensures that both the old and the new storage directories can contain the same block file, without using additional space for the data. However, when we want to append to the replica file, we need to "break" the hardlink to ensure that the old snapshot continues to contain the old data length. If we failed to do that, we could roll back to the previous/ directory during a downgrade, and find that the block contents were longer than they were at the time of upgrade. | public boolean breakHardLinksIfNeeded() throws IOException {
final File file = getBlockFile();
final FileIoProvider fileIoProvider = getFileIoProvider();
if (file == null || getVolume() == null) {
throw new IOException("detachBlock:Block not found. " + this);
}
File meta = getMetaFile();
int linkCount = fileIoProvider.getHardLinkCount(getVolume(), file);
if (linkCount > 1) {
DataNode.LOG.info("Breaking hardlink for " + linkCount + "x-linked " +
"block " + this);
breakHardlinks(file, this);
}
if (fileIoProvider.getHardLinkCount(getVolume(), meta) > 1) {
breakHardlinks(meta, this);
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void breakHardlinks(File file, Block b) throws IOException {\n final FileIoProvider fileIoProvider = getFileIoProvider();\n final File tmpFile = DatanodeUtil.createFileWithExistsCheck(\n getVolume(), b, DatanodeUtil.getUnlinkTmpFile(file), fileIoProvider);\n try {\n try (FileInputStream in = fileIoProvider.getFileInputStream(\n getVolume(), file)) {\n try (FileOutputStream out = fileIoProvider.getFileOutputStream(\n getVolume(), tmpFile)) {\n IOUtils.copyBytes(in, out, 16 * 1024);\n }\n }\n if (file.length() != tmpFile.length()) {\n throw new IOException(\"Copy of file \" + file + \" size \" + file.length()\n + \" into file \" + tmpFile + \" resulted in a size of \"\n + tmpFile.length());\n }\n fileIoProvider.replaceFile(getVolume(), tmpFile, file);\n } catch (IOException e) {\n if (!fileIoProvider.delete(getVolume(), tmpFile)) {\n DataNode.LOG.info(\"detachFile failed to delete temporary file \" +\n tmpFile);\n }\n throw e;\n }\n }",
"@Test(timeout = 30000)\n public void testDnRestartWithHardLinkInTmp() {\n MiniDFSCluster cluster = null;\n try {\n conf.setBoolean(DFSConfigKeys\n .DFS_DATANODE_ALLOW_SAME_DISK_TIERING, true);\n conf.setDouble(DFSConfigKeys\n .DFS_DATANODE_RESERVE_FOR_ARCHIVE_DEFAULT_PERCENTAGE, 0.5);\n cluster = new MiniDFSCluster.Builder(conf)\n .numDataNodes(1)\n .storageTypes(\n new StorageType[]{StorageType.DISK, StorageType.ARCHIVE})\n .storagesPerDatanode(2)\n .build();\n FileSystem fs = cluster.getFileSystem();\n DataNode dataNode = cluster.getDataNodes().get(0);\n\n Path filePath = new Path(name.getMethodName());\n long fileLen = 100;\n\n ExtendedBlock block = createTestFile(fs, fileLen, filePath);\n\n FsDatasetImpl fsDataSetImpl = (FsDatasetImpl) dataNode.getFSDataset();\n\n ReplicaInfo oldReplicaInfo = fsDataSetImpl.getReplicaInfo(block);\n ReplicaInfo newReplicaInfo =\n createNewReplicaObjWithLink(block, fsDataSetImpl);\n\n // Link exists\n assertTrue(Files.exists(Paths.get(newReplicaInfo.getBlockURI())));\n\n cluster.restartDataNode(0);\n cluster.waitDatanodeFullyStarted(cluster.getDataNodes().get(0), 60000);\n cluster.triggerBlockReports();\n\n // Un-finalized replica data (hard link) is deleted as they were in /tmp\n assertFalse(Files.exists(Paths.get(newReplicaInfo.getBlockURI())));\n\n // Old block is there.\n assertTrue(Files.exists(Paths.get(oldReplicaInfo.getBlockURI())));\n\n validateFileLen(fs, fileLen, filePath);\n\n } catch (Exception ex) {\n LOG.info(\"Exception in testDnRestartWithHardLinkInTmp \", ex);\n fail(\"Exception while testing testDnRestartWithHardLinkInTmp \");\n } finally {\n if (cluster.isClusterUp()) {\n cluster.shutdown();\n }\n }\n }",
"@Test(timeout = 30000)\n public void testDnRestartWithHardLink() throws Exception {\n MiniDFSCluster cluster = null;\n boolean isReplicaDeletionEnabled =\n conf.getBoolean(DFSConfigKeys.DFS_DATANODE_DUPLICATE_REPLICA_DELETION,\n DFSConfigKeys.DFS_DATANODE_DUPLICATE_REPLICA_DELETION_DEFAULT);\n try {\n conf.setBoolean(DFSConfigKeys\n .DFS_DATANODE_ALLOW_SAME_DISK_TIERING, true);\n conf.setDouble(DFSConfigKeys\n .DFS_DATANODE_RESERVE_FOR_ARCHIVE_DEFAULT_PERCENTAGE, 0.5);\n // Since Datanode restart in the middle of block movement may leave\n // uncleaned hardlink, disabling this config (i.e. deletion of duplicate\n // replica) will prevent this edge-case from happening.\n // We also re-enable deletion of duplicate replica just before starting\n // Dir Scanner using setDeleteDuplicateReplicasForTests (HDFS-16213).\n conf.setBoolean(DFSConfigKeys.DFS_DATANODE_DUPLICATE_REPLICA_DELETION,\n false);\n cluster = new MiniDFSCluster.Builder(conf)\n .numDataNodes(1)\n .storageTypes(\n new StorageType[]{StorageType.DISK, StorageType.ARCHIVE})\n .storagesPerDatanode(2)\n .build();\n cluster.waitActive();\n FileSystem fs = cluster.getFileSystem();\n DataNode dataNode = cluster.getDataNodes().get(0);\n\n Path filePath = new Path(name.getMethodName());\n long fileLen = 100;\n\n ExtendedBlock block = createTestFile(fs, fileLen, filePath);\n\n FsDatasetImpl fsDataSetImpl = (FsDatasetImpl) dataNode.getFSDataset();\n\n final ReplicaInfo oldReplicaInfo = fsDataSetImpl.getReplicaInfo(block);\n StorageType oldStorageType = oldReplicaInfo.getVolume().getStorageType();\n\n fsDataSetImpl.finalizeNewReplica(\n createNewReplicaObjWithLink(block, fsDataSetImpl), block);\n\n ReplicaInfo newReplicaInfo = fsDataSetImpl.getReplicaInfo(block);\n StorageType newStorageType = newReplicaInfo.getVolume().getStorageType();\n assertEquals(StorageType.DISK, oldStorageType);\n assertEquals(StorageType.ARCHIVE, newStorageType);\n\n cluster.restartDataNode(0);\n cluster.waitDatanodeFullyStarted(cluster.getDataNodes().get(0), 60000);\n cluster.triggerBlockReports();\n\n assertTrue(Files.exists(Paths.get(newReplicaInfo.getBlockURI())));\n assertTrue(Files.exists(Paths.get(oldReplicaInfo.getBlockURI())));\n\n // Before starting Dir Scanner, we should enable deleteDuplicateReplicas.\n FsDatasetSpi<?> fsDataset = cluster.getDataNodes().get(0).getFSDataset();\n DirectoryScanner scanner = new DirectoryScanner(fsDataset, conf);\n FsVolumeImpl fsVolume =\n (FsVolumeImpl) fsDataset.getFsVolumeReferences().get(0);\n fsVolume.getBlockPoolSlice(fsVolume.getBlockPoolList()[0])\n .setDeleteDuplicateReplicasForTests(true);\n scanner.start();\n scanner.run();\n\n GenericTestUtils.waitFor(\n () -> !Files.exists(Paths.get(oldReplicaInfo.getBlockURI())),\n 100, 10000, \"Old replica is not deleted by DirScanner even after \"\n + \"10s of waiting has elapsed\");\n assertTrue(Files.exists(Paths.get(newReplicaInfo.getBlockURI())));\n\n validateFileLen(fs, fileLen, filePath);\n\n // Additional tests to ensure latest replica gets deleted after file\n // deletion.\n fs.delete(filePath, false);\n GenericTestUtils.waitFor(\n () -> !Files.exists(Paths.get(newReplicaInfo.getBlockURI())),\n 100, 10000);\n } finally {\n conf.setBoolean(DFSConfigKeys.DFS_DATANODE_DUPLICATE_REPLICA_DELETION,\n isReplicaDeletionEnabled);\n if (cluster != null && cluster.isClusterUp()) {\n cluster.shutdown(true, true);\n }\n }\n }",
"private void corruptBlock(MiniDFSCluster cluster, FileSystem fs, final Path fileName,\n int dnIndex, ExtendedBlock block) throws IOException {\n cluster.getMaterializedReplica(0, block).truncateData(10);\n\n // Run directory scanner to update the DN's volume map \n DataNodeTestUtils.runDirectoryScanner(cluster.getDataNodes().get(0));\n DataNodeProperties dnProps = cluster.stopDataNode(0);\n\n // Each datanode has multiple data dirs, check each\n for (int dirIndex = 0; dirIndex < 2; dirIndex++) {\n final String bpid = cluster.getNamesystem().getBlockPoolId();\n File storageDir = cluster.getStorageDir(dnIndex, dirIndex);\n File dataDir = MiniDFSCluster.getFinalizedDir(storageDir, bpid);\n File scanLogFile = new File(dataDir, \"dncp_block_verification.log.curr\");\n if (scanLogFile.exists()) {\n // wait for one minute for deletion to succeed;\n for (int i = 0; !scanLogFile.delete(); i++) {\n assertTrue(\"Could not delete log file in one minute\", i < 60);\n try {\n Thread.sleep(1000);\n } catch (InterruptedException ignored) {\n }\n }\n }\n }\n\n // restart the detained so the corrupt replica will be detected\n cluster.restartDataNode(dnProps);\n }",
"@Test\n public void testMultipleAppendsDuringCatchupTailing() throws Exception {\n Configuration conf = new Configuration();\n // Set a length edits tailing period, and explicit rolling, so we can\n // control the ingest of edits by the standby for this test.\n conf.set(DFS_HA_TAILEDITS_PERIOD_KEY, \"5000\");\n conf.setInt(DFS_HA_LOGROLL_PERIOD_KEY, (-1));\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).nnTopology(MiniDFSNNTopology.simpleHATopology()).numDataNodes(3).build();\n FileSystem fs = null;\n try {\n cluster.transitionToActive(0);\n fs = HATestUtil.configureFailoverFs(cluster, conf);\n Path fileToAppend = new Path(\"/FileToAppend\");\n Path fileToTruncate = new Path(\"/FileToTruncate\");\n final byte[] data = new byte[1 << 16];\n ThreadLocalRandom.current().nextBytes(data);\n final int[] appendPos = AppendTestUtil.randomFilePartition(data.length, TestHAAppend.COUNT);\n final int[] truncatePos = AppendTestUtil.randomFilePartition(data.length, 1);\n // Create file, write some data, and hflush so that the first\n // block is in the edit log prior to roll.\n FSDataOutputStream out = TestHAAppend.createAndHflush(fs, fileToAppend, data, appendPos[0]);\n FSDataOutputStream out4Truncate = TestHAAppend.createAndHflush(fs, fileToTruncate, data, data.length);\n // Let the StandbyNode catch the creation of the file.\n cluster.getNameNode(0).getRpcServer().rollEditLog();\n cluster.getNameNode(1).getNamesystem().getEditLogTailer().doTailEdits();\n out.close();\n out4Truncate.close();\n // Append and re-close a few time, so that many block entries are queued.\n for (int i = 0; i < (TestHAAppend.COUNT); i++) {\n int end = (i < ((TestHAAppend.COUNT) - 1)) ? appendPos[(i + 1)] : data.length;\n out = fs.append(fileToAppend);\n out.write(data, appendPos[i], (end - (appendPos[i])));\n out.close();\n }\n boolean isTruncateReady = fs.truncate(fileToTruncate, truncatePos[0]);\n // Ensure that blocks have been reported to the SBN ahead of the edits\n // arriving.\n cluster.triggerBlockReports();\n // Failover the current standby to active.\n cluster.shutdownNameNode(0);\n cluster.transitionToActive(1);\n // Check the FSCK doesn't detect any bad blocks on the SBN.\n int rc = ToolRunner.run(new org.apache.hadoop.hdfs.tools.DFSck(cluster.getConfiguration(1)), new String[]{ \"/\", \"-files\", \"-blocks\" });\n Assert.assertEquals(0, rc);\n Assert.assertEquals(\"CorruptBlocks should be empty.\", 0, cluster.getNameNode(1).getNamesystem().getCorruptReplicaBlocks());\n AppendTestUtil.checkFullFile(fs, fileToAppend, data.length, data, fileToAppend.toString());\n if (!isTruncateReady) {\n TestFileTruncate.checkBlockRecovery(fileToTruncate, cluster.getFileSystem(1), 300, 200);\n }\n AppendTestUtil.checkFullFile(fs, fileToTruncate, truncatePos[0], data, fileToTruncate.toString());\n } finally {\n if (null != cluster) {\n cluster.shutdown();\n }\n if (null != fs) {\n fs.close();\n }\n }\n }",
"@Test\n public void testWhenDecreasingReplication() throws Exception {\n Configuration conf = new HdfsConfiguration();\n conf.setLong(DFSConfigKeys.DFS_BLOCKREPORT_INTERVAL_MSEC_KEY, 1000L);\n conf.set(DFSConfigKeys.DFS_NAMENODE_RECONSTRUCTION_PENDING_TIMEOUT_SEC_KEY, Integer.toString(2));\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(3).build();\n FileSystem fs = cluster.getFileSystem();\n final FSNamesystem namesystem = cluster.getNamesystem();\n\n try {\n final Path fileName = new Path(\"/foo1\");\n DFSTestUtil.createFile(fs, fileName, 2, (short) 3, 0L);\n DFSTestUtil.waitReplication(fs, fileName, (short) 3);\n\n ExtendedBlock block = DFSTestUtil.getFirstBlock(fs, fileName);\n corruptBlock(cluster, fs, fileName, 0, block);\n\n DFSTestUtil.waitReplication(fs, fileName, (short) 2);\n\n assertEquals(2, countReplicas(namesystem, block).liveReplicas());\n assertEquals(1, countReplicas(namesystem, block).corruptReplicas());\n\n namesystem.setReplication(fileName.toString(), (short) 2);\n\n // wait for 3 seconds so that all block reports are processed.\n try {\n Thread.sleep(3000);\n } catch (InterruptedException ignored) {\n }\n\n assertEquals(2, countReplicas(namesystem, block).liveReplicas());\n assertEquals(0, countReplicas(namesystem, block).corruptReplicas());\n\n } finally {\n cluster.shutdown();\n }\n }",
"@Test (timeout=180000)\n public void testLingeringReferenceFile() throws Exception {\n TableName table =\n TableName.valueOf(\"testLingeringReferenceFile\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by creating a fake reference file\n FileSystem fs = FileSystem.get(conf);\n Path tableDir= FSUtils.getTableDir(FSUtils.getRootDir(conf), table);\n Path regionDir = FSUtils.getRegionDirs(fs, tableDir).get(0);\n Path famDir = new Path(regionDir, FAM_STR);\n Path fakeReferenceFile = new Path(famDir, \"fbce357483ceea.12144538\");\n fs.create(fakeReferenceFile);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.LINGERING_REFERENCE_HFILE });\n // fix reference file\n doFsck(conf, true);\n // check that reference file fixed\n assertNoErrors(doFsck(conf, false));\n } finally {\n cleanupTable(table);\n }\n }",
"@Test\n public void testWithAllCorruptReplicas() throws Exception {\n Configuration conf = new HdfsConfiguration();\n conf.setLong(DFSConfigKeys.DFS_BLOCKREPORT_INTERVAL_MSEC_KEY, 1000L);\n conf.set(DFSConfigKeys.DFS_NAMENODE_RECONSTRUCTION_PENDING_TIMEOUT_SEC_KEY, Integer.toString(2));\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(3).build();\n FileSystem fs = cluster.getFileSystem();\n final FSNamesystem namesystem = cluster.getNamesystem();\n\n try {\n final Path fileName = new Path(\"/foo1\");\n DFSTestUtil.createFile(fs, fileName, 2, (short) 3, 0L);\n DFSTestUtil.waitReplication(fs, fileName, (short) 3);\n\n ExtendedBlock block = DFSTestUtil.getFirstBlock(fs, fileName);\n corruptBlock(cluster, fs, fileName, 0, block);\n\n corruptBlock(cluster, fs, fileName, 1, block);\n\n corruptBlock(cluster, fs, fileName, 2, block);\n\n // wait for 3 seconds so that all block reports are processed.\n try {\n Thread.sleep(3000);\n } catch (InterruptedException ignored) {\n }\n\n assertEquals(0, countReplicas(namesystem, block).liveReplicas());\n assertEquals(3, countReplicas(namesystem, block).corruptReplicas());\n\n namesystem.setReplication(fileName.toString(), (short) 1);\n\n // wait for 3 seconds so that all block reports are processed.\n try {\n Thread.sleep(3000);\n } catch (InterruptedException ignored) {\n }\n\n assertEquals(0, countReplicas(namesystem, block).liveReplicas());\n assertEquals(3, countReplicas(namesystem, block).corruptReplicas());\n\n } finally {\n cluster.shutdown();\n }\n }",
"private ReplicaInfo createNewReplicaObjWithLink(ExtendedBlock block,\n FsDatasetImpl fsDataSetImpl) throws IOException {\n ReplicaInfo replicaInfo = fsDataSetImpl.getReplicaInfo(block);\n FsVolumeSpi destVolume = getDestinationVolume(block, fsDataSetImpl);\n return fsDataSetImpl.moveReplicaToVolumeOnSameMount(block, replicaInfo,\n destVolume.obtainReference());\n }",
"@Test (timeout=180000)\n public void testFixByTable() throws Exception {\n TableName table1 =\n TableName.valueOf(\"testFixByTable1\");\n TableName table2 =\n TableName.valueOf(\"testFixByTable2\");\n try {\n setupTable(table1);\n // make sure data in regions, if in wal only there is no data loss\n admin.flush(table1);\n // Mess them up by leaving a hole in the hdfs data\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"B\"),\n Bytes.toBytes(\"C\"), false, false, true); // don't rm meta\n\n setupTable(table2);\n // make sure data in regions, if in wal only there is no data loss\n admin.flush(table2);\n // Mess them up by leaving a hole in the hdfs data\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"B\"),\n Bytes.toBytes(\"C\"), false, false, true); // don't rm meta\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.NOT_IN_HDFS, ERROR_CODE.NOT_IN_HDFS});\n\n // fix hole in table 1\n doFsck(conf, true, table1);\n // check that hole in table 1 fixed\n assertNoErrors(doFsck(conf, false, table1));\n // check that hole in table 2 still there\n assertErrors(doFsck(conf, false, table2),\n new ERROR_CODE[] {ERROR_CODE.NOT_IN_HDFS});\n\n // fix hole in table 2\n doFsck(conf, true, table2);\n // check that hole in both tables fixed\n assertNoErrors(doFsck(conf, false));\n assertEquals(ROWKEYS.length - 2, countRows());\n } finally {\n cleanupTable(table1);\n cleanupTable(table2);\n }\n }",
"@Test\n public void tesInvalidateMissingBlock() throws Exception {\n long blockSize = 1024;\n int heatbeatInterval = 1;\n HdfsConfiguration c = new HdfsConfiguration();\n c.setInt(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY, heatbeatInterval);\n c.setLong(DFS_BLOCK_SIZE_KEY, blockSize);\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(c).\n numDataNodes(1).build();\n try {\n cluster.waitActive();\n DFSTestUtil.createFile(cluster.getFileSystem(), new Path(\"/a\"),\n blockSize, (short)1, 0);\n\n String bpid = cluster.getNameNode().getNamesystem().getBlockPoolId();\n DataNode dn = cluster.getDataNodes().get(0);\n FsDatasetImpl fsdataset = (FsDatasetImpl) dn.getFSDataset();\n List<ReplicaInfo> replicaInfos = fsdataset.getFinalizedBlocks(bpid);\n assertEquals(1, replicaInfos.size());\n\n ReplicaInfo replicaInfo = replicaInfos.get(0);\n String blockPath = replicaInfo.getBlockURI().getPath();\n String metaPath = replicaInfo.getMetadataURI().getPath();\n File blockFile = new File(blockPath);\n File metaFile = new File(metaPath);\n\n // Mock local block file not found when disk with some exception.\n fsdataset.invalidateMissingBlock(bpid, replicaInfo);\n\n // Assert local block file wouldn't be deleted from disk.\n assertTrue(blockFile.exists());\n // Assert block info would be removed from ReplicaMap.\n assertEquals(\"null\",\n fsdataset.getReplicaString(bpid, replicaInfo.getBlockId()));\n BlockManager blockManager = cluster.getNameNode().\n getNamesystem().getBlockManager();\n GenericTestUtils.waitFor(() ->\n blockManager.getLowRedundancyBlocksCount() == 1, 100, 5000);\n\n // Mock local block file found when disk back to normal.\n FsVolumeSpi.ScanInfo info = new FsVolumeSpi.ScanInfo(\n replicaInfo.getBlockId(), blockFile.getParentFile().getAbsoluteFile(),\n blockFile.getName(), metaFile.getName(), replicaInfo.getVolume());\n fsdataset.checkAndUpdate(bpid, info);\n GenericTestUtils.waitFor(() ->\n blockManager.getLowRedundancyBlocksCount() == 0, 100, 5000);\n } finally {\n cluster.shutdown();\n }\n }",
"@Test(timeout = 30000)\n public void testMoveBlockWithSameMountMoveWithoutSpace() {\n MiniDFSCluster cluster = null;\n try {\n conf.setBoolean(DFSConfigKeys\n .DFS_DATANODE_ALLOW_SAME_DISK_TIERING, true);\n conf.setDouble(DFSConfigKeys\n .DFS_DATANODE_RESERVE_FOR_ARCHIVE_DEFAULT_PERCENTAGE, 0.0);\n cluster = new MiniDFSCluster.Builder(conf)\n .numDataNodes(1)\n .storageTypes(\n new StorageType[]{StorageType.DISK, StorageType.ARCHIVE})\n .storagesPerDatanode(2)\n .build();\n FileSystem fs = cluster.getFileSystem();\n DataNode dataNode = cluster.getDataNodes().get(0);\n Path filePath = new Path(name.getMethodName());\n long fileLen = 100;\n\n ExtendedBlock block = createTestFile(fs, fileLen, filePath);\n\n FsDatasetImpl fsDataSetImpl = (FsDatasetImpl) dataNode.getFSDataset();\n assertEquals(StorageType.DISK,\n fsDataSetImpl.getReplicaInfo(block).getVolume().getStorageType());\n\n FsDatasetImpl fsDataSetImplSpy =\n spy((FsDatasetImpl) dataNode.getFSDataset());\n fsDataSetImplSpy.moveBlockAcrossStorage(\n block, StorageType.ARCHIVE, null);\n\n fail(\"testMoveBlockWithSameMountMoveWithoutSpace operation\" +\n \" should failed\");\n } catch (Exception ex) {\n assertTrue(ex instanceof DiskChecker.DiskOutOfSpaceException);\n } finally {\n if (cluster.isClusterUp()) {\n cluster.shutdown();\n }\n }\n }",
"void allocate(ApexFile parent_file, int link_factor){\n assert this.used == false;\n\n //delete the block from parent file\n\n // CHECK THAT IF THE PARENT FILE IS NULL THEN DO NOT DO THE DELETE BLOCK STEP\n if(this.parentFile != null){\n this.parentFile.deleteBlock(this);\n }\n\n this.parentFile = parent_file;\n this.used = true;\n this.hf = 1;//reset\n this.uf = 1;//reset\n this.lf = link_factor;//binaries or non binaries\n }",
"@Test(timeout = 30000)\n public void testMoveBlockFailure() {\n // Test copy\n testMoveBlockFailure(conf);\n // Test hardlink\n conf.setBoolean(DFSConfigKeys\n .DFS_DATANODE_ALLOW_SAME_DISK_TIERING, true);\n conf.setDouble(DFSConfigKeys\n .DFS_DATANODE_RESERVE_FOR_ARCHIVE_DEFAULT_PERCENTAGE, 0.5);\n testMoveBlockFailure(conf);\n }",
"public boolean unMountSmb(java.io.File r19) {\n /*\n r18 = this;\n r11 = r19.exists();\n if (r11 != 0) goto L_0x0008;\n L_0x0006:\n r4 = 0;\n L_0x0007:\n return r4;\n L_0x0008:\n r10 = r19.getPath();\n r11 = 0;\n r11 = r10.charAt(r11);\n r14 = 47;\n if (r11 == r14) goto L_0x0029;\n L_0x0015:\n r11 = new java.lang.StringBuilder;\n r11.<init>();\n r14 = \"/\";\n r11 = r11.append(r14);\n r11 = r11.append(r10);\n r10 = r11.toString();\n L_0x0029:\n r11 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0068 }\n r11.<init>();\t Catch:{ Exception -> 0x0068 }\n r14 = \"busybox umount -fl \";\n r11 = r11.append(r14);\t Catch:{ Exception -> 0x0068 }\n r11 = r11.append(r10);\t Catch:{ Exception -> 0x0068 }\n r14 = \" > \";\n r11 = r11.append(r14);\t Catch:{ Exception -> 0x0068 }\n r14 = \"/data/etc/log\";\n r11 = r11.append(r14);\t Catch:{ Exception -> 0x0068 }\n r14 = \" 2>&1\";\n r11 = r11.append(r14);\t Catch:{ Exception -> 0x0068 }\n r3 = r11.toString();\t Catch:{ Exception -> 0x0068 }\n r11 = 2;\n r2 = new java.lang.String[r11];\t Catch:{ Exception -> 0x0068 }\n r11 = 0;\n r14 = \"#!/system/bin/sh\";\n r2[r11] = r14;\t Catch:{ Exception -> 0x0068 }\n r11 = 1;\n r2[r11] = r3;\t Catch:{ Exception -> 0x0068 }\n r0 = r18;\n r11 = r0.ShellFileWrite(r2);\t Catch:{ Exception -> 0x0068 }\n if (r11 != 0) goto L_0x006b;\n L_0x0066:\n r4 = 0;\n goto L_0x0007;\n L_0x0068:\n r6 = move-exception;\n r4 = 0;\n goto L_0x0007;\n L_0x006b:\n r0 = r18;\n r11 = r0.SystemProperties_set;\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n r14 = 0;\n r15 = 2;\n r15 = new java.lang.Object[r15];\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n r16 = 0;\n r17 = \"ctl.start\";\n r15[r16] = r17;\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n r16 = 1;\n r17 = \"cifsmanager\";\n r15[r16] = r17;\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n r11.invoke(r14, r15);\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n r12 = java.lang.System.currentTimeMillis();\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n L_0x0088:\n r0 = r18;\n r11 = r0.SystemProperties_get;\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n r14 = 0;\n r15 = 2;\n r15 = new java.lang.Object[r15];\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n r16 = 0;\n r17 = \"init.svc.cifsmanager\";\n r15[r16] = r17;\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n r16 = 1;\n r17 = \"\";\n r15[r16] = r17;\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n r7 = r11.invoke(r14, r15);\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n r7 = (java.lang.String) r7;\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n if (r7 == 0) goto L_0x00ce;\n L_0x00a6:\n r11 = \"stopped\";\n r11 = r7.equals(r11);\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n if (r11 == 0) goto L_0x00ce;\n L_0x00af:\n r11 = r18.ShellLogRead();\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n if (r11 == 0) goto L_0x00ce;\n L_0x00b5:\n r4 = r19.delete();\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n r8 = 0;\n r9 = r8;\n L_0x00bb:\n if (r4 != 0) goto L_0x00fa;\n L_0x00bd:\n r8 = r9 + 1;\n r11 = 20;\n if (r9 >= r11) goto L_0x0007;\n L_0x00c3:\n r14 = 50;\n java.lang.Thread.sleep(r14);\t Catch:{ InterruptedException -> 0x00f8, IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee }\n L_0x00c8:\n r4 = r19.delete();\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n r9 = r8;\n goto L_0x00bb;\n L_0x00ce:\n r14 = 200; // 0xc8 float:2.8E-43 double:9.9E-322;\n java.lang.Thread.sleep(r14);\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n r14 = java.lang.System.currentTimeMillis();\t Catch:{ IllegalArgumentException -> 0x00e4, IllegalAccessException -> 0x00e9, InvocationTargetException -> 0x00ee, InterruptedException -> 0x00f3 }\n r14 = r14 - r12;\n r16 = 1000; // 0x3e8 float:1.401E-42 double:4.94E-321;\n r11 = (r14 > r16 ? 1 : (r14 == r16 ? 0 : -1));\n if (r11 < 0) goto L_0x0088;\n L_0x00de:\n r4 = r19.delete();\n goto L_0x0007;\n L_0x00e4:\n r5 = move-exception;\n r5.printStackTrace();\n goto L_0x00de;\n L_0x00e9:\n r5 = move-exception;\n r5.printStackTrace();\n goto L_0x00de;\n L_0x00ee:\n r5 = move-exception;\n r5.printStackTrace();\n goto L_0x00de;\n L_0x00f3:\n r5 = move-exception;\n r5.printStackTrace();\n goto L_0x00de;\n L_0x00f8:\n r11 = move-exception;\n goto L_0x00c8;\n L_0x00fa:\n r8 = r9;\n goto L_0x0007;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: zidoo.samba.manager.RockSmbManager.unMountSmb(java.io.File):boolean\");\n }",
"@Test\n public void testReplicateEntriesForHFiles() throws Exception {\n Path dir = TestReplicationSink.TEST_UTIL.getDataTestDirOnTestFS(\"testReplicateEntries\");\n Path familyDir = new Path(dir, Bytes.toString(TestReplicationSink.FAM_NAME1));\n int numRows = 10;\n List<Path> p = new ArrayList<>(1);\n final String hfilePrefix = \"hfile-\";\n // 1. Generate 25 hfile ranges\n Random rng = new SecureRandom();\n Set<Integer> numbers = new HashSet<>();\n while ((numbers.size()) < 50) {\n numbers.add(rng.nextInt(1000));\n } \n List<Integer> numberList = new ArrayList<>(numbers);\n Collections.sort(numberList);\n Map<String, Long> storeFilesSize = new HashMap<>(1);\n // 2. Create 25 hfiles\n Configuration conf = TestReplicationSink.TEST_UTIL.getConfiguration();\n FileSystem fs = dir.getFileSystem(conf);\n Iterator<Integer> numbersItr = numberList.iterator();\n for (int i = 0; i < 25; i++) {\n Path hfilePath = new Path(familyDir, (hfilePrefix + i));\n HFileTestUtil.createHFile(conf, fs, hfilePath, TestReplicationSink.FAM_NAME1, TestReplicationSink.FAM_NAME1, Bytes.toBytes(numbersItr.next()), Bytes.toBytes(numbersItr.next()), numRows);\n p.add(hfilePath);\n storeFilesSize.put(hfilePath.getName(), fs.getFileStatus(hfilePath).getLen());\n }\n // 3. Create a BulkLoadDescriptor and a WALEdit\n Map<byte[], List<Path>> storeFiles = new HashMap<>(1);\n storeFiles.put(TestReplicationSink.FAM_NAME1, p);\n org.apache.hadoop.hbase.wal.WALEdit edit = null;\n WALProtos.BulkLoadDescriptor loadDescriptor = null;\n try (Connection c = ConnectionFactory.createConnection(conf);RegionLocator l = c.getRegionLocator(TestReplicationSink.TABLE_NAME1)) {\n HRegionInfo regionInfo = l.getAllRegionLocations().get(0).getRegionInfo();\n loadDescriptor = ProtobufUtil.toBulkLoadDescriptor(TestReplicationSink.TABLE_NAME1, UnsafeByteOperations.unsafeWrap(regionInfo.getEncodedNameAsBytes()), storeFiles, storeFilesSize, 1);\n edit = org.apache.hadoop.hbase.wal.WALEdit.createBulkLoadEvent(regionInfo, loadDescriptor);\n }\n List<WALEntry> entries = new ArrayList<>(1);\n // 4. Create a WALEntryBuilder\n WALEntry.Builder builder = TestReplicationSink.createWALEntryBuilder(TestReplicationSink.TABLE_NAME1);\n // 5. Copy the hfile to the path as it is in reality\n for (int i = 0; i < 25; i++) {\n String pathToHfileFromNS = new StringBuilder(100).append(TestReplicationSink.TABLE_NAME1.getNamespaceAsString()).append(SEPARATOR).append(Bytes.toString(TestReplicationSink.TABLE_NAME1.getName())).append(SEPARATOR).append(Bytes.toString(loadDescriptor.getEncodedRegionName().toByteArray())).append(SEPARATOR).append(Bytes.toString(TestReplicationSink.FAM_NAME1)).append(SEPARATOR).append((hfilePrefix + i)).toString();\n String dst = ((TestReplicationSink.baseNamespaceDir) + (Path.SEPARATOR)) + pathToHfileFromNS;\n Path dstPath = new Path(dst);\n FileUtil.copy(fs, p.get(0), fs, dstPath, false, conf);\n }\n entries.add(builder.build());\n try (ResultScanner scanner = TestReplicationSink.table1.getScanner(new Scan())) {\n // 6. Assert no existing data in table\n Assert.assertEquals(0, scanner.next(numRows).length);\n }\n // 7. Replicate the bulk loaded entry\n TestReplicationSink.SINK.replicateEntries(entries, CellUtil.createCellScanner(edit.getCells().iterator()), TestReplicationSink.replicationClusterId, TestReplicationSink.baseNamespaceDir, TestReplicationSink.hfileArchiveDir);\n try (ResultScanner scanner = TestReplicationSink.table1.getScanner(new Scan())) {\n // 8. Assert data is replicated\n Assert.assertEquals(numRows, scanner.next(numRows).length);\n }\n // Clean up the created hfiles or it will mess up subsequent tests\n }",
"@Test (timeout=180000)\n public void testLingeringSplitParent() throws Exception {\n TableName table =\n TableName.valueOf(\"testLingeringSplitParent\");\n Table meta = null;\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // make sure data in regions, if in wal only there is no data loss\n admin.flush(table);\n HRegionLocation location = tbl.getRegionLocation(\"B\");\n\n // Delete one region from meta, but not hdfs, unassign it.\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"B\"),\n Bytes.toBytes(\"C\"), true, true, false);\n\n // Create a new meta entry to fake it as a split parent.\n meta = connection.getTable(TableName.META_TABLE_NAME, tableExecutorService);\n HRegionInfo hri = location.getRegionInfo();\n\n HRegionInfo a = new HRegionInfo(tbl.getName(),\n Bytes.toBytes(\"B\"), Bytes.toBytes(\"BM\"));\n HRegionInfo b = new HRegionInfo(tbl.getName(),\n Bytes.toBytes(\"BM\"), Bytes.toBytes(\"C\"));\n\n hri.setOffline(true);\n hri.setSplit(true);\n\n MetaTableAccessor.addRegionToMeta(meta, hri, a, b);\n meta.close();\n admin.flush(TableName.META_TABLE_NAME);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.LINGERING_SPLIT_PARENT, ERROR_CODE.HOLE_IN_REGION_CHAIN});\n\n // regular repair cannot fix lingering split parent\n hbck = doFsck(conf, true);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.LINGERING_SPLIT_PARENT, ERROR_CODE.HOLE_IN_REGION_CHAIN });\n assertFalse(hbck.shouldRerun());\n hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.LINGERING_SPLIT_PARENT, ERROR_CODE.HOLE_IN_REGION_CHAIN});\n\n // fix lingering split parent\n hbck = new HBaseFsck(conf, hbfsckExecutorService);\n hbck.connect();\n hbck.setDisplayFullReport(); // i.e. -details\n hbck.setTimeLag(0);\n hbck.setFixSplitParents(true);\n hbck.onlineHbck();\n assertTrue(hbck.shouldRerun());\n hbck.close();\n\n Get get = new Get(hri.getRegionName());\n Result result = meta.get(get);\n assertTrue(result.getColumnCells(HConstants.CATALOG_FAMILY,\n HConstants.SPLITA_QUALIFIER).isEmpty());\n assertTrue(result.getColumnCells(HConstants.CATALOG_FAMILY,\n HConstants.SPLITB_QUALIFIER).isEmpty());\n admin.flush(TableName.META_TABLE_NAME);\n\n // fix other issues\n doFsck(conf, true);\n\n // check that all are fixed\n assertNoErrors(doFsck(conf, false));\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n IOUtils.closeQuietly(meta);\n }\n }",
"protected void migrateOnDemand () {\n\t\ttry {\n\t\t\tif (fso.fileExists(prefix+\".fat\") && !fso.fileExists(prefix+EXTENSIONS[UBM_FILE])) {\n\t\t\t\tRandomAccessFile ubm, meta, ctr, rbm;\n\t\t\t\tInputStream inputStream;\n\t\t\t\tOutputStream outputStream;\n\n\t\t\t\tfso.renameFile(prefix+\".fat\",prefix+EXTENSIONS[UBM_FILE]);\n\n\t\t\t\tubm = fso.openFile(prefix+EXTENSIONS[UBM_FILE], \"rw\");\n\t\t\t\tmeta = fso.openFile(prefix+EXTENSIONS[MTD_FILE], \"rw\");\n\t\t\t\tctr = fso.openFile(prefix+EXTENSIONS[CTR_FILE], \"rw\");\n\t\t\t\tubm.seek(ubm.length()-16);\n\t\t\t\tmeta.writeInt(blockSize = ubm.readInt());\n\t\t\t\tmeta.writeInt(size = ubm.readInt());\n\t\t\t\tctr.setLength(ubm.readLong()+blockSize);\t// maxOffset\n\t\t\t\tctr.close();\n\t\t\t\tmeta.close();\n\t\t\t\tubm.setLength(ubm.length()-16);\n\n\t\t\t\tubm.seek(0);\n\t\t\t\trbm = fso.openFile(prefix+EXTENSIONS[UBM_FILE], \"rw\");\n\t\t\t\tinputStream = new BufferedInputStream(new RandomAccessFileInputStream(ubm));\n\t\t\t\toutputStream = new BufferedOutputStream(new RandomAccessFileOutputStream(rbm));\n\t\t\t\tfor (int b; (b = inputStream.read())!=-1;)\n\t\t\t\t\toutputStream.write(b);\n\t\t\t\toutputStream.close();\n\t\t\t\tinputStream.close();\n\t\t\t\trbm.close();\n\t\t\t\tubm.close();\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t}\n\t}",
"private void failureRecovery() throws IOException {\n //no requirement to check if current page version is the newest\n// HashMap<Integer, Integer> map = getLastPageVersions();\n\n //just overwrite pages with versions from log files\n List<UserData> lastCommittedPageVersions = getLastCommittedPageVersions();\n\n for (UserData lastCommittedPageVersion : lastCommittedPageVersions) {\n persistData(lastCommittedPageVersion);\n }\n }",
"void combineAndCollectSnapshotBlocks(\n INode.ReclaimContext reclaimContext, INodeFile file, FileDiff removed) {\n BlockInfo[] removedBlocks = removed.getBlocks();\n if (removedBlocks == null) {\n FileWithSnapshotFeature sf = file.getFileWithSnapshotFeature();\n assert sf != null : \"FileWithSnapshotFeature is null\";\n if(sf.isCurrentFileDeleted())\n sf.collectBlocksAndClear(reclaimContext, file);\n return;\n }\n int p = getPrior(removed.getSnapshotId(), true);\n FileDiff earlierDiff = p == Snapshot.NO_SNAPSHOT_ID ? null : getDiffById(p);\n // Copy blocks to the previous snapshot if not set already\n if (earlierDiff != null) {\n earlierDiff.setBlocks(removedBlocks);\n }\n BlockInfo[] earlierBlocks =\n (earlierDiff == null ? new BlockInfoContiguous[]{} : earlierDiff.getBlocks());\n // Find later snapshot (or file itself) with blocks\n BlockInfo[] laterBlocks = findLaterSnapshotBlocks(removed.getSnapshotId());\n laterBlocks = (laterBlocks == null) ? file.getBlocks() : laterBlocks;\n // Skip blocks, which belong to either the earlier or the later lists\n int i = 0;\n for(; i < removedBlocks.length; i++) {\n if(i < earlierBlocks.length && removedBlocks[i] == earlierBlocks[i])\n continue;\n if(i < laterBlocks.length && removedBlocks[i] == laterBlocks[i])\n continue;\n break;\n }\n // Check if last block is part of truncate recovery\n BlockInfo lastBlock = file.getLastBlock();\n BlockInfo dontRemoveBlock = null;\n if (lastBlock != null && lastBlock.getBlockUCState().equals(\n HdfsServerConstants.BlockUCState.UNDER_RECOVERY)) {\n dontRemoveBlock = lastBlock.getUnderConstructionFeature()\n .getTruncateBlock();\n }\n // Collect the remaining blocks of the file, ignoring truncate block\n for (;i < removedBlocks.length; i++) {\n if(dontRemoveBlock == null || !removedBlocks[i].equals(dontRemoveBlock)) {\n reclaimContext.collectedBlocks().addDeleteBlock(removedBlocks[i]);\n }\n }\n }",
"@Test\n public void testAysncDiskServiceDeleteReplica()\n throws IOException, InterruptedException, TimeoutException {\n HdfsConfiguration config = new HdfsConfiguration();\n // Bump up replication interval.\n config.setInt(DFSConfigKeys.DFS_NAMENODE_REDUNDANCY_INTERVAL_SECONDS_KEY, 10);\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(config).numDataNodes(3).build();\n DistributedFileSystem fs = cluster.getFileSystem();\n String bpid = cluster.getNamesystem().getBlockPoolId();\n DataNodeFaultInjector oldInjector = DataNodeFaultInjector.get();\n final Semaphore semaphore = new Semaphore(0);\n try {\n cluster.waitActive();\n final DataNodeFaultInjector injector = new DataNodeFaultInjector() {\n @Override\n public void delayDeleteReplica() {\n // Lets wait for the remove replica process.\n try {\n semaphore.acquire(1);\n } catch (InterruptedException e) {\n // ignore.\n }\n }\n };\n DataNodeFaultInjector.set(injector);\n\n // Create file.\n Path path = new Path(\"/testfile\");\n DFSTestUtil.createFile(fs, path, 1024, (short) 3, 0);\n DFSTestUtil.waitReplication(fs, path, (short) 3);\n LocatedBlock lb = DFSTestUtil.getAllBlocks(fs, path).get(0);\n ExtendedBlock extendedBlock = lb.getBlock();\n DatanodeInfo[] loc = lb.getLocations();\n assertEquals(3, loc.length);\n\n // DN side.\n DataNode dn = cluster.getDataNode(loc[0].getIpcPort());\n final FsDatasetImpl ds = (FsDatasetImpl) DataNodeTestUtils.getFSDataset(dn);\n List<Block> blockList = Lists.newArrayList(extendedBlock.getLocalBlock());\n assertNotNull(ds.getStoredBlock(bpid, extendedBlock.getBlockId()));\n ds.invalidate(bpid, blockList.toArray(new Block[0]));\n\n // Test get blocks and datanodes.\n loc = DFSTestUtil.getAllBlocks(fs, path).get(0).getLocations();\n assertEquals(3, loc.length);\n List<String> uuids = Lists.newArrayList();\n for (DatanodeInfo datanodeInfo : loc) {\n uuids.add(datanodeInfo.getDatanodeUuid());\n }\n assertTrue(uuids.contains(dn.getDatanodeUuid()));\n\n // Do verification that the first replication shouldn't be deleted from the memory first.\n // Because the namenode still contains this replica, so client will try to read it.\n // If this replica is deleted from memory, the client would got an ReplicaNotFoundException.\n assertNotNull(ds.getStoredBlock(bpid, extendedBlock.getBlockId()));\n\n // Make it resume the removeReplicaFromMem method.\n semaphore.release(1);\n\n // Waiting for the async deletion task finish.\n GenericTestUtils.waitFor(() ->\n ds.asyncDiskService.countPendingDeletions() == 0, 100, 1000);\n\n // Sleep for two heartbeat times.\n Thread.sleep(config.getTimeDuration(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY,\n DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_DEFAULT,\n TimeUnit.SECONDS, TimeUnit.MILLISECONDS) * 2);\n\n // Test get blocks and datanodes again.\n loc = DFSTestUtil.getAllBlocks(fs, path).get(0).getLocations();\n assertEquals(2, loc.length);\n uuids = Lists.newArrayList();\n for (DatanodeInfo datanodeInfo : loc) {\n uuids.add(datanodeInfo.getDatanodeUuid());\n }\n // The namenode does not contain this replica.\n assertFalse(uuids.contains(dn.getDatanodeUuid()));\n\n // This replica has deleted from datanode memory.\n assertNull(ds.getStoredBlock(bpid, extendedBlock.getBlockId()));\n } finally {\n cluster.shutdown();\n DataNodeFaultInjector.set(oldInjector);\n }\n }",
"@Test\n public void testByAddingAnExtraDataNode() throws Exception {\n Configuration conf = new HdfsConfiguration();\n conf.setLong(DFSConfigKeys.DFS_BLOCKREPORT_INTERVAL_MSEC_KEY, 1000L);\n conf.set(DFSConfigKeys.DFS_NAMENODE_RECONSTRUCTION_PENDING_TIMEOUT_SEC_KEY, Integer.toString(2));\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(4).build();\n FileSystem fs = cluster.getFileSystem();\n final FSNamesystem namesystem = cluster.getNamesystem();\n DataNodeProperties dnPropsFourth = cluster.stopDataNode(3);\n\n try {\n final Path fileName = new Path(\"/foo1\");\n DFSTestUtil.createFile(fs, fileName, 2, (short) 3, 0L);\n DFSTestUtil.waitReplication(fs, fileName, (short) 3);\n\n ExtendedBlock block = DFSTestUtil.getFirstBlock(fs, fileName);\n corruptBlock(cluster, fs, fileName, 0, block);\n\n DFSTestUtil.waitReplication(fs, fileName, (short) 2);\n\n assertEquals(2, countReplicas(namesystem, block).liveReplicas());\n assertEquals(1, countReplicas(namesystem, block).corruptReplicas());\n\n cluster.restartDataNode(dnPropsFourth);\n\n DFSTestUtil.waitReplication(fs, fileName, (short) 3);\n\n assertEquals(3, countReplicas(namesystem, block).liveReplicas());\n assertEquals(0, countReplicas(namesystem, block).corruptReplicas());\n } finally {\n cluster.shutdown();\n }\n }",
"void downgradeToReadLocks();",
"private boolean changeSize(Inode inode, int bytesBefore, int bytesAfter) {\t\t\n\t\tif (bytesAfter > MAX_FILE_SIZE) {\n\t\t\treturn false;\n\t\t}\n\t\tint blocksBefore = neededBlocks(bytesBefore);\n\t\tint blocksAfter = neededBlocks(bytesAfter);\n\t\t\n\t\tif (blocksBefore == blocksAfter) {\n\t\t\tinode.length = bytesAfter;\n\t\t\treturn true;\n\t\t}\n\t\tbyte[] buffer = null;\n\t\t\n\t\tif (blocksBefore > blocksAfter) {\n\t\t\tif (blocksBefore > DIRECT) {\n\t\t\t\t// Only do a read if we care about the indirect block\n\t\t\t\tbuffer = new byte[BLOCK_SIZE];\t\t\t\t\n\t\t\t\tSysLib.rawread(inode.indirect, buffer);\t\t\t\t\n\t\t\t}\n\t\t\tfor (int i = blocksAfter + 1; i <= blocksBefore; i++) {\n\t\t\t\tdeallocateBlock(inode, i, buffer);\n\t\t\t}\n\t\t\tif (blocksAfter < DIRECT && blocksBefore > DIRECT) {\n\t\t\t\tsuperblock.returnBlock((short)inode.indirect);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tassert (blocksAfter > blocksBefore);\n\t\t\tif (blocksBefore <= DIRECT && blocksAfter > DIRECT) {\n\t\t\t\tinode.indirect = (short)(superblock.getBlock());\n\t\t\t}\n\t\t\tif (blocksBefore > DIRECT || blocksAfter > DIRECT) {\n\t\t\t\t// Only do a read if we care about the indirect block\n\t\t\t\tbuffer = new byte[BLOCK_SIZE];\n\t\t\t\tSysLib.rawread(inode.indirect, buffer);\t\t\t\t\n\t\t\t}\n\t\t\tfor (int i = blocksBefore; i < blocksAfter; i++) {\n\t\t\t\tallocateBlock(inode, i, buffer);\n\t\t\t}\n\t\t\tif (blocksAfter > DIRECT) {\n\t\t\t\tSysLib.rawwrite(inode.indirect, buffer);\n\t\t\t}\n\n\t\t}\n\t\tinode.length = bytesAfter;\n\t\tif(blocksAfter != 0)\n\t\t\tgetBlockNumber(inode, blocksAfter-1, buffer);\n\t\treturn true;\n\t}",
"@Test (timeout=180000)\n public void testNotInHdfsWithReplicas() throws Exception {\n TableName table =\n TableName.valueOf(\"tableNotInHdfs\");\n HBaseAdmin admin = new HBaseAdmin(conf);\n try {\n HRegionInfo[] oldHris = new HRegionInfo[2];\n setupTableWithRegionReplica(table, 2);\n assertEquals(ROWKEYS.length, countRows());\n NavigableMap<HRegionInfo, ServerName> map = MetaScanner.allTableRegions(TEST_UTIL.getConnection(),\n tbl.getName());\n int i = 0;\n // store the HRIs of the regions we will mess up\n for (Map.Entry<HRegionInfo, ServerName> m : map.entrySet()) {\n if (m.getKey().getStartKey().length > 0 &&\n m.getKey().getStartKey()[0] == Bytes.toBytes(\"B\")[0]) {\n LOG.debug(\"Initially server hosting \" + m.getKey() + \" is \" + m.getValue());\n oldHris[i++] = m.getKey();\n }\n }\n // make sure data in regions\n TEST_UTIL.getHBaseAdmin().flush(table.getName());\n\n // Mess it up by leaving a hole in the hdfs data\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"B\"),\n Bytes.toBytes(\"C\"), false, false, true); // don't rm meta\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {ERROR_CODE.NOT_IN_HDFS});\n\n // fix hole\n doFsck(conf, true);\n\n // check that hole fixed\n assertNoErrors(doFsck(conf,false));\n assertEquals(ROWKEYS.length - 2, countRows());\n\n // the following code checks whether the old primary/secondary has\n // been unassigned and the new primary/secondary has been assigned\n i = 0;\n HRegionInfo[] newHris = new HRegionInfo[2];\n // get all table's regions from meta\n map = MetaScanner.allTableRegions(TEST_UTIL.getConnection(), tbl.getName());\n // get the HRIs of the new regions (hbck created new regions for fixing the hdfs mess-up)\n for (Map.Entry<HRegionInfo, ServerName> m : map.entrySet()) {\n if (m.getKey().getStartKey().length > 0 &&\n m.getKey().getStartKey()[0] == Bytes.toBytes(\"B\")[0]) {\n newHris[i++] = m.getKey();\n }\n }\n // get all the online regions in the regionservers\n Collection<ServerName> servers = admin.getClusterStatus().getServers();\n Set<HRegionInfo> onlineRegions = new HashSet<HRegionInfo>();\n for (ServerName s : servers) {\n List<HRegionInfo> list = admin.getOnlineRegions(s);\n onlineRegions.addAll(list);\n }\n // the new HRIs must be a subset of the online regions\n assertTrue(onlineRegions.containsAll(Arrays.asList(newHris)));\n // the old HRIs must not be part of the set (removeAll would return false if\n // the set didn't change)\n assertFalse(onlineRegions.removeAll(Arrays.asList(oldHris)));\n } finally {\n cleanupTable(table);\n admin.close();\n }\n }",
"@Test\n public void shouldMarkMissingEntriesWithWrongSizeAsBroken()\n throws Exception\n {\n givenStoreHasFileOfSize(PNFSID, 17);\n\n // and given the name space entry reports a different size\n StorageInfo info = createStorageInfo(20);\n given(_pnfs.getFileAttributes(eq(PNFSID), Mockito.anySet()))\n .willReturn(fileAttributes(PNFSID, info));\n\n // when reading the meta data record\n MetaDataRecord record = _consistentStore.get(PNFSID);\n\n // then the replica is marked broken\n assertThat(record.getState(), is(EntryState.BROKEN));\n\n // and the name space entry is untouched\n verify(_pnfs, never())\n .setFileAttributes(eq(PNFSID), Mockito.any(FileAttributes.class));\n }",
"@Test\n public void testReplicaMapAfterDatanodeRestart() throws Exception {\n Configuration conf = new HdfsConfiguration();\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf, new File(GenericTestUtils.getRandomizedTempPath())).nnTopology(MiniDFSNNTopology.simpleFederatedTopology(2)).build();\n try {\n cluster.waitActive();\n NameNode nn1 = cluster.getNameNode(0);\n NameNode nn2 = cluster.getNameNode(1);\n Assert.assertNotNull(\"cannot create nn1\", nn1);\n Assert.assertNotNull(\"cannot create nn2\", nn2);\n // check number of volumes in fsdataset\n DataNode dn = cluster.getDataNodes().get(0);\n FsDatasetImpl dataSet = ((FsDatasetImpl) (DataNodeTestUtils.getFSDataset(dn)));\n List<FsVolumeSpi> volumes = null;\n try (FsDatasetSpi.FsVolumeReferences referredVols = dataSet.getFsVolumeReferences()) {\n // number of volumes should be 2 - [data1, data2]\n Assert.assertEquals(\"number of volumes is wrong\", 2, referredVols.size());\n volumes = new ArrayList(referredVols.size());\n for (FsVolumeSpi vol : referredVols) {\n volumes.add(vol);\n }\n }\n ArrayList<String> bpList = new ArrayList(Arrays.asList(cluster.getNamesystem(0).getBlockPoolId(), cluster.getNamesystem(1).getBlockPoolId()));\n Assert.assertTrue(\"Cluster should have 2 block pools\", ((bpList.size()) == 2));\n createReplicas(bpList, volumes, cluster.getFsDatasetTestUtils(dn));\n ReplicaMap oldReplicaMap = new ReplicaMap(new AutoCloseableLock());\n oldReplicaMap.addAll(dataSet.volumeMap);\n cluster.restartDataNode(0);\n cluster.waitActive();\n dn = cluster.getDataNodes().get(0);\n dataSet = ((FsDatasetImpl) (dn.getFSDataset()));\n testEqualityOfReplicaMap(oldReplicaMap, dataSet.volumeMap, bpList);\n } finally {\n cluster.shutdown();\n }\n }",
"private void writeBlock(DataInputStream in) throws IOException {\n //\n // Read in the header\n //\n DataOutputStream reply = \n new DataOutputStream(new BufferedOutputStream(s.getOutputStream()));\n try {\n boolean shouldReportBlock = in.readBoolean();\n Block b = new Block();\n b.readFields(in);\n int numTargets = in.readInt();\n if (numTargets <= 0) {\n throw new IOException(\"Mislabelled incoming datastream.\");\n }\n DatanodeInfo targets[] = new DatanodeInfo[numTargets];\n for (int i = 0; i < targets.length; i++) {\n DatanodeInfo tmp = new DatanodeInfo();\n tmp.readFields(in);\n targets[i] = tmp;\n }\n byte encodingType = (byte) in.read();\n long len = in.readLong();\n \n //\n // Make sure curTarget is equal to this machine\n //\n DatanodeInfo curTarget = targets[0];\n \n //\n // Track all the places we've successfully written the block\n //\n Vector mirrors = new Vector();\n \n //\n // Open local disk out\n //\n DataOutputStream out = new DataOutputStream(new BufferedOutputStream(data.writeToBlock(b)));\n InetSocketAddress mirrorTarget = null;\n String mirrorNode = null;\n try {\n //\n // Open network conn to backup machine, if \n // appropriate\n //\n DataInputStream in2 = null;\n DataOutputStream out2 = null;\n if (targets.length > 1) {\n // Connect to backup machine\n mirrorNode = targets[1].getName();\n mirrorTarget = createSocketAddr(mirrorNode);\n try {\n Socket s2 = new Socket();\n s2.connect(mirrorTarget, READ_TIMEOUT);\n s2.setSoTimeout(READ_TIMEOUT);\n out2 = new DataOutputStream(new BufferedOutputStream(s2.getOutputStream()));\n in2 = new DataInputStream(new BufferedInputStream(s2.getInputStream()));\n \n // Write connection header\n out2.write(OP_WRITE_BLOCK);\n out2.writeBoolean(shouldReportBlock);\n b.write(out2);\n out2.writeInt(targets.length - 1);\n for (int i = 1; i < targets.length; i++) {\n targets[i].write(out2);\n }\n out2.write(encodingType);\n out2.writeLong(len);\n myMetrics.replicatedBlocks(1);\n } catch (IOException ie) {\n if (out2 != null) {\n LOG.info(\"Exception connecting to mirror \" + mirrorNode \n + \"\\n\" + StringUtils.stringifyException(ie));\n try {\n out2.close();\n in2.close();\n } catch (IOException out2close) {\n } finally {\n out2 = null;\n in2 = null;\n }\n }\n }\n }\n \n //\n // Process incoming data, copy to disk and\n // maybe to network.\n //\n boolean anotherChunk = len != 0;\n byte buf[] = new byte[BUFFER_SIZE];\n \n while (anotherChunk) {\n while (len > 0) {\n int bytesRead = in.read(buf, 0, (int)Math.min(buf.length, len));\n if (bytesRead < 0) {\n throw new EOFException(\"EOF reading from \"+s.toString());\n }\n if (bytesRead > 0) {\n try {\n out.write(buf, 0, bytesRead);\n myMetrics.wroteBytes(bytesRead);\n } catch (IOException iex) {\n if (iex.getMessage().startsWith(\"No space left on device\")) {\n \t throw new DiskOutOfSpaceException(\"No space left on device\");\n } else {\n shutdown();\n throw iex;\n }\n }\n if (out2 != null) {\n try {\n out2.write(buf, 0, bytesRead);\n } catch (IOException out2e) {\n LOG.info(\"Exception writing to mirror \" + mirrorNode \n + \"\\n\" + StringUtils.stringifyException(out2e));\n //\n // If stream-copy fails, continue \n // writing to disk. We shouldn't \n // interrupt client write.\n //\n try {\n out2.close();\n in2.close();\n } catch (IOException out2close) {\n } finally {\n out2 = null;\n in2 = null;\n }\n }\n }\n len -= bytesRead;\n }\n }\n \n if (encodingType == RUNLENGTH_ENCODING) {\n anotherChunk = false;\n } else if (encodingType == CHUNKED_ENCODING) {\n len = in.readLong();\n if (out2 != null) {\n try {\n out2.writeLong(len);\n } catch (IOException ie) {\n LOG.info(\"Exception writing to mirror \" + mirrorNode \n + \"\\n\" + StringUtils.stringifyException(ie));\n try {\n out2.close();\n in2.close();\n } catch (IOException ie2) {\n // NOTHING\n } finally {\n out2 = null;\n in2 = null;\n }\n }\n }\n if (len == 0) {\n anotherChunk = false;\n }\n }\n }\n \n if (out2 != null) {\n try {\n out2.flush();\n long complete = in2.readLong();\n if (complete != WRITE_COMPLETE) {\n LOG.info(\"Conflicting value for WRITE_COMPLETE: \" + complete);\n }\n LocatedBlock newLB = new LocatedBlock();\n newLB.readFields(in2);\n in2.close();\n out2.close();\n DatanodeInfo mirrorsSoFar[] = newLB.getLocations();\n for (int k = 0; k < mirrorsSoFar.length; k++) {\n mirrors.add(mirrorsSoFar[k]);\n }\n } catch (IOException ie) {\n LOG.info(\"Exception writing to mirror \" + mirrorNode \n + \"\\n\" + StringUtils.stringifyException(ie));\n try {\n out2.close();\n in2.close();\n } catch (IOException ie2) {\n // NOTHING\n } finally {\n out2 = null;\n in2 = null;\n }\n }\n }\n if (out2 == null) {\n LOG.info(\"Received block \" + b + \" from \" + \n s.getInetAddress());\n } else {\n LOG.info(\"Received block \" + b + \" from \" + \n s.getInetAddress() + \n \" and mirrored to \" + mirrorTarget);\n }\n } finally {\n try {\n out.close();\n } catch (IOException iex) {\n shutdown();\n throw iex;\n }\n }\n data.finalizeBlock(b);\n myMetrics.wroteBlocks(1);\n \n // \n // Tell the namenode that we've received this block \n // in full, if we've been asked to. This is done\n // during NameNode-directed block transfers, but not\n // client writes.\n //\n if (shouldReportBlock) {\n synchronized (receivedBlockList) {\n receivedBlockList.add(b);\n receivedBlockList.notifyAll();\n }\n }\n \n //\n // Tell client job is done, and reply with\n // the new LocatedBlock.\n //\n reply.writeLong(WRITE_COMPLETE);\n mirrors.add(curTarget);\n LocatedBlock newLB = new LocatedBlock(b, (DatanodeInfo[]) mirrors.toArray(new DatanodeInfo[mirrors.size()]));\n newLB.write(reply);\n } finally {\n reply.close();\n }\n }",
"protected void relocateDatabaseIfNeeded() {\n File databaseDir = new File(config.dataDir(), Constants.DATABASE_DIR);\n File blocksDir = new File(databaseDir, \"block\");\n\n if (blocksDir.exists()) {\n LeveldbDatabase db = new LeveldbDatabase(blocksDir);\n byte[] header = db.get(Bytes.merge((byte) 0x00, Bytes.of(0L)));\n db.close();\n\n if (header == null || header.length < 33) {\n logger.info(\"Unable to decode genesis header. Quit relocating\");\n } else {\n String hash = Hex.encode(Arrays.copyOfRange(header, 1, 33));\n switch (hash) {\n case \"1d4fb49444a5a14dbe68f5f6109808c68e517b893c1e9bbffce9d199b5037c8e\":\n moveDatabase(databaseDir, config.databaseDir(Network.MAINNET));\n break;\n case \"abfe38563bed10ec431a4a9ad344a212ef62f6244c15795324cc06c2e8fa0f8d\":\n moveDatabase(databaseDir, config.databaseDir(Network.TESTNET));\n break;\n default:\n logger.info(\"Unable to recognize genesis hash. Quit relocating\");\n }\n }\n }\n }",
"@Test\n public void shouldMarkNonTransientReplicasWithWrongSizeAsBroken()\n throws Exception\n {\n givenStoreHasFileOfSize(PNFSID, 17);\n\n // and given the meta data indicates a different size, but is\n // otherwise in a valid non-transient state\n StorageInfo info = createStorageInfo(20);\n givenMetaDataStoreHas(PNFSID, CACHED, info);\n\n // and given that the name space provides the same storage info\n given(_pnfs.getFileAttributes(eq(PNFSID), Mockito.anySet()))\n .willReturn(fileAttributes(PNFSID, info));\n\n // when reading the meta data record\n MetaDataRecord record = _consistentStore.get(PNFSID);\n\n // then the replica is marked broken\n assertThat(record.getState(), is(EntryState.BROKEN));\n\n // and the storage info size is unaltered\n assertThat(record.getFileAttributes().getSize(), is(20L));\n\n // and no attributes are updated in the name space\n verify(_pnfs, never())\n .setFileAttributes(eq(PNFSID), Mockito.any(FileAttributes.class));\n verify(_pnfs, never())\n .clearCacheLocation(PNFSID);\n }",
"@Test\n public void A002_testDoBackupTwice() throws Exception\n {\n log.debug(\"A002_testDoBackupTwice\");\n\n List<BackupConfigDirectory> dirItems = new ArrayList<>();\n List<BackupConfigFile> fileItems = new ArrayList<>();\n BackupToolResult res;\n\n String currBackFldr;\n\n // Large backup, good for testing chunking\n currBackFldr = \"/tmp/backupTest/archivetest01/c/\";\n\n // Smaller backup, but significant\n currBackFldr = \"/tmp/backupTest/archivetest01/c/b/\";\n\n currBackFldr = \"/tmp/backupTest/archivetest01/c/b/a/\";\n\n // Folder has enough data to be chunked on 2MB boundaries.\n dirItems.add(new BackupConfigDirectory(currBackFldr,\n null,\n FSSBackupItemPathTypeEnum.LITERAL,\n null,\n null,\n null,\n false));\n\n String backupDir = \"/tmp/backupTest/tmp/A002_testDoBackupTwice/\";\n\n if( Files.exists( Paths.get(backupDir)) )\n {\n FileUtils.deleteDirectory(new File(backupDir));\n }\n\n Assert.assertFalse(Files.exists(Paths.get(backupDir)));\n\n BackupConfigStorageBackend bsbe = BackupConfigStorageBackend.from(\n \"file://\" + backupDir,\n \"\",\n \"\",\n true);\n\n Pattern archName = Pattern.compile(BackupConstants.DEFAULT_ARCHIVE_NAME_RULE_PATTERN);\n Pattern jobName = Pattern.compile(BackupConstants.DEFAULT_JOB_NAME_RULE_PATTERN);\n\n List<BackupToolNameComponentType> archComps = new ArrayList<>();\n List<BackupToolNameComponentType> jobComps = new ArrayList<>();\n\n archComps.add(BackupConstants.DEFAULT_ARCHIVE_NAME_RULE_COMPONENT);\n jobComps.add(BackupConstants.DEFAULT_JOB_NAME_RULE_COMPONENT);\n\n BackupConfigChunk chunk = new BackupConfigChunk(2, FSSBackupSizeType.MB, true);\n\n // Run the first full backup\n BackupConfig bc = BackupConfig.from(\n \"testdefault\",\n 1,\n false,\n false,\n false,\n true,\n false,\n false,\n true,\n false,\n false,\n false,\n true,\n true,\n false,\n false,\n false,\n Paths.get(\"/tmp/backupTest/holdingDirectory\"),\n null,\n null,\n null,\n null,\n Paths.get(\"backupState.xml\"),\n Paths.get(\"backupErrors.xml\"),\n null,\n dirItems,\n fileItems,\n null,\n null, // Backup ID\n FSSBackupType.FULL,\n FSSBackupHashType.NONE,\n null,\n null,\n chunk,\n archName,\n archComps,\n Paths.get(BackupConstants.DEFAULT_ARCHIVE_NAME_TEMPLATE),\n jobName,\n jobComps,\n Paths.get(BackupConstants.DEFAULT_JOB_NAME_TEMPLATE),\n null,\n null,\n bsbe,\n null\n );\n\n res = BackupFull.doBackup(bc);\n\n Assert.assertNotNull(res);\n Assert.assertTrue(res.getStatus() == BackupToolResultStatus.SUCCESS);\n\n // Sleep a few seconds before the second backup\n Thread.sleep(5000);\n\n // Run the second full backup\n bc = BackupConfig.from(\n \"testdefault\",\n 1,\n false,\n false,\n false,\n true,\n false,\n false,\n true,\n false,\n false,\n false,\n true,\n true,\n false,\n false,\n false,\n Paths.get(\"/tmp/backupTest/holdingDirectory\"),\n null,\n null,\n null,\n null,\n Paths.get(\"backupState.xml\"),\n Paths.get(\"backupErrors.xml\"),\n null,\n dirItems,\n fileItems,\n null,\n null, // Backup ID\n FSSBackupType.FULL,\n FSSBackupHashType.NONE,\n null,\n null,\n chunk,\n archName,\n archComps,\n Paths.get(BackupConstants.DEFAULT_ARCHIVE_NAME_TEMPLATE),\n jobName,\n jobComps,\n Paths.get(BackupConstants.DEFAULT_JOB_NAME_TEMPLATE),\n null,\n null,\n bsbe,\n null\n );\n\n res = BackupFull.doBackup(bc);\n\n Assert.assertNotNull(res);\n Assert.assertTrue(res.getStatus() == BackupToolResultStatus.SUCCESS);\n }",
"public void updateDatabaseRefBackwards() {\n // we want to do this twice, since we go from children attribute to folder\n // and then folder to actual parent dir\n myRef = myRef.getParent().getParent();\n }",
"@Test(timeout=20000)\n public void testWithReplicationFactorAsOne() throws Exception {\n Configuration conf = new HdfsConfiguration();\n conf.setLong(DFSConfigKeys.DFS_BLOCKREPORT_INTERVAL_MSEC_KEY, 1000L);\n conf.set(DFSConfigKeys.DFS_NAMENODE_RECONSTRUCTION_PENDING_TIMEOUT_SEC_KEY, Integer.toString(2));\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build();\n FileSystem fs = cluster.getFileSystem();\n final FSNamesystem namesystem = cluster.getNamesystem();\n\n try {\n final Path fileName = new Path(\"/foo1\");\n DFSTestUtil.createFile(fs, fileName, 2, (short) 2, 0L);\n DFSTestUtil.waitReplication(fs, fileName, (short) 2);\n\n ExtendedBlock block = DFSTestUtil.getFirstBlock(fs, fileName);\n corruptBlock(cluster, fs, fileName, 0, block);\n\n DFSTestUtil.waitReplication(fs, fileName, (short) 1);\n\n assertEquals(1, countReplicas(namesystem, block).liveReplicas());\n assertEquals(1, countReplicas(namesystem, block).corruptReplicas());\n\n namesystem.setReplication(fileName.toString(), (short) 1);\n\n // wait for 3 seconds so that all block reports are processed.\n for (int i = 0; i < 10; i++) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException ignored) {\n }\n if (countReplicas(namesystem, block).corruptReplicas() == 0) {\n break;\n }\n }\n\n assertEquals(1, countReplicas(namesystem, block).liveReplicas());\n assertEquals(0, countReplicas(namesystem, block).corruptReplicas());\n\n } finally {\n cluster.shutdown();\n }\n }",
"public void dismountTapeFile() {\r\n\t\tif (this.tapeIo == null) { return; } // no tape mounted\r\n\t\t\r\n\t\tif (this.needsSaving()) {\r\n\t\t\tthis.tapeIo.writeTapeFile(this.headLimit, this.tailLimit);\r\n\t\t}\r\n\t\tthis.tapeIo = null;\r\n\t\t\r\n\t\tthis.headLimit.append(this.tailLimit);\r\n\t\tthis.tailLimit.append(null); // (just to be sure)\r\n\t\t\r\n\t\tthis.isModified = false;\r\n\t\tthis.isReadonly = true;\r\n\t\tthis.currentBlock = this.headLimit;\r\n\t\tthis.hasFailedAccessAttempt = false;\r\n\t\t\r\n\t\tthis.resetSense();\r\n\t}",
"public static void updateDatabase(){\n\t\ttry {\n\t\t\tPrintWriter pwFLU = new PrintWriter(filePath);\n\t\t\tfor(Entry<String, Pair<FileID, Integer>> entry : Peer.fileList.entrySet()){\n\t\t\t\tString path = entry.getKey();\n\t\t\t\tPair<FileID, Integer> pair = entry.getValue();\n\t\t\t\tpwFLU.println(path + \"|\" + pair.getFirst().toString() + \"|\" + pair.getSecond());\n\t\t\t}\n\t\t\tpwFLU.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/*\n\t\t * UPDATE THE CHUNKS\n\t\t */\n\t\ttry {\n\t\t\tPrintWriter pwCLU = new PrintWriter(chunkPath);\n\t\t\tfor(ChunkInfo ci : Peer.chunks){\n\t\t\t\tpwCLU.println(ci.getFileId() + \"|\" + ci.getChunkNo() + \"|\" + ci.getDesiredRD() + \"|\" + ci.getActualRD());\n\t\t\t}\n\t\t\tpwCLU.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"protected void rehash() {\n int oldCapacity = table.length;\n ServerDescEntry oldMap[] = table;\n\n int newCapacity = oldCapacity * 2 + 1;\n ServerDescEntry newMap[] = new ServerDescEntry[newCapacity];\n\n threshold = (int)(newCapacity * loadFactor);\n table = newMap;\n\n for (int i = oldCapacity ; i-- > 0 ;) {\n for (ServerDescEntry old = oldMap[i] ; old != null ; ) {\n ServerDescEntry e = old;\n old = old.next;\n\n int index = (e.desc.sid & 0x7FFFFFFF) % newCapacity;\n e.next = newMap[index];\n newMap[index] = e;\n }\n }\n }",
"@Test(timeout=75000)\n public void testSplitDaughtersNotInMeta() throws Exception {\n TableName table = TableName.valueOf(\"testSplitdaughtersNotInMeta\");\n Table meta = connection.getTable(TableName.META_TABLE_NAME, tableExecutorService);\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // make sure data in regions, if in wal only there is no data loss\n admin.flush(table);\n HRegionLocation location = tbl.getRegionLocation(Bytes.toBytes(\"B\"));\n\n HRegionInfo hri = location.getRegionInfo();\n\n // Disable CatalogJanitor to prevent it from cleaning up the parent region\n // after split.\n admin.enableCatalogJanitor(false);\n\n // do a regular split\n byte[] regionName = location.getRegionInfo().getRegionName();\n admin.splitRegion(location.getRegionInfo().getRegionName(), Bytes.toBytes(\"BM\"));\n TestEndToEndSplitTransaction.blockUntilRegionSplit(conf, 60000, regionName, true);\n\n PairOfSameType<HRegionInfo> daughters =\n MetaTableAccessor.getDaughterRegions(meta.get(new Get(regionName)));\n\n // Delete daughter regions from meta, but not hdfs, unassign it.\n Map<HRegionInfo, ServerName> hris = tbl.getRegionLocations();\n undeployRegion(connection, hris.get(daughters.getFirst()), daughters.getFirst());\n undeployRegion(connection, hris.get(daughters.getSecond()), daughters.getSecond());\n\n List<Delete> deletes = new ArrayList<>();\n deletes.add(new Delete(daughters.getFirst().getRegionName()));\n deletes.add(new Delete(daughters.getSecond().getRegionName()));\n meta.delete(deletes);\n\n // Remove daughters from regionStates\n RegionStates regionStates = TEST_UTIL.getMiniHBaseCluster().getMaster().\n getAssignmentManager().getRegionStates();\n regionStates.deleteRegion(daughters.getFirst());\n regionStates.deleteRegion(daughters.getSecond());\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck,\n new ERROR_CODE[] { ERROR_CODE.NOT_IN_META_OR_DEPLOYED, ERROR_CODE.NOT_IN_META_OR_DEPLOYED,\n ERROR_CODE.HOLE_IN_REGION_CHAIN }); //no LINGERING_SPLIT_PARENT\n\n // now fix it. The fix should not revert the region split, but add daughters to META\n hbck = doFsck(\n conf, true, true, false, false, false, false, false, false, false, false, false, null);\n assertErrors(hbck,\n new ERROR_CODE[] { ERROR_CODE.NOT_IN_META_OR_DEPLOYED, ERROR_CODE.NOT_IN_META_OR_DEPLOYED,\n ERROR_CODE.HOLE_IN_REGION_CHAIN });\n\n // assert that the split hbase:meta entry is still there.\n Get get = new Get(hri.getRegionName());\n Result result = meta.get(get);\n assertNotNull(result);\n assertNotNull(MetaTableAccessor.getHRegionInfo(result));\n\n assertEquals(ROWKEYS.length, countRows());\n\n // assert that we still have the split regions\n assertEquals(tbl.getStartKeys().length, SPLITS.length + 1 + 1); //SPLITS + 1 is # regions pre-split.\n assertNoErrors(doFsck(conf, false)); //should be fixed by now\n } finally {\n admin.enableCatalogJanitor(true);\n meta.close();\n cleanupTable(table);\n }\n }",
"void prepareSortedLedgerStorageCheckpoint(long numBytesFlushed) throws IOException;",
"@Test(timeout = 30000)\n public void testConcurrentWriteAndDeleteBlock() throws Exception {\n final int numBlocks = 1000;\n final int threadCount = 10;\n // Generate data blocks.\n ExecutorService pool = Executors.newFixedThreadPool(threadCount);\n List<Future<?>> futureList = new ArrayList<>();\n Random random = new Random();\n // Random write block and delete half of them.\n for (int i = 0; i < threadCount; i++) {\n Thread thread = new Thread() {\n @Override\n public void run() {\n try {\n String bpid = BLOCK_POOL_IDS[random.nextInt(BLOCK_POOL_IDS.length)];\n for (int blockId = 0; blockId < numBlocks; blockId++) {\n ExtendedBlock eb = new ExtendedBlock(bpid, blockId);\n ReplicaHandler replica = null;\n try {\n replica = dataset.createRbw(StorageType.DEFAULT, null, eb,\n false);\n if (blockId % 2 > 0) {\n dataset.invalidate(bpid, new Block[]{eb.getLocalBlock()});\n }\n } finally {\n if (replica != null) {\n replica.close();\n }\n }\n }\n // Just keep final consistency no need to care exception.\n } catch (Exception ignore) {}\n }\n };\n thread.setName(\"AddBlock\" + i);\n futureList.add(pool.submit(thread));\n }\n // Wait for data generation\n for (Future<?> f : futureList) {\n f.get();\n }\n // Wait for the async deletion task finish.\n GenericTestUtils.waitFor(() -> dataset.asyncDiskService.countPendingDeletions() == 0,\n 100, 10000);\n for (String bpid : dataset.volumeMap.getBlockPoolList()) {\n assertEquals(numBlocks / 2, dataset.volumeMap.size(bpid));\n }\n }",
"public void sync()\n {\n byte[] blockData = new byte[Disk.blockSize];\n SysLib.int2bytes(totalBlocks, blockData, 0);\n SysLib.int2bytes(inodeBlocks, blockData, 4);\n SysLib.int2bytes(freeList, blockData, 8);\n SysLib.rawwrite(0, blockData);\n }",
"@Test\n public void newFilesInheritPinness() throws Exception {\n TachyonFile root = mTfs.open(new TachyonURI(\"/\"));\n mTfs.setPin(root, true);\n\n // Child file should be pinned\n TachyonFile file0 = createEmptyFile(new TachyonURI(\"/file0\"));\n Assert.assertTrue(mTfs.getInfo(file0).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId()));\n\n // Child folder should be pinned\n mTfs.mkdirs(new TachyonURI(\"/folder\"));\n TachyonFile folder = mTfs.open(new TachyonURI(\"/folder\"));\n Assert.assertTrue(mTfs.getInfo(folder).isPinned);\n\n // Grandchild file also pinned\n TachyonFile file1 = createEmptyFile(new TachyonURI(\"/folder/file1\"));\n Assert.assertTrue(mTfs.getInfo(file1).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId(), file1.getFileId()));\n\n // Unpinning child folder should cause its children to be unpinned as well\n mTfs.setPin(folder, false);\n Assert.assertFalse(mTfs.getInfo(folder).isPinned);\n Assert.assertFalse(mTfs.getInfo(file1).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId()));\n\n // And new grandchildren should be unpinned too.\n TachyonFile file2 = createEmptyFile(new TachyonURI(\"/folder/file2\"));\n Assert.assertFalse(mTfs.getInfo(file2).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId()));\n\n // But toplevel children still should be pinned!\n TachyonFile file3 = createEmptyFile(new TachyonURI(\"/file3\"));\n Assert.assertTrue(mTfs.getInfo(file3).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId(), file3.getFileId()));\n }",
"@FixFor( \"MODE-788\" )\n @Test\n public void shouldCreateSubgraphAndDeletePartOfThatSubgraphInSameOperation() {\n graph.batch()\n .create(\"/a\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .create(\"/a/b\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .create(\"/a/b/c\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .delete(\"/a/b\")\n .and()\n .execute();\n\n // Now look up node A ...\n File newFile = new File(testWorkspaceRoot, \"a\");\n assertTrue(newFile.exists());\n assertTrue(newFile.isDirectory());\n assertTrue(newFile.list().length == 0);\n assertFalse(new File(newFile, \"b\").exists());\n }",
"public static void generatePatch(\n File oldFile,\n File newFile,\n File patchFile,\n Long totalRecompressionLimit,\n Long deltaFriendlyOldBlobSizeLimit)\n throws IOException, InterruptedException {\n List<RecommendationModifier> recommendationModifiers = new ArrayList<RecommendationModifier>();\n if (totalRecompressionLimit != null) {\n recommendationModifiers.add(new TotalRecompressionLimiter(totalRecompressionLimit));\n }\n if (deltaFriendlyOldBlobSizeLimit != null) {\n recommendationModifiers.add(\n new DeltaFriendlyOldBlobSizeLimiter(deltaFriendlyOldBlobSizeLimit));\n }\n FileByFileV1DeltaGenerator generator =\n new FileByFileV1DeltaGenerator(\n recommendationModifiers.toArray(new RecommendationModifier[] {}));\n try (FileOutputStream patchOut = new FileOutputStream(patchFile);\n BufferedOutputStream bufferedPatchOut = new BufferedOutputStream(patchOut)) {\n generator.generateDelta(oldFile, newFile, bufferedPatchOut);\n bufferedPatchOut.flush();\n }\n }",
"@Test\n public void testAddVolumeWithSameDiskTiering() throws IOException {\n datanode = mock(DataNode.class);\n storage = mock(DataStorage.class);\n this.conf = new Configuration();\n this.conf.setLong(DFS_DATANODE_SCAN_PERIOD_HOURS_KEY, 0);\n this.conf.set(DFSConfigKeys.DFS_DATANODE_REPLICA_CACHE_ROOT_DIR_KEY,\n replicaCacheRootDir);\n conf.setBoolean(DFSConfigKeys.DFS_DATANODE_ALLOW_SAME_DISK_TIERING,\n true);\n conf.setDouble(DFSConfigKeys\n .DFS_DATANODE_RESERVE_FOR_ARCHIVE_DEFAULT_PERCENTAGE,\n 0.4);\n\n when(datanode.getConf()).thenReturn(conf);\n final DNConf dnConf = new DNConf(datanode);\n when(datanode.getDnConf()).thenReturn(dnConf);\n final BlockScanner disabledBlockScanner = new BlockScanner(datanode);\n when(datanode.getBlockScanner()).thenReturn(disabledBlockScanner);\n final ShortCircuitRegistry shortCircuitRegistry =\n new ShortCircuitRegistry(conf);\n when(datanode.getShortCircuitRegistry()).thenReturn(shortCircuitRegistry);\n when(datanode.getDataSetLockManager()).thenReturn(manager);\n\n createStorageDirs(storage, conf, 1);\n dataset = new FsDatasetImpl(datanode, storage, conf);\n\n List<NamespaceInfo> nsInfos = Lists.newArrayList();\n for (String bpid : BLOCK_POOL_IDS) {\n nsInfos.add(new NamespaceInfo(0, CLUSTER_ID, bpid, 1));\n }\n StorageLocation archive = createStorageWithStorageType(\"archive1\",\n StorageType.ARCHIVE, conf, storage, datanode);\n dataset.addVolume(archive, nsInfos);\n assertEquals(2, dataset.getVolumeCount());\n\n String mount = new DF(new File(archive.getUri()), conf).getMount();\n double archiveRatio = dataset.getMountVolumeMap()\n .getCapacityRatioByMountAndStorageType(mount, StorageType.ARCHIVE);\n double diskRatio = dataset.getMountVolumeMap()\n .getCapacityRatioByMountAndStorageType(mount, StorageType.DISK);\n assertEquals(0.4, archiveRatio, 0);\n assertEquals(0.6, diskRatio, 0);\n\n // Add second ARCHIVAL volume should fail fsDataSetImpl.\n try {\n dataset.addVolume(\n createStorageWithStorageType(\"archive2\",\n StorageType.ARCHIVE, conf, storage, datanode), nsInfos);\n fail(\"Should throw exception for\" +\n \" same storage type already exists on same mount.\");\n } catch (IOException e) {\n assertTrue(e.getMessage()\n .startsWith(\"Storage type ARCHIVE already exists on same mount:\"));\n }\n }",
"private void updateBlockBuffer() {\n for (Block b : blockBuffer) {\n if (++b.ttl > BLOCK_CACHE_THRESH) {\n blockBuffer.remove(b);\n }\n }\n\n prevBlockBufferSize = blockBuffer.size();\n }",
"@Test(timeout = 30000)\n public void testRemoveTwoVolumes() throws IOException {\n final int numBlocks = 100;\n for (int i = 0; i < numBlocks; i++) {\n String bpid = BLOCK_POOL_IDS[numBlocks % BLOCK_POOL_IDS.length];\n ExtendedBlock eb = new ExtendedBlock(bpid, i);\n ReplicaHandler replica = null;\n try {\n replica = dataset.createRbw(StorageType.DEFAULT, null, eb,\n false);\n } finally {\n if (replica != null) {\n replica.close();\n }\n }\n }\n\n // Remove two volumes\n final String[] dataDirs =\n conf.get(DFSConfigKeys.DFS_DATANODE_DATA_DIR_KEY).split(\",\");\n Set<StorageLocation> volumesToRemove = new HashSet<>();\n volumesToRemove.add(StorageLocation.parse(dataDirs[0]));\n volumesToRemove.add(StorageLocation.parse(dataDirs[1]));\n\n FsVolumeReferences volReferences = dataset.getFsVolumeReferences();\n Set<FsVolumeImpl> volumes = new HashSet<>();\n for (FsVolumeSpi vol: volReferences) {\n for (StorageLocation volume : volumesToRemove) {\n if (vol.getStorageLocation().equals(volume)) {\n volumes.add((FsVolumeImpl) vol);\n }\n }\n }\n assertEquals(2, volumes.size());\n volReferences.close();\n\n dataset.removeVolumes(volumesToRemove, true);\n int expectedNumVolumes = dataDirs.length - 2;\n assertEquals(\"The volume has been removed from the volumeList.\",\n expectedNumVolumes, getNumVolumes());\n assertEquals(\"The volume has been removed from the storageMap.\",\n expectedNumVolumes, dataset.storageMap.size());\n\n // DataNode.notifyNamenodeDeletedBlock() should be called 100 times\n // as we deleted 2 volumes that have 100 blocks totally\n verify(datanode, times(100))\n .notifyNamenodeDeletedBlock(any(), any());\n\n for (FsVolumeImpl volume : volumes) {\n try {\n dataset.asyncDiskService.execute(volume,\n new Runnable() {\n @Override\n public void run() {}\n });\n fail(\"Expect RuntimeException: the volume has been removed from the \"\n + \"AsyncDiskService.\");\n } catch (RuntimeException e) {\n GenericTestUtils.assertExceptionContains(\"Cannot find volume\", e);\n }\n }\n\n int totalNumReplicas = 0;\n for (String bpid : dataset.volumeMap.getBlockPoolList()) {\n totalNumReplicas += dataset.volumeMap.size(bpid);\n }\n assertEquals(\"The replica infos on this volume has been removed from the \"\n + \"volumeMap.\", 0, totalNumReplicas);\n }",
"public static native void link(String oldpath, String newpath) throws IOException;",
"public ByteBuf ensureWritable(int minWritableBytes)\r\n/* 119: */ {\r\n/* 120:136 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 121:137 */ return super.ensureWritable(minWritableBytes);\r\n/* 122: */ }",
"@Test\n public void testInsertIntoDFSDirPartitioned() throws Exception {\n String tableName = createTable(true);\n String pFile1 = createTestDFSPath(\"somedfspath1\");\n String query = \"insert overwrite DIRECTORY '\" + pFile1 + \"' select id, name from \" + tableName + \" where dt = '\" + PART_FILE + \"'\";\n\n runCommand(query);\n\n Set<ReadEntity> inputs = getInputs(tableName, Entity.Type.TABLE);\n Set<WriteEntity> outputs = getOutputs(pFile1, Entity.Type.DFS_DIR);\n\n outputs.iterator().next().setWriteType(WriteEntity.WriteType.PATH_WRITE);\n\n Set<ReadEntity> partitionIps = new LinkedHashSet<>(inputs);\n\n partitionIps.addAll(getInputs(DEFAULT_DB + \"@\" + tableName + \"@dt='\" + PART_FILE + \"'\", Entity.Type.PARTITION));\n\n AtlasEntity processEntity = validateProcess(constructEvent(query, HiveOperation.QUERY, partitionIps, outputs), inputs, outputs);\n\n //Rerun same query with different HDFS path. Should not create another process and should update it.\n\n String pFile2 = createTestDFSPath(\"somedfspath2\");\n query = \"insert overwrite DIRECTORY '\" + pFile2 + \"' select id, name from \" + tableName + \" where dt = '\" + PART_FILE + \"'\";\n\n runCommand(query);\n\n Set<WriteEntity> pFile2Outputs = getOutputs(pFile2, Entity.Type.DFS_DIR);\n\n pFile2Outputs.iterator().next().setWriteType(WriteEntity.WriteType.PATH_WRITE);\n\n //Now the process has 2 paths - one older with deleted reference to partition and another with the the latest partition\n Set<WriteEntity> p2Outputs = new LinkedHashSet<WriteEntity>() {{\n addAll(pFile2Outputs);\n addAll(outputs);\n }};\n\n AtlasEntity process2Entity = validateProcess(constructEvent(query, HiveOperation.QUERY, partitionIps, pFile2Outputs), inputs, p2Outputs);\n\n validateHDFSPaths(process2Entity, OUTPUTS, pFile2);\n\n Assert.assertEquals(process2Entity.getGuid(), processEntity.getGuid());\n }",
"@Test (timeout=180000)\n public void testFixHdfsHolesNotWorkingWithNoHdfsChecking() throws Exception {\n TableName table =\n TableName.valueOf(\"testFixHdfsHolesNotWorkingWithNoHdfsChecking\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by creating an overlap in the metadata\n admin.disableTable(table);\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"A\"),\n Bytes.toBytes(\"B\"), true, true, false, true, HRegionInfo.DEFAULT_REPLICA_ID);\n TEST_UTIL.getHBaseAdmin().enableTable(table);\n\n HRegionInfo hriOverlap =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A2\"), Bytes.toBytes(\"B\"));\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriOverlap);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriOverlap);\n ServerName server = regionStates.getRegionServerOfRegion(hriOverlap);\n TEST_UTIL.assertRegionOnServer(hriOverlap, server, REGION_ONLINE_TIMEOUT);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.ORPHAN_HDFS_REGION, ERROR_CODE.NOT_IN_META_OR_DEPLOYED,\n ERROR_CODE.HOLE_IN_REGION_CHAIN});\n\n // verify that noHdfsChecking can't detect ORPHAN_HDFS_REGION\n HBaseFsck fsck = new HBaseFsck(conf, hbfsckExecutorService);\n fsck.connect();\n fsck.setDisplayFullReport(); // i.e. -details\n fsck.setTimeLag(0);\n fsck.setCheckHdfs(false);\n fsck.onlineHbck();\n assertErrors(fsck, new ERROR_CODE[] {\n ERROR_CODE.HOLE_IN_REGION_CHAIN});\n fsck.close();\n\n // verify that fixHdfsHoles doesn't work with noHdfsChecking\n fsck = new HBaseFsck(conf, hbfsckExecutorService);\n fsck.connect();\n fsck.setDisplayFullReport(); // i.e. -details\n fsck.setTimeLag(0);\n fsck.setCheckHdfs(false);\n fsck.setFixHdfsHoles(true);\n fsck.setFixHdfsOverlaps(true);\n fsck.setFixHdfsOrphans(true);\n fsck.onlineHbck();\n assertFalse(fsck.shouldRerun());\n assertErrors(fsck, new ERROR_CODE[] { ERROR_CODE.HOLE_IN_REGION_CHAIN});\n fsck.close();\n } finally {\n if (admin.isTableDisabled(table)) {\n admin.enableTable(table);\n }\n cleanupTable(table);\n }\n }",
"public void truncateBPLinksAnalysis() {\n\t\t\n\t\ttry {\n\t\t\n\t\t\tpreparedStatement = connect_eor_global_nagiosbp.prepareStatement(\"TRUNCATE TABLE bp_links_analysis ;\");\n\t\t\tpreparedStatement.executeUpdate();\n\t\t\n\t\t\tthis.preparedStatement.close();\n\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void cleanupOldBlocks (long threshTime) ;",
"public void free(Block b) {\n if(b.length <= 0) return;\n\n if (b.start + b.length > limit) limit = b.start + b.length; // grows with free\n\n // query adjacent blocks\n Block prev = freeSpace.floor(b);\n Block next = freeSpace.higher(b);\n\n if (prev != null && prev.start + prev.length > b.start) {\n throw new RuntimeException(\"Corrupted. DEBUG PRV \" + prev.start + \"+\" + prev.length + \">\" + b.start);\n }\n if (next != null && next.start < b.start + b.length) {\n throw new RuntimeException(\"Corrupted. DEBUG NEX \" + next.start + \"<\" + b.start + \"+\" + b.length);\n }\n\n // merge them if possible\n \n Block n = Block.mergeBlocks(b, prev);\n if(n != null) { freeSpace.remove(prev); b = n; }\n\n n = Block.mergeBlocks(b, next);\n if(n != null) { freeSpace.remove(next); b = n; }\n\n freeSpace.add(b);\n }",
"private void createSrcAndWorkFilesWithDifferentChecksum(FileSystem fs,\n String targetBase,\n String sourceBase,\n String filename,\n int blocksPerChunk)\n throws IOException {\n\n long srcSeed = System.currentTimeMillis();\n long dstSeed = srcSeed + rand.nextLong();\n int bufferLen = 128;\n short replFactor = 2;\n Path srcData = new Path(sourceBase + filename);\n\n // create data with 2 chunks: the 2nd chunk has half of the block size\n long firstChunkLength = BLOCK_SIZE * blocksPerChunk;\n long secondChunkLength = BLOCK_SIZE / 2;\n\n DFSTestUtil.createFile(fs, srcData,\n bufferLen, firstChunkLength, BLOCK_SIZE, replFactor,\n srcSeed);\n DFSTestUtil.appendFileNewBlock((DistributedFileSystem) fs, srcData,\n (int) secondChunkLength);\n\n DFSTestUtil.createFile(fs, new Path(targetBase\n + filename + \".____distcpSplit____0.\"\n + firstChunkLength), bufferLen,\n firstChunkLength, BLOCK_SIZE, replFactor, dstSeed);\n DFSTestUtil.createFile(fs, new Path(targetBase\n + filename + \".____distcpSplit____\"\n + firstChunkLength + \".\" + secondChunkLength), bufferLen,\n secondChunkLength, BLOCK_SIZE, replFactor, dstSeed);\n }",
"private void populateNewChildDirectory(DirectoryEntry newEntry) {\n try (ClusterStream stream = new ClusterStream(fileSystem,\n FileAccess.Write,\n newEntry.getFirstCluster(),\n 0xffffffff)) {\n // First is the self-referencing entry...\n DirectoryEntry selfEntry = new DirectoryEntry(newEntry);\n selfEntry.setName(FileName.SelfEntryName);\n selfEntry.writeTo(stream);\n // Second is a clone of our self entry (i.e. parent) - though dates\n // are odd...\n DirectoryEntry parentEntry = new DirectoryEntry(getSelfEntry());\n parentEntry.setName(FileName.ParentEntryName);\n parentEntry.setCreationTime(newEntry.getCreationTime());\n parentEntry.setLastWriteTime(newEntry.getLastWriteTime());\n parentEntry.writeTo(stream);\n } catch (IOException e) {\n throw new dotnet4j.io.IOException(e);\n }\n }",
"public static void m6739b(File file) {\n if (file.listFiles() != null && file.listFiles().length > 1) {\n long c = m6740c(file, false);\n for (File file2 : file.listFiles()) {\n if (!file2.getName().equals(String.valueOf(c)) && !file2.getName().equals(\"stale.tmp\")) {\n m6741h(file2);\n }\n }\n }\n }",
"public void repairChain() {\n for (int i = 1; i < blockChain.size(); i++) {\n Block previousBlock = blockChain.get(i - 1);\n Block currentBlock = blockChain.get(i);\n String previousProofOfWork = previousBlock.proofOfWork();\n String hashTarget = new String(new char[previousBlock.getDifficulty()]).replace('\\0', '0');\n if (!previousProofOfWork.substring(0, previousBlock.getDifficulty()).equals(hashTarget) || !previousBlock.proofOfWork().equals(currentBlock.getPreviousHash())) {\n previousBlock.setDifficulty(previousBlock.getDifficulty());\n currentBlock.setPreviousHash(previousBlock.proofOfWork());\n previousBlock.proofOfWork();\n }\n }\n chainHash = getLatestBlock().proofOfWork();\n }",
"@Test (timeout=180000)\n public void testNotInHdfs() throws Exception {\n TableName table =\n TableName.valueOf(\"tableNotInHdfs\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // make sure data in regions, if in wal only there is no data loss\n admin.flush(table);\n\n // Mess it up by leaving a hole in the hdfs data\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"B\"),\n Bytes.toBytes(\"C\"), false, false, true); // don't rm meta\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {ERROR_CODE.NOT_IN_HDFS});\n // holes are separate from overlap groups\n assertEquals(0, hbck.getOverlapGroups(table).size());\n\n // fix hole\n doFsck(conf, true);\n\n // check that hole fixed\n assertNoErrors(doFsck(conf,false));\n assertEquals(ROWKEYS.length - 2, countRows());\n } finally {\n cleanupTable(table);\n }\n }",
"@Test (timeout=180000)\n public void testFixMetaNotWorkingWithNoHdfsChecking() throws Exception {\n TableName table =\n TableName.valueOf(\"testFixMetaNotWorkingWithNoHdfsChecking\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by deleting a region from the metadata\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"A\"),\n Bytes.toBytes(\"B\"), false, true, false, false, HRegionInfo.DEFAULT_REPLICA_ID);\n\n // verify there is no other errors\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck,\n new ERROR_CODE[] { ERROR_CODE.NOT_IN_META, ERROR_CODE.HOLE_IN_REGION_CHAIN });\n\n // verify that noHdfsChecking report the same errors\n HBaseFsck fsck = new HBaseFsck(conf, hbfsckExecutorService);\n fsck.connect();\n fsck.setDisplayFullReport(); // i.e. -details\n fsck.setTimeLag(0);\n fsck.setCheckHdfs(false);\n fsck.onlineHbck();\n assertErrors(fsck,\n new ERROR_CODE[] { ERROR_CODE.NOT_IN_META, ERROR_CODE.HOLE_IN_REGION_CHAIN });\n fsck.close();\n\n // verify that fixMeta doesn't work with noHdfsChecking\n fsck = new HBaseFsck(conf, hbfsckExecutorService);\n fsck.connect();\n fsck.setDisplayFullReport(); // i.e. -details\n fsck.setTimeLag(0);\n fsck.setCheckHdfs(false);\n fsck.setFixAssignments(true);\n fsck.setFixMeta(true);\n fsck.onlineHbck();\n assertFalse(fsck.shouldRerun());\n assertErrors(fsck,\n new ERROR_CODE[] { ERROR_CODE.NOT_IN_META, ERROR_CODE.HOLE_IN_REGION_CHAIN });\n fsck.close();\n\n // fix the cluster so other tests won't be impacted\n fsck = doFsck(conf, true);\n assertTrue(fsck.shouldRerun());\n fsck = doFsck(conf, true);\n assertNoErrors(fsck);\n } finally {\n cleanupTable(table);\n }\n }",
"@Test(timeout = 30000)\n public void testRemoveOneVolume() throws IOException {\n final int numBlocks = 100;\n for (int i = 0; i < numBlocks; i++) {\n String bpid = BLOCK_POOL_IDS[numBlocks % BLOCK_POOL_IDS.length];\n ExtendedBlock eb = new ExtendedBlock(bpid, i);\n ReplicaHandler replica = null;\n try {\n replica = dataset.createRbw(StorageType.DEFAULT, null, eb,\n false);\n } finally {\n if (replica != null) {\n replica.close();\n }\n }\n }\n\n // Remove one volume\n final String[] dataDirs =\n conf.get(DFSConfigKeys.DFS_DATANODE_DATA_DIR_KEY).split(\",\");\n final String volumePathToRemove = dataDirs[0];\n Set<StorageLocation> volumesToRemove = new HashSet<>();\n volumesToRemove.add(StorageLocation.parse(volumePathToRemove));\n\n FsVolumeReferences volReferences = dataset.getFsVolumeReferences();\n FsVolumeImpl volumeToRemove = null;\n for (FsVolumeSpi vol: volReferences) {\n if (vol.getStorageLocation().equals(volumesToRemove.iterator().next())) {\n volumeToRemove = (FsVolumeImpl) vol;\n }\n }\n assertTrue(volumeToRemove != null);\n volReferences.close();\n dataset.removeVolumes(volumesToRemove, true);\n int expectedNumVolumes = dataDirs.length - 1;\n assertEquals(\"The volume has been removed from the volumeList.\",\n expectedNumVolumes, getNumVolumes());\n assertEquals(\"The volume has been removed from the storageMap.\",\n expectedNumVolumes, dataset.storageMap.size());\n\n // DataNode.notifyNamenodeDeletedBlock() should be called 50 times\n // as we deleted one volume that has 50 blocks\n verify(datanode, times(50))\n .notifyNamenodeDeletedBlock(any(), any());\n\n try {\n dataset.asyncDiskService.execute(volumeToRemove,\n new Runnable() {\n @Override\n public void run() {}\n });\n fail(\"Expect RuntimeException: the volume has been removed from the \"\n + \"AsyncDiskService.\");\n } catch (RuntimeException e) {\n GenericTestUtils.assertExceptionContains(\"Cannot find volume\", e);\n }\n\n int totalNumReplicas = 0;\n for (String bpid : dataset.volumeMap.getBlockPoolList()) {\n totalNumReplicas += dataset.volumeMap.size(bpid);\n }\n assertEquals(\"The replica infos on this volume has been removed from the \"\n + \"volumeMap.\", numBlocks / NUM_INIT_VOLUMES,\n totalNumReplicas);\n }",
"@Test (timeout=180000)\n public void testValidLingeringSplitParent() throws Exception {\n TableName table =\n TableName.valueOf(\"testLingeringSplitParent\");\n Table meta = null;\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // make sure data in regions, if in wal only there is no data loss\n admin.flush(table);\n HRegionLocation location = tbl.getRegionLocation(Bytes.toBytes(\"B\"));\n\n meta = connection.getTable(TableName.META_TABLE_NAME, tableExecutorService);\n HRegionInfo hri = location.getRegionInfo();\n\n // do a regular split\n byte[] regionName = location.getRegionInfo().getRegionName();\n admin.splitRegion(location.getRegionInfo().getRegionName(), Bytes.toBytes(\"BM\"));\n TestEndToEndSplitTransaction.blockUntilRegionSplit(conf, 60000, regionName, true);\n\n // TODO: fixHdfsHoles does not work against splits, since the parent dir lingers on\n // for some time until children references are deleted. HBCK erroneously sees this as\n // overlapping regions\n HBaseFsck hbck = doFsck(\n conf, true, true, false, false, false, true, true, true, false, false, false, null);\n assertErrors(hbck, new ERROR_CODE[] {}); //no LINGERING_SPLIT_PARENT reported\n\n // assert that the split hbase:meta entry is still there.\n Get get = new Get(hri.getRegionName());\n Result result = meta.get(get);\n assertNotNull(result);\n assertNotNull(MetaTableAccessor.getHRegionInfo(result));\n\n assertEquals(ROWKEYS.length, countRows());\n\n // assert that we still have the split regions\n assertEquals(tbl.getStartKeys().length, SPLITS.length + 1 + 1); //SPLITS + 1 is # regions pre-split.\n assertNoErrors(doFsck(conf, false));\n } finally {\n cleanupTable(table);\n IOUtils.closeQuietly(meta);\n }\n }",
"private void fixFaultyLinkTargets()\r\n \t{\r\n \t\tSimpleLogger.verbose(\" Checking for faulty TOC link targets...\");\r\n \r\n \t\tSimpleLogger.verbose(\" Book title = \" + pageTitle);\r\n \r\n \t\t// Exclude the 3 know exceptions and immediately return if one is found\r\n \t\tif (pageTitle.matches(\".*(ActionScript 1 und 2|Microsoft-Netzwerk|Shell-Programmierung).*\")) {\r\n \t\t\tSimpleLogger.verbose(\" Book title is an exception - no link fixing done\");\r\n \t\t\treturn;\r\n \t\t}\r\n \r\n \t\tint fixedLinksCount = 0;\r\n \t\tNodes links = xPathQuery(XPath.ALL_LINKS.query);\r\n \t\tfor (int i = 0; i < links.size(); i++) {\r\n \t\t\tElement link = (Element) links.get(i);\r\n \t\t\tString href = link.getAttributeValue(\"href\");\r\n \t\t\tString text = link.getValue();\r\n \t\t\tMatcher hrefMatcher = REGEX_HREF.matcher(href);\r\n \t\t\tMatcher textMatcher = REGEX_TEXT.matcher(text);\r\n \t\t\tif (hrefMatcher.matches() && textMatcher.matches()) {\r\n \t\t\t\tint hrefNumber = Integer.parseInt(hrefMatcher.group(2));\r\n \t\t\t\tint textNumber = Integer.parseInt(textMatcher.group(2));\r\n \t\t\t\tif (hrefNumber != textNumber) {\r\n \t\t\t\t\tSimpleLogger.debug(\" Chapter \" + text);\r\n \t\t\t\t\tSimpleLogger.debug(\" Faulty: \" + href);\r\n \t\t\t\t\tString numberFormat = \"%0\" + hrefMatcher.group(2).length() + \"d\";\r\n \t\t\t\t\thref=hrefMatcher.group(1) + String.format(numberFormat, textNumber) + hrefMatcher.group(3);\r\n \t\t\t\t\tSimpleLogger.debug(\" Fixed: \" + href);\r\n \t\t\t\t\tlink.getAttribute(\"href\").setValue(href);\r\n \t\t\t\t\tfixedLinksCount++;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\tSimpleLogger.verbose(\" Number of fixed links = \" + fixedLinksCount);\r\n \t}",
"public ErrorType writeData(String fileName, int bytes, String data) {\n\t\tDirDetailsForWrite dirDetailsForWrite = fileWithDirListingEntry(fileName, getRootDirectory(), 0); \n\t\tString s= null;\n\t\tint lastBlockBytesUsed=0;\n\t\tint indexOfFile = dirDetailsForWrite.getDirEntryDetails().getLink();\n\t\tData tempDataBlock = (((Data)sector.get(indexOfFile)));\n\t\tif(dirDetailsForWrite != null) {\n\t\t\ts= tempDataBlock.writeUserData(bytes, data);\n\t\t}\n\t\t\n\t\twhile(true) {\n\t\t\tif(s!=null && (!Constants.SUCCESS.equals(s))) {\n\t\t\t\tint slashIndex = s != null ? s.indexOf(\"_\") : Constants.NEGATIVE;\n\t\t\t\tString first = null;\n\t\t\t\tString remBytes = null;\n\t\t\t\tString remData = null;\n\t\t\t\t\n\t\t\t\tif(Constants.NEGATIVE != slashIndex) {\n\t\t\t\t\tSystem.out.println(\"s = \"+s + \" Slash index : \"+ slashIndex);\n\t\t\t\t\tfirst = s.substring(0, slashIndex+1);\n\t\t\t\t\tremBytes = s.substring(slashIndex+1);\n\t\t\t\t} else {\n\t\t\t\t\tfirst = s;\n\t\t\t\t\tremBytes = null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(first != null && !Constants.REMAINING_STRING.equals(first)) {\n\t\t\t\t\tlastBlockBytesUsed = Integer.parseInt(first);\n\t\t\t\t\tbreak; // break out of the loop as number of bytes mentioned is wrote already\n\t\t\t\t} else if(Constants.REMAINING_STRING.equals(first)) {\n\t\t\t\t\tslashIndex = remBytes != null ? remBytes.indexOf(\"_\") : Constants.NEGATIVE;\n\t\t\t\t\tif(Constants.NEGATIVE != slashIndex) {\n\t\t\t\t\t\tremData = remBytes.substring(slashIndex+1);\n\t\t\t\t\t\tremBytes = remBytes.substring(0, slashIndex);\n\t\t\t\t\t\t\n\t\t\t\t\t\tint freeBlock = freeBlock();\n\t\t\t\t\t\tif(freeBlock != Constants.NEGATIVE) {\n\t\t\t\t\t\t\tsector.put(freeBlock, new Data());\n\t\t\t\t\t\t\ttempDataBlock.setFrwd(freeBlock);\n\t\t\t\t\t\t\t((Data)sector.get(freeBlock)).setBack(indexOfFile);\n\t\t\t\t\t\t\ts = ((Data)sector.get(freeBlock)).writeUserData(remBytes!=null?Integer.parseInt(remBytes):0, remData);\n\t\t\t\t\t\t\t//Setting tempDataBlock with the new Data object that is created now. This will be handy even we run out of new user block and we need another user block...\n\t\t\t\t\t\t\ttempDataBlock = ((Data)sector.get(freeBlock));\n\t\t\t\t\t\t\tindexOfFile = freeBlock;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn ErrorType.SECTOR_FULL;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tDirEntryDetails dirEntryTemp = dirDetailsForWrite.getDirEntryDetails();\n\t\t//TODO: Update correct Free bytes value\n\t\t((Directory)sector.get(dirDetailsForWrite.getRootIndex())).setDirWithGivenSize(dirEntryTemp.getDirEntryIndex(), lastBlockBytesUsed);\n\t\treturn ErrorType.SUCCESS;\n\t}",
"private void recover() throws IOException, NumberFormatException,\n\t\t\tNotBoundException {\n\t\tFileReader fileReader = new FileReader(registryBackup);\n\n\t\t// Always wrap FileReader in BufferedReader.\n\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\t\tString line = null;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\tlist.add(line);\t\n\t\t}\n\t\t// Always close files.\n\t\tbufferedReader.close();\n\n\t\tPrintWriter writer = new PrintWriter(registryBackup);\n\t\twriter.print(\"\");\n\t\twriter.close();\n\t\t\n\t\tfor(String conInfo : list){\n\t\tString[] split = conInfo.split(\" \");\n\t\ttry {\n\t\t\tthis.addReplica(split[0], Integer.parseInt(split[1]));\n\t\t} catch (Exception ex) {\n\t\t\tprint(ex.getMessage());\n\t\t}\n\t\t}\n\t}",
"@Test\n public void testCleanShutdownOfVolume() throws Exception {\n MiniDFSCluster cluster = null;\n try {\n Configuration config = new HdfsConfiguration();\n config.setLong(\n DFSConfigKeys.DFS_DATANODE_XCEIVER_STOP_TIMEOUT_MILLIS_KEY, 1000);\n config.setTimeDuration(\n DFSConfigKeys.DFS_DATANODE_DISK_CHECK_MIN_GAP_KEY, 0,\n TimeUnit.MILLISECONDS);\n config.setInt(DFSConfigKeys.DFS_DATANODE_FAILED_VOLUMES_TOLERATED_KEY, 1);\n\n cluster = new MiniDFSCluster.Builder(config,\n GenericTestUtils.getRandomizedTestDir()).numDataNodes(1).build();\n cluster.waitActive();\n FileSystem fs = cluster.getFileSystem();\n DataNode dataNode = cluster.getDataNodes().get(0);\n Path filePath = new Path(\"test.dat\");\n // Create a file and keep the output stream unclosed.\n FSDataOutputStream out = fs.create(filePath, (short) 1);\n out.write(1);\n out.hflush();\n\n ExtendedBlock block = DFSTestUtil.getFirstBlock(fs, filePath);\n final FsVolumeImpl volume = (FsVolumeImpl) dataNode.getFSDataset().\n getVolume(block);\n File finalizedDir = volume.getFinalizedDir(cluster.getNamesystem()\n .getBlockPoolId());\n LocatedBlock lb = DFSTestUtil.getAllBlocks(fs, filePath).get(0);\n DatanodeInfo info = lb.getLocations()[0];\n\n if (finalizedDir.exists()) {\n // Remove write and execute access so that checkDiskErrorThread detects\n // this volume is bad.\n finalizedDir.setExecutable(false);\n assertTrue(FileUtil.setWritable(finalizedDir, false));\n }\n Assert.assertTrue(\"Reference count for the volume should be greater \"\n + \"than 0\", volume.getReferenceCount() > 0);\n // Invoke the synchronous checkDiskError method\n dataNode.checkDiskError();\n // Sleep for 1 second so that datanode can interrupt and cluster clean up\n GenericTestUtils.waitFor(new Supplier<Boolean>() {\n @Override public Boolean get() {\n return volume.getReferenceCount() == 0;\n }\n }, 100, 1000);\n assertThat(dataNode.getFSDataset().getNumFailedVolumes(), is(1));\n\n try {\n out.close();\n Assert.fail(\"This is not a valid code path. \"\n + \"out.close should have thrown an exception.\");\n } catch (IOException ioe) {\n GenericTestUtils.assertExceptionContains(info.getXferAddr(), ioe);\n }\n assertTrue(FileUtil.setWritable(finalizedDir, true));\n finalizedDir.setExecutable(true);\n } finally {\n cluster.shutdown();\n }\n }",
"public void testAddReplicaWhileWritesBlocked() throws Exception {\n final String primaryNode = internalCluster().startNode();\n createIndex(INDEX_NAME);\n ensureYellowAndNoInitializingShards(INDEX_NAME);\n final String replicaNode = internalCluster().startNode();\n ensureGreen(INDEX_NAME);\n\n final IndexShard primaryShard = getIndexShard(primaryNode, INDEX_NAME);\n final List<String> replicaNodes = new ArrayList<>();\n replicaNodes.add(replicaNode);\n assertEqualSegmentInfosVersion(replicaNodes, primaryShard);\n\n final CountDownLatch latch = new CountDownLatch(1);\n final AtomicInteger totalDocs = new AtomicInteger(0);\n try (final Releasable ignored = blockReplication(replicaNodes, latch)) {\n Thread indexingThread = new Thread(() -> { totalDocs.getAndSet(indexUntilCheckpointCount()); });\n indexingThread.start();\n indexingThread.join();\n latch.await();\n indexDoc();\n totalDocs.incrementAndGet();\n refresh(INDEX_NAME);\n // index again while we are stale.\n assertBusy(() -> {\n expectThrows(OpenSearchRejectedExecutionException.class, () -> {\n indexDoc();\n totalDocs.incrementAndGet();\n });\n });\n final String replica_2 = internalCluster().startNode();\n assertAcked(\n client().admin()\n .indices()\n .prepareUpdateSettings(INDEX_NAME)\n .setSettings(Settings.builder().put(SETTING_NUMBER_OF_REPLICAS, 2))\n );\n replicaNodes.add(replica_2);\n }\n ensureGreen(INDEX_NAME);\n waitForSearchableDocs(totalDocs.get(), replicaNodes);\n refresh(INDEX_NAME);\n // wait for the replicas to catch up after block is released.\n assertReplicaCheckpointUpdated(primaryShard);\n\n // index another doc showing there is no pressure enforced.\n indexDoc();\n refresh(INDEX_NAME);\n waitForSearchableDocs(totalDocs.incrementAndGet(), replicaNodes.toArray(new String[] {}));\n verifyStoreContent();\n }",
"public boolean open(){\n\n\n\t\tint tuplesize=schema.getTupleSize();\n\t\tbatchsize=Batch.getPageSize()/tuplesize;\n\t\tint righttuplesize = right.schema.getTupleSize();\n\t\trightbatchsize = Batch.getPageSize()/righttuplesize;\n\t\tint lefttuplesize = left.schema.getTupleSize();\n\t\tleftbatchsize = Batch.getPageSize()/lefttuplesize;\n\n\t\tBatch[] partbuckets = new Batch[numBuff - 1]; //num of partitions = B-1\n\n\t\tAttribute leftattr = con.getLhs();\n\t\tAttribute rightattr =(Attribute) con.getRhs();\n\t\tleftindex = left.getSchema().indexOf(leftattr);\n\t\trightindex = right.getSchema().indexOf(rightattr);\n\t\tlcurs = 0; rcurs =0;\n\t\tpartition_no = -1;\n\t\teosl=true;\n\t\teosr=true;\n\t\thjfin = false;\n\n\t\tSystem.out.println(\"Initiating hash join: Partition phase\");\n\n\t\t//left partition\n\t\tif (!left.open()) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\t//initialise buckets for partitioning\n\t\t\tfor (int i = 0; i < partbuckets.length; i++) {\n\t\t\t\tpartbuckets[i] = new Batch(leftbatchsize);\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tObjectOutputStream[] leftoutput = new ObjectOutputStream[numBuff - 1];\n\t\t\t\tfor(int i = 0; i<numBuff-1;i++){\n\t\t\t\t\t//identify partitions by the bucket number i\n\t\t\t\t\t//hashcode is taken to differentiate files when there are multiple joins\n\t\t\t\t\tString fname = \"HJLeft\" + i + this.hashCode();\n\t\t\t\t\tleftoutput[i] = new ObjectOutputStream(new FileOutputStream(fname));\n\t\t\t\t}\n\t\t\t\twhile ((leftpart = left.next()) != null) {\n\t\t\t\t\tfor (int i = 0; i < leftpart.size(); i++) {\n\t\t\t\t\t\tTuple temp = leftpart.elementAt(i);\n\t\t\t\t\t\tint key = temp.dataAt(leftindex).hashCode();\n\t\t\t\t\t\t//hash function key % numbuckets\n\t\t\t\t\t\tint bucketnum = key % (partbuckets.length);\n\n\t\t\t\t\t\t//if bucket is full, write out to disk, initialise new bucket to continue\n\t\t\t\t\t\tif (partbuckets[bucketnum].isFull()) {\n\t\t\t\t\t\t\tleftoutput[bucketnum].writeObject(partbuckets[bucketnum]);\n\t\t\t\t\t\t\tpartbuckets[bucketnum] = new Batch(leftbatchsize);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpartbuckets[bucketnum].add(temp);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor(int i = 0; i < numBuff - 1;i++){\n\t\t\t\t\tif(!partbuckets[i].isEmpty()){\n\t\t\t\t\t\tleftoutput[i].writeObject(partbuckets[i]); //at the end, write the rest into file\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//close output stream\n\t\t\t\tfor(int i = 0; i < numBuff -1 ;i++){\n\t\t\t\t\tleftoutput[i].close();\n\t\t\t\t}\n\n\t\t\t}catch(IOException io){\n\t\t\t\tSystem.out.println(\"HashJoin: Partition left error\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(!left.close()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t//right partition, same as left\n\t\tif (!right.open()) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\t//initialise buckets for partition\n\t\t\tfor (int i = 0; i < partbuckets.length; i++) {\n\t\t\t\tpartbuckets[i] = new Batch(rightbatchsize);\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tObjectOutputStream[] rightoutput = new ObjectOutputStream[numBuff - 1];\n\t\t\t\tfor(int i = 0; i < numBuff - 1; i++){\n\t\t\t\t\tString fname = \"HJRight\" + i + this.hashCode();\n\t\t\t\t\trightoutput[i] = new ObjectOutputStream(new FileOutputStream(fname));\n\t\t\t\t}\n\t\t\t\twhile ((rightpart = right.next()) != null) {\n\t\t\t\t\tfor (int i = 0; i < rightpart.size(); i++) {\n\t\t\t\t\t\tTuple temp = rightpart.elementAt(i);\n\t\t\t\t\t\tint key = temp.dataAt(rightindex).hashCode();\n\t\t\t\t\t\tint bucketnum = key % (partbuckets.length);\n\n\t\t\t\t\t\t//if bucket is full, write out to disk\n\t\t\t\t\t\tif (partbuckets[bucketnum].isFull()) {\n\t\t\t\t\t\t\trightoutput[bucketnum].writeObject(partbuckets[bucketnum]);\n\t\t\t\t\t\t\tpartbuckets[bucketnum] = new Batch(rightbatchsize);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpartbuckets[bucketnum].add(temp);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor(int i = 0; i < numBuff - 1;i++){\n\t\t\t\t\tif(!partbuckets[i].isEmpty()){\n\t\t\t\t\t\trightoutput[i].writeObject(partbuckets[i]); //write the rest into file\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//close output stream\n\t\t\t\tfor(int i = 0; i < numBuff -1 ;i++){\n\t\t\t\t\trightoutput[i].close();\n\t\t\t\t}\n\n\t\t\t}catch(IOException io){\n\t\t\t\tSystem.out.println(\"HashJoin: Partition right error\" );\n\t\t\t\tio.printStackTrace();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn right.close();\n\t\t}\n\n\n\t}",
"public int ensureWritable(int minWritableBytes, boolean force)\r\n/* 125: */ {\r\n/* 126:142 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 127:143 */ return super.ensureWritable(minWritableBytes, force);\r\n/* 128: */ }",
"protected void rehash() {\n int oldCapacity = table.length;\n Entry oldMap[] = table;\n\n int newCapacity = oldCapacity * 2 + 1;\n Entry newMap[] = new Entry[newCapacity];\n\n threshold = (int) (newCapacity * loadFactor);\n table = newMap;\n\n for (int i = oldCapacity; i-- > 0; ) {\n for (Entry old = oldMap[i]; old != null; ) {\n Entry e = old;\n old = old.next;\n\n int index = (e.key & 0x7FFFFFFF) % newCapacity;\n e.next = newMap[index];\n newMap[index] = e;\n }\n }\n }",
"@Test\n public void testStorageTypeStatsWhenStorageFailed() throws Exception {\n assumeNotWindows();\n\n DFSTestUtil.createFile(cluster.getFileSystem(),\n new Path(\"/blockStatsFile1\"), 1024, (short) 1, 0L);\n Map<StorageType, StorageTypeStats> storageTypeStatsMap = cluster\n .getNamesystem().getBlockManager().getStorageTypeStats();\n\n StorageTypeStats storageTypeStats = storageTypeStatsMap\n .get(StorageType.RAM_DISK);\n assertEquals(7, storageTypeStats.getNodesInService());\n\n storageTypeStats = storageTypeStatsMap.get(StorageType.DISK);\n assertEquals(3, storageTypeStats.getNodesInService());\n\n storageTypeStats = storageTypeStatsMap.get(StorageType.ARCHIVE);\n assertEquals(3, storageTypeStats.getNodesInService());\n\n storageTypeStats = storageTypeStatsMap.get(StorageType.NVDIMM);\n assertEquals(1, storageTypeStats.getNodesInService());\n File dn1ArcVol1 = cluster.getInstanceStorageDir(0, 1);\n File dn2ArcVol1 = cluster.getInstanceStorageDir(1, 1);\n File dn3ArcVol1 = cluster.getInstanceStorageDir(2, 1);\n File dn4ArcVol1 = cluster.getInstanceStorageDir(3, 1);\n DataNodeTestUtils.injectDataDirFailure(dn1ArcVol1);\n DataNodeTestUtils.injectDataDirFailure(dn2ArcVol1);\n DataNodeTestUtils.injectDataDirFailure(dn3ArcVol1);\n DataNodeTestUtils.injectDataDirFailure(dn4ArcVol1);\n try {\n DFSTestUtil.createFile(cluster.getFileSystem(), new Path(\n \"/blockStatsFile2\"), 1024, (short) 1, 0L);\n fail(\"Should throw exception, becuase no DISK storage available\");\n } catch (Exception e) {\n assertTrue(e.getMessage().contains(\n \"could only be written to 0 of the 1 minReplication\"));\n }\n // wait for heartbeat\n Thread.sleep(6000);\n storageTypeStatsMap = cluster.getNamesystem().getBlockManager()\n .getStorageTypeStats();\n assertFalse(\"StorageTypeStatsMap should not contain DISK Storage type\",\n storageTypeStatsMap.containsKey(StorageType.DISK));\n DataNodeTestUtils.restoreDataDirFromFailure(dn1ArcVol1);\n DataNodeTestUtils.restoreDataDirFromFailure(dn2ArcVol1);\n DataNodeTestUtils.restoreDataDirFromFailure(dn3ArcVol1);\n DataNodeTestUtils.restoreDataDirFromFailure(dn4ArcVol1);\n for (int i = 0; i < 4; i++) {\n cluster.restartDataNode(0, true);\n }\n // wait for heartbeat\n Thread.sleep(6000);\n storageTypeStatsMap = cluster.getNamesystem().getBlockManager()\n .getStorageTypeStats();\n storageTypeStats = storageTypeStatsMap.get(StorageType.RAM_DISK);\n assertEquals(7, storageTypeStats.getNodesInService());\n\n storageTypeStats = storageTypeStatsMap.get(StorageType.DISK);\n assertEquals(3, storageTypeStats.getNodesInService());\n\n storageTypeStats = storageTypeStatsMap.get(StorageType.ARCHIVE);\n assertEquals(3, storageTypeStats.getNodesInService());\n\n storageTypeStats = storageTypeStatsMap.get(StorageType.NVDIMM);\n assertEquals(1, storageTypeStats.getNodesInService());\n }",
"@Test (timeout=180000)\n public void testFixAssignmentsAndNoHdfsChecking() throws Exception {\n TableName table =\n TableName.valueOf(\"testFixAssignmentsAndNoHdfsChecking\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by closing a region\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"A\"),\n Bytes.toBytes(\"B\"), true, false, false, false, HRegionInfo.DEFAULT_REPLICA_ID);\n\n // verify there is no other errors\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.NOT_DEPLOYED, ERROR_CODE.HOLE_IN_REGION_CHAIN});\n\n // verify that noHdfsChecking report the same errors\n HBaseFsck fsck = new HBaseFsck(conf, hbfsckExecutorService);\n fsck.connect();\n fsck.setDisplayFullReport(); // i.e. -details\n fsck.setTimeLag(0);\n fsck.setCheckHdfs(false);\n fsck.onlineHbck();\n assertErrors(fsck, new ERROR_CODE[] {\n ERROR_CODE.NOT_DEPLOYED, ERROR_CODE.HOLE_IN_REGION_CHAIN});\n fsck.close();\n\n // verify that fixAssignments works fine with noHdfsChecking\n fsck = new HBaseFsck(conf, hbfsckExecutorService);\n fsck.connect();\n fsck.setDisplayFullReport(); // i.e. -details\n fsck.setTimeLag(0);\n fsck.setCheckHdfs(false);\n fsck.setFixAssignments(true);\n fsck.onlineHbck();\n assertTrue(fsck.shouldRerun());\n fsck.onlineHbck();\n assertNoErrors(fsck);\n\n assertEquals(ROWKEYS.length, countRows());\n\n fsck.close();\n } finally {\n cleanupTable(table);\n }\n }",
"public static void sync() {\n // write out superblock if updated\n // write out free list blocks if updated\n // write out inode blocks if updated\n // write out data blocks if updated\n\n // at present, all changes to inodes, data blocks, \n // and free list blocks\n // are written as they go, so this method does nothing.\n }",
"public final void mo14831s() {\n Iterator it = ((ArrayList) mo14817d()).iterator();\n while (it.hasNext()) {\n File file = (File) it.next();\n if (file.listFiles() != null) {\n m6739b(file);\n long c = m6740c(file, false);\n if (((long) this.f6567b.mo14797a()) != c) {\n try {\n new File(new File(file, String.valueOf(c)), \"stale.tmp\").createNewFile();\n } catch (IOException unused) {\n f6563c.mo14884b(6, \"Could not write staleness marker.\", new Object[0]);\n }\n }\n for (File b : file.listFiles()) {\n m6739b(b);\n }\n }\n }\n }",
"@Test\n public void shouldDeleteBrokenReplicasWithNoNameSpaceEntry()\n throws Exception\n {\n givenStoreHasFileOfSize(PNFSID, 17);\n\n // and given the name space entry does not exist\n given(_pnfs.getFileAttributes(eq(PNFSID), Mockito.anySet()))\n .willThrow(new FileNotFoundCacheException(\"No such file\"));\n\n // when reading the meta data record\n MetaDataRecord record = _consistentStore.get(PNFSID);\n\n // then recovery is attempted\n verify(_pnfs).getFileAttributes(eq(PNFSID), Mockito.anySet());\n\n // but nothing is returned\n assertThat(record, is(nullValue()));\n\n // and the replica is deleted\n assertThat(_metaDataStore.get(PNFSID), is(nullValue()));\n assertThat(_fileStore.get(PNFSID).exists(), is(false));\n\n // and the location is cleared\n verify(_pnfs).clearCacheLocation(PNFSID);\n\n // and the name space entry is not touched\n verify(_pnfs, never())\n .setFileAttributes(eq(PNFSID), Mockito.any(FileAttributes.class));\n }",
"protected boolean upgradeLocks() {\n \t\treturn false;\n \t}",
"private PersistentLinkedList<T> changeLinksHelper(int treeIndex, int data,\n boolean setPreviousIndex) {\n if (treeIndex == -1) {\n return this;\n }\n\n TraverseData traverseData = traverse(treeIndex);\n int finalIndex = traverseData.index;\n traverseData.currentNewNode\n .set(finalIndex,\n new Node<>(branchingFactor, traverseData.currentNode.get(finalIndex).data));\n if (setPreviousIndex) {\n traverseData.currentNewNode.get(finalIndex).previousIndex = data; //new\n traverseData.currentNewNode.get(finalIndex).nextIndex = traverseData.currentNode\n .get(finalIndex).nextIndex; //old\n } else {\n traverseData.currentNewNode.get(finalIndex).nextIndex = data; //new\n traverseData.currentNewNode.get(finalIndex).previousIndex = traverseData.currentNode\n .get(finalIndex).previousIndex; //old\n }\n\n for (int i = 0; i < branchingFactor; i++) {\n if (i == finalIndex) {\n continue;\n }\n traverseData.currentNewNode.set(i, traverseData.currentNode.get(i));\n }\n\n return new PersistentLinkedList<>(traverseData.newRoot, branchingFactor, depth, base,\n treeSize, unusedTreeIndices, indexCorrespondingToTheFirstElement,\n indexCorrespondingToTheLatestElement);\n }",
"private void rebaseCopyHelper(int id, Version curr, Version temp,\n\t\t\tHashMap<String, String> propagate, Version splitPoint)\n\t\t\tthrows IOException {\n\t\tFile folder = new File(\".gitlet/\" + ((Integer) (id)).toString());\n\t\tfolder.mkdir();// create folder\n\t\t// copy files into the new version\n\n\t\tfor (String f : curr.file().keySet()) {\n\t\t\tif (!curr.file().get(f).equals(curr.getParent().file().get(f))) {\n\t\t\t\tFile after = new File(\".gitlet/\" + ((Integer) id).toString()\n\t\t\t\t\t\t+ \"/\" + filenameHelper(f));\n\t\t\t\tFile before = new File(curr.file().get(f));\n\t\t\t\tcopyFile(before.getCanonicalPath(), after.getCanonicalPath());\n\t\t\t\ttemp.file().put(\n\t\t\t\t\t\tf,\n\t\t\t\t\t\t\".gitlet/\" + ((Integer) id).toString() + \"/\"\n\t\t\t\t\t\t\t\t+ filenameHelper(f));\n\t\t\t} else {\n\t\t\t\ttemp.file().put(f, curr.file().get(f));\n\t\t\t}\n\t\t}\n\t\t// copy file tracking information (propagation)\n\t\tfor (String name : propagate.keySet()) {\n\t\t\tif (curr.file().get(name) == null\n\t\t\t\t\t|| curr.file().get(name)\n\t\t\t\t\t\t\t.equals(splitPoint.file().get(name))) {\n\t\t\t\ttemp.file().put(name, propagate.get(name));\n\t\t\t}\n\t\t}\n\t}",
"void upgradeDatasetLockToWrite(LockList locks, DataverseName dataverseName, String datasetName)\n throws AlgebricksException;",
"private void fixNode429()\r\n \t{\r\n \t\tif (! (origFile.getName().equals(\"node429.html\") && pageTitle.contains(\"UNIX-Guru\")))\r\n \t\t\treturn;\r\n \t\tSimpleLogger.verbose(\" Fixing buggy heading...\");\r\n \t\tElement buggyParagraph = (Element) xPathQuery(\"//html:p[contains(text(),'gpGlossar18133')]\").get(0);\r\n \t\tElement heading = new Element(\"h1\");\r\n \t\t//heading.appendChild(\"unix\");\r\n \t\tbodyTag.appendChild(heading);\r\n \t\tElement link = new Element(\"a\");\r\n \t\tlink.appendChild(\"unix\");\r\n \t\theading.appendChild(link);\r\n \t\treplaceNodeBy(buggyParagraph, heading);\r\n \t}",
"@Test\n public void testDeleteAllContentButNotFile() throws IOException, PatchFailedException {\n Path oldFile = scratch.file(\"/root/oldfile\", \"I'm an old file\", \"bye, world\");\n Path patchFile =\n scratch.file(\n \"/root/patchfile\",\n \"--- a/oldfile\",\n \"+++ b/oldfile\",\n \"@@ -1,2 +0,0 @@\",\n \"-I'm an old file\",\n \"-bye, world\");\n PatchUtil.apply(patchFile, 1, root);\n assertThat(oldFile.exists()).isTrue();\n assertThat(FileSystemUtils.readLines(oldFile, UTF_8)).isEmpty();\n }",
"private void m50956b() {\n if (!C8626b.m50749b() && !C8626b.m50748a()) {\n try {\n File file = new File(this.f36887b.getExternalFilesDir(null) + \"/.logcache\");\n if (file.exists() && file.isDirectory()) {\n for (File file2 : file.listFiles()) {\n file2.delete();\n }\n }\n } catch (NullPointerException unused) {\n }\n }\n }",
"private void conditionalExtendFile() {\n\n // maximum allowed size of an Azure page blob (1 terabyte)\n final long MAX_PAGE_BLOB_SIZE = 1024L * 1024L * 1024L * 1024L;\n\n // If blob is already at the maximum size, then don't try to extend it.\n if (currentBlobSize == MAX_PAGE_BLOB_SIZE) {\n return;\n }\n\n // If we are within the maximum write size of the end of the file,\n if (currentBlobSize - currentBlobOffset <= MAX_RAW_BYTES_PER_REQUEST) {\n\n // Extend the file. Retry up to 3 times with back-off.\n CloudPageBlob cloudPageBlob = (CloudPageBlob) blob.getBlob();\n long newSize = currentBlobSize + configuredPageBlobExtensionSize;\n\n // Make sure we don't exceed maximum blob size.\n if (newSize > MAX_PAGE_BLOB_SIZE) {\n newSize = MAX_PAGE_BLOB_SIZE;\n }\n final int MAX_RETRIES = 3;\n int retries = 1;\n boolean resizeDone = false;\n while(!resizeDone && retries <= MAX_RETRIES) {\n try {\n cloudPageBlob.resize(newSize);\n resizeDone = true;\n currentBlobSize = newSize;\n } catch (StorageException e) {\n LOG.warn(\"Failed to extend size of \" + cloudPageBlob.getUri());\n try {\n\n // sleep 2, 8, 18 seconds for up to 3 retries\n Thread.sleep(2000 * retries * retries);\n } catch (InterruptedException e1) {\n\n // Restore the interrupted status\n Thread.currentThread().interrupt();\n }\n } finally {\n retries++;\n }\n }\n }\n }",
"public abstract FilesystemEntry createChildEntry(String name, String hash, long size,\n\t\t\tint links, Share share);",
"@Test\n public void partialTableRepair()\n {\n long startTime = System.currentTimeMillis();\n long expectedRepairedInterval = startTime - TimeUnit.HOURS.toMillis(1);\n\n TableReference tableReference = new TableReference(\"ks\", \"tb\");\n\n createKeyspace(tableReference.getKeyspace(), 3);\n injectRepairHistory(tableReference, System.currentTimeMillis() - TimeUnit.HOURS.toMillis(2));\n\n Set<TokenRange> expectedRepairedBefore = halfOfTokenRanges(tableReference);\n injectRepairHistory(tableReference, System.currentTimeMillis() - TimeUnit.MINUTES.toMillis(30), expectedRepairedBefore);\n\n Set<TokenRange> allTokenRanges = myMetadata.getTokenRanges(tableReference.getKeyspace(), myLocalHost);\n Set<LongTokenRange> expectedRepairedRanges = Sets.difference(convertTokenRanges(allTokenRanges), convertTokenRanges(expectedRepairedBefore));\n\n createTable(tableReference);\n\n await().pollInterval(1, TimeUnit.SECONDS).atMost(90, TimeUnit.SECONDS).until(() -> isRepairedSince(tableReference, startTime, expectedRepairedRanges));\n\n verifyTableRepairedSince(tableReference, expectedRepairedInterval, expectedRepairedRanges);\n verify(myFaultReporter, never()).raise(any(RepairFaultReporter.FaultCode.class), anyMapOf(String.class, Object.class));\n }",
"public void fixEdges() {\n\tfor (LayoutEdge lEdge: edgeList) {\n\t // Get the underlying edge\n\t CyEdge edge = lEdge.getEdge();\n\t CyNode target = (CyNode) edge.getTarget();\n\t CyNode source = (CyNode) edge.getSource();\n\n\t if (nodeToLayoutNode.containsKey(source) && nodeToLayoutNode.containsKey(target)) {\n\t\t// Add the connecting nodes\n\t\tlEdge.addNodes((LayoutNode) nodeToLayoutNode.get(source),\n\t\t\t (LayoutNode) nodeToLayoutNode.get(target));\n\t }\n\t}\n }",
"private int fixUp(byte[] b, int offset, int read) {\n for(int i=0; i<detect.length-1; i++) {\n int base = offset+read-1-i;\n if(base < 0) continue;\n \n boolean going = true;\n for(int j=0; j<=i && going; j++) {\n if(b[base+j] == detect[j]) {\n // Matches\n } else {\n going = false;\n }\n }\n if(going) {\n // There could be a <br> handing over the end, eg <br|\n addToSpare(b, base, i+1, true);\n read -= 1;\n read -= i;\n break;\n }\n }\n \n // Find places to fix\n ArrayList<Integer> fixAt = new ArrayList<Integer>();\n for(int i=offset; i<=offset+read-detect.length; i++) {\n boolean going = true;\n for(int j=0; j<detect.length && going; j++) {\n if(b[i+j] != detect[j]) {\n going = false;\n }\n }\n if(going) {\n fixAt.add(i);\n }\n }\n \n if(fixAt.size()==0) {\n return read;\n }\n \n // If there isn't space in the buffer to contain\n // all the fixes, then save the overshoot for next time\n int needed = offset+read+fixAt.size();\n int overshoot = needed - b.length; \n if(overshoot > 0) {\n // Make sure we don't loose part of a <br>!\n int fixes = 0;\n for(int at : fixAt) {\n if(at > offset+read-detect.length-overshoot-fixes) {\n overshoot = needed - at - 1 - fixes;\n break;\n }\n fixes++;\n }\n\n addToSpare(b, offset+read-overshoot, overshoot, false);\n read -= overshoot;\n }\n \n // Fix them, in reverse order so the\n // positions are valid\n for(int j=fixAt.size()-1; j>=0; j--) {\n int i = fixAt.get(j);\n if(i >= read+offset) {\n // This one has moved into the overshoot\n continue;\n }\n if(i > read-3) {\n // This one has moved into the overshoot\n continue;\n }\n\n byte[] tmp = new byte[read-i-3];\n System.arraycopy(b, i+3, tmp, 0, tmp.length);\n b[i+3] = (byte)'/';\n System.arraycopy(tmp, 0, b, i+4, tmp.length);\n // It got one longer\n read++;\n }\n return read;\n }",
"public static void customTest() throws IOException, NotBoundException, MessageNotFoundException {\n Client c = new Client();\n String fileName = \"file1\";\n\n char[] ss = \"[INITIAL DATA!]\".toCharArray(); // len = 15\n byte[] data = new byte[ss.length];\n for (int i = 0; i < ss.length; i++) {\n data[i] = (byte) ss[i];\n }\n\n c.write(fileName, data);\n\n c = new Client();\n ss = \"File 1 test test END\".toCharArray(); // len = 20\n data = new byte[ss.length];\n for (int i = 0; i < ss.length; i++) {\n data[i] = (byte) ss[i];\n }\n\n byte[] chunk = new byte[Configurations.CHUNK_SIZE];\n\n int seqN = data.length / Configurations.CHUNK_SIZE;\n int lastChunkLen = Configurations.CHUNK_SIZE;\n\n if (data.length % Configurations.CHUNK_SIZE > 0) {\n lastChunkLen = data.length % Configurations.CHUNK_SIZE;\n seqN++;\n }\n\n WriteAck ackMsg = c.masterStub.write(fileName);\n ReplicaServerClientInterface stub = (ReplicaServerClientInterface) registry.lookup(\"ReplicaClient\" + ackMsg.getLoc().getId());\n\n FileContent fileContent;\n @SuppressWarnings(\"unused\")\n ChunkAck chunkAck;\n //\t\tfor (int i = 0; i < seqN; i++) {\n System.arraycopy(data, 0 * Configurations.CHUNK_SIZE, chunk, 0, Configurations.CHUNK_SIZE);\n fileContent = new FileContent(fileName, chunk);\n chunkAck = stub.write(ackMsg.getTransactionId(), 0, fileContent);\n\n System.arraycopy(data, 1 * Configurations.CHUNK_SIZE, chunk, 0, Configurations.CHUNK_SIZE);\n fileContent = new FileContent(fileName, chunk);\n chunkAck = stub.write(ackMsg.getTransactionId(), 1, fileContent);\n\n // read here \n List<ReplicaLoc> locations = c.masterStub.read(fileName);\n System.err.println(\"[@CustomTest] Read1 started \");\n\n // TODO fetch from all and verify \n ReplicaLoc replicaLoc = locations.get(0);\n ReplicaServerClientInterface replicaStub = (ReplicaServerClientInterface) registry.lookup(\"ReplicaClient\" + replicaLoc.getId());\n fileContent = replicaStub.read(fileName);\n System.err.println(\"[@CustomTest] data:\");\n System.err.println(new String(fileContent.getData()));\n\n // continue write \n for (int i = 2; i < seqN - 1; i++) {\n System.arraycopy(data, i * Configurations.CHUNK_SIZE, chunk, 0, Configurations.CHUNK_SIZE);\n fileContent = new FileContent(fileName, chunk);\n chunkAck = stub.write(ackMsg.getTransactionId(), i, fileContent);\n }\n // copy the last chuck that might be < CHUNK_SIZE\n System.arraycopy(data, (seqN - 1) * Configurations.CHUNK_SIZE, chunk, 0, lastChunkLen);\n fileContent = new FileContent(fileName, chunk);\n chunkAck = stub.write(ackMsg.getTransactionId(), seqN - 1, fileContent);\n\n //commit\n ReplicaLoc primaryLoc = c.masterStub.locatePrimaryReplica(fileName);\n ReplicaServerClientInterface primaryStub = (ReplicaServerClientInterface) registry.lookup(\"ReplicaClient\" + primaryLoc.getId());\n primaryStub.commit(ackMsg.getTransactionId(), seqN);\n\n // read\n locations = c.masterStub.read(fileName);\n System.err.println(\"[@CustomTest] Read3 started \");\n\n replicaLoc = locations.get(0);\n replicaStub = (ReplicaServerClientInterface) registry.lookup(\"ReplicaClient\" + replicaLoc.getId());\n fileContent = replicaStub.read(fileName);\n System.err.println(\"[@CustomTest] data:\");\n System.err.println(new String(fileContent.getData()));\n\n }",
"public void sync(){\n byte[] block = new byte[512];\n SysLib.int2bytes(totalBlocks, block, 0);\n SysLib.int2bytes(totalInodes, block, 4);\n SysLib.int2bytes(freeList, block, 8);\n SysLib.rawwrite(0, block);\n }",
"public int addBlock(Directory root, String name, String type, int rootIndex) {\n\t\tint freeBlock = freeBlock(); // #1\n\t\tif(freeBlock != Constants.NEGATIVE) {\n\t\t\tint dirList = root.checkDirListing();\n\t\t\tif(dirList != Constants.NEGATIVE) {\n\t\t\t\tcreateFiOrDi(root, type, freeBlock);\n\t\t\t\troot.makeDirListEntry(type, name, freeBlock, Constants.EMPTY_FILE, dirList);\n\t\t\t\treturn freeBlock;\n\t\t\t} else {//Current directory Directory_listing is exhausted so we need to create new directory and set OldDirectory-FRWD pointer to point to new Directory(if FRWD pointer of current directory is zero).\n\t\t\t\tif(root.getFrwd() != 0) {//Then check in the directory pointed by FRWD\n\t\t\t\t\treturn addBlock((Directory)sector.get(root.getFrwd()), name, type, root.getFrwd());\n\t\t\t\t} else {\n\t\t\t\t\tsector.put(freeBlock, new Directory());\n\t\t\t\t\tDirectory newRoot = (Directory) sector.get(freeBlock);\n\t\t\t\t\troot.setFrwd(freeBlock);\n\t\t\t\t\tnewRoot.setBack(rootIndex);\n\t\t\t\t\t\n\t\t\t\t\t//As we have already used freeBlock got in #1 so we are going to get new freeBlock if any.\n\t\t\t\t\tfreeBlock = freeBlock();\n\t\t\t\t\tdirList = newRoot.checkDirListing();\n\t\t\t\t\tif(freeBlock != Constants.NEGATIVE) {\n\t\t\t\t\t\tcreateFiOrDi(newRoot, type, freeBlock);\n\t\t\t\t\t\tnewRoot.makeDirListEntry(type, name, freeBlock, Constants.EMPTY_FILE, dirList);\n\t\t\t\t\t\treturn freeBlock;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn ErrorType.SECTOR_FULL.getErrorId();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//return ErrorType.DIRECTORY_LISTING_FULL.getErrorId();\n\t\t\t\t\n\t\t\t}\n\t\t} else {\n\t\t\treturn ErrorType.SECTOR_FULL.getErrorId();\n\t\t}\n\t}",
"@BeforeClass\n public static void createOriginalFSImage() throws IOException {\n MiniDFSCluster cluster = null;\n try {\n Configuration conf = new Configuration();\n conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_ACLS_ENABLED_KEY, true);\n conf.setBoolean(DFSConfigKeys.DFS_STORAGE_POLICY_ENABLED_KEY, true);\n\n File[] nnDirs = MiniDFSCluster.getNameNodeDirectory(\n MiniDFSCluster.getBaseDirectory(), 0, 0);\n tempDir = nnDirs[0];\n\n cluster = new MiniDFSCluster.Builder(conf).build();\n cluster.waitActive();\n DistributedFileSystem hdfs = cluster.getFileSystem();\n\n Path dir = new Path(\"/dir_wo_sp\");\n hdfs.mkdirs(dir);\n\n dir = new Path(\"/dir_wo_sp/sub_dir_wo_sp\");\n hdfs.mkdirs(dir);\n\n dir = new Path(\"/dir_wo_sp/sub_dir_w_sp_allssd\");\n hdfs.mkdirs(dir);\n hdfs.setStoragePolicy(dir, ALLSSD_STORAGE_POLICY_NAME);\n\n Path file = new Path(\"/dir_wo_sp/file_wo_sp\");\n try (FSDataOutputStream o = hdfs.create(file)) {\n o.write(123);\n o.close();\n }\n\n file = new Path(\"/dir_wo_sp/file_w_sp_allssd\");\n try (FSDataOutputStream o = hdfs.create(file)) {\n o.write(123);\n o.close();\n hdfs.setStoragePolicy(file, HdfsConstants.ALLSSD_STORAGE_POLICY_NAME);\n }\n\n dir = new Path(\"/dir_w_sp_allssd\");\n hdfs.mkdirs(dir);\n hdfs.setStoragePolicy(dir, HdfsConstants.ALLSSD_STORAGE_POLICY_NAME);\n\n dir = new Path(\"/dir_w_sp_allssd/sub_dir_wo_sp\");\n hdfs.mkdirs(dir);\n\n file = new Path(\"/dir_w_sp_allssd/file_wo_sp\");\n try (FSDataOutputStream o = hdfs.create(file)) {\n o.write(123);\n o.close();\n }\n\n dir = new Path(\"/dir_w_sp_allssd/sub_dir_w_sp_hot\");\n hdfs.mkdirs(dir);\n hdfs.setStoragePolicy(dir, HdfsConstants.HOT_STORAGE_POLICY_NAME);\n\n // Write results to the fsimage file\n hdfs.setSafeMode(SafeModeAction.ENTER, false);\n hdfs.saveNamespace();\n\n // Determine the location of the fsimage file\n originalFsimage = FSImageTestUtil.findLatestImageFile(FSImageTestUtil\n .getFSImage(cluster.getNameNode()).getStorage().getStorageDir(0));\n if (originalFsimage == null) {\n throw new RuntimeException(\"Didn't generate or can't find fsimage\");\n }\n LOG.debug(\"original FS image file is \" + originalFsimage);\n } finally {\n if (cluster != null) {\n cluster.shutdown();\n }\n }\n }",
"public interface BlockChainLinkStorage\n{\n /**\n * Get the very first link in the storage, which should contain the genesis\n * block of this chain. This might be null if there are no\n * blocks yet in the storage. Orphan blocks are never returned.\n */\n BlockChainLink getGenesisLink();\n\n /**\n * Get the link stored which has the greatest aggregated complexity\n * and is connected to the genesis block. Orphan blocks are never returned.\n */\n BlockChainLink getLastLink();\n\n /**\n * Return the height of the best chain\n * @return The height of the chain with most work\n */\n public int getHeight();\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n BlockChainLink getLink(byte[] hash);\n\n /**\n * Returns true if a link with the given hash value is in the storage.\n * @return The link with the block with the given hash, or null if no such link exists.\n */\n boolean blockExists(byte[] hash);\n\n /**\n * Get the link to the given hash value.\n * @return The link with the block header with the given hash, or null if no such link exists.\n */\n BlockChainLink getLinkBlockHeader(byte[] hash);\n\n// /**\n// * Get the link following the current one given on the same\n// * branch the target is.\n// */\n// BlockChainLink getNextLink(byte[] current, byte[] target);\n//\n// /**\n// * Get the links for which the previous link contains the block with hash\n// * given. Orphan blocks are returned.\n// */\n// List<BlockChainLink> getNextLinks(byte[] hash);\n\n /**\n * Get the common parent of the two given hashes if there is one.\n * @return The highest common parent of the two blocks specified. Null if there\n * is no common parent for any reason.\n */\n BlockChainLink getCommonLink(byte[] first, byte[] second);\n\n /**\n * Determine whether a block given is reachable from an intermediate\n * block by only going forward. \n * @param target The block to reach.\n * @param source The source from which the target is attempted to be reached.\n * @return True if the target can be reached from the source, false otherwise.\n */\n boolean isReachable(byte[] target, byte[] source);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * All the links including the given one and all parents\n * of it will be checked (the link denotes the branch to search). Note that\n * only the transaction hash should be checked, the output index is not\n * relevant for this search.\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getClaimedLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Find the link which contains the claimed transaction by the input given.\n * This method behaves exactly like @getClaimedLink but returns a block\n * with just the interesting transaction, for performance purposes\n * @param link The link that represents the top of the branch to search. If\n * this is an orphan link, the result is undefined.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the claimed output, or null if no such\n * link exist.\n */\n BlockChainLink getPartialClaimedLink(BlockChainLink link, TransactionInput in);\n \n /**\n * Find the link which contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return The link that contains the said input, or null if the same output\n * is not claimed in the given branch.\n */\n BlockChainLink getClaimerLink(BlockChainLink link, TransactionInput in);\n\n /**\n * Return true if a block contains a claim for the same transaction output\n * that is claimed by the given input.\n * @param link The link with the block that represents the branch to search.\n * Supplying an orphan link yields an undefined result.\n * @param in The transaction input claiming the output to find the link for.\n * @return True if a block in exists which contains the said input,\n * or null if the same output is not claimed in the given branch.\n */\n boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);\n\n /**\n * Save a link into the storage. If the link exists, it will be overwritten.\n */\n void addLink(BlockChainLink link);\n\n /**\n * @param height\n * @return The block at specified height of the best chain\n */\n byte[] getHashOfMainChainAtHeight(long height);\n\n /**\n * @param height\n * @return The block link at specified height of the best chain\n */\n BlockChainLink getLinkAtHeight(long height);\n}",
"@SuppressWarnings(\"PMD\") // this will end up in unit tests soon\n\tpublic static void main(String[] args) throws IOException\n\t{\n\t\t/*\n\t\tbyte[] data = new byte[1024 * 1024];\n\t\tfor(int i = 0; i < data.length; i++)\n\t\t{\n\t\t\tdata[i] = (byte) i;\n\t\t}\n\t\t*/\n\t\t//byte[] data = DataUtils.randomData(1024 * 1024);\n\t\t//ByteArrayInputStream in = new ByteArrayInputStream(data);\n\t\tFile oldFile = new File(\"../test-4mb-old.dat\"); // also test.dat - 1 GB\n\t\tFile newFile = new File(\"../test-4mb-new.dat\");\n\t\t\n\t\tFileInputStream in = new FileInputStream(oldFile);\n\t\tObjectArrayList<Block> blocks = calculateBlocks(in, 1024);\n\t\tin.close();\n\t\t\n\t\tin = new FileInputStream(newFile);\n\t\t//in.reset();\n\t\tlong start = System.currentTimeMillis();\n\t\tcalculateDifferences(blocks, 1024, in, new NullDifferenceListener());\n\t\tlong end = System.currentTimeMillis();\n\t\tin.close();\n\t\t\n\t\tlong millis = end - start;\n\t\tdouble seconds = millis / 1000.0;\n\t\tdouble millisPer = millis / (double) (1024*1024*1024);\n\t\tdouble secondsPer = millisPer / 1000.0;\n\t\tSystem.out.printf(\"Completed in %.4f seconds (%d milliseconds) - average %f seconds (%f milliseconds) per byte%n\", seconds, millis, secondsPer, millisPer);\n\t}",
"private void grow(LinkedList<Book>[] array2) {\r\n \r\n //condition to double the capacity, resize the array, and copy the contents\r\n if ((this.size + 1) > (this.capacity * 0.8)) {\r\n \r\n int oldCapacity = this.capacity; //stores the old capacity\r\n \r\n this.capacity = this.capacity * 2; //doubles the capacity\r\n \r\n LinkedList [] oldArray = array2; //prior to change array\r\n \r\n LinkedList [] newArray = new LinkedList[capacity]; //new array to be filled\r\n \r\n //steps through the old array of linked lists\r\n for (int i = 0; i < oldCapacity;i++) {\r\n \r\n //checks if there is a linked list at index i, if not it skips this iteration\r\n if (oldArray[i]==null) {\r\n continue; \r\n }\r\n \r\n //if there is a linked list it is stepped through \r\n for (int j = 0; j < oldArray[i].size();j++) {\r\n\r\n // if the oldArray[i] has a KeyValue object\r\n if (oldArray[i].get(j) != null) {\r\n\r\n\r\n KeyType oldKey = (KeyType) ((Book) oldArray[i].get(j)).getTitle(); // copies the key\r\n // of the KeyValue\r\n // object\r\n\r\n \r\n Book bookNode = ((Book) oldArray[i].get(j)); // copies the KeyValue object\r\n\r\n int index = Math.abs(oldKey.hashCode()) % this.capacity; // rehashes the key to find its\r\n // new index to be placed at\r\n\r\n // if theres no linked list at newArray[index] create one then add the node from\r\n // oldArray[]\r\n if (newArray[index] == null) {\r\n newArray[index] = new LinkedList<Book>();\r\n newArray[index].add(bookNode);\r\n\r\n\r\n }\r\n\r\n\r\n newArray[index].add(bookNode); //otherwise add it to the list at that index\r\n\r\n this.array = newArray; //sets array\r\n\r\n }\r\n }\r\n }\r\n }\r\n }",
"static void unprotectedConcat(FSDirectory fsd, INodesInPath targetIIP,\n INodeFile[] srcList, long timestamp) throws IOException {\n if (NameNode.stateChangeLog.isDebugEnabled()) {\n NameNode.stateChangeLog.debug(\"DIR* FSNamesystem.concat to \"\n + targetIIP.getPath());\n }\n\n final INodeFile trgInode = targetIIP.getLastINode().asFile();\n QuotaCounts deltas = computeQuotaDeltas(fsd, trgInode, srcList);\n verifyQuota(fsd, targetIIP, deltas);\n\n INodeDirectory trgParent = targetIIP.getINode(-2).asDirectory();\n List<BlockInfoContiguous> oldBlks = trgInode.concatBlocks(srcList);\n\n //params for updating the EntityManager.snapshots\n INodeCandidatePrimaryKey trg_param = new INodeCandidatePrimaryKey(trgInode.getId());\n List<INodeCandidatePrimaryKey> srcs_param = new ArrayList<>();\n \n for (INodeFile allSrcInode : srcList) {\n srcs_param.add(new INodeCandidatePrimaryKey(allSrcInode.getId()));\n }\n // since we are in the same dir - we can use same parent to remove files\n int count = 0;\n for (INodeFile nodeToRemove : srcList) {\n if(nodeToRemove != null) {\n \n nodeToRemove.getParent().removeChild(nodeToRemove);\n count++;\n }\n }\n\n trgInode.setModificationTime(timestamp);\n trgInode.setHasBlocks(true);\n trgParent.updateModificationTime(timestamp);\n // update quota on the parent directory ('count' files removed, 0 space)\n fsd.unprotectedUpdateCount(targetIIP, targetIIP.length() - 1, deltas);\n EntityManager\n .snapshotMaintenance(HdfsTransactionContextMaintenanceCmds.Concat,\n trg_param, srcs_param, oldBlks);\n }",
"@Test\n public void run() throws Exception {\n BranchName main = BranchName.of(\"main\");\n\n // create an old commit referencing both unique and non-unique assets.\n //The unique asset should be identified by the gc policy below since they are older than 1 day.\n store.setOverride(FIVE_DAYS_IN_PAST_MICROS);\n commit().put(\"k1\", new DummyValue().add(-3).add(0).add(100)).withMetadata(\"cOld\").toBranch(main);\n\n // work beyond slop but within gc allowed age.\n store.setOverride(TWO_HOURS_IN_PAST_MICROS);\n // create commits that have time-valid assets. Create more commits than ParentList.MAX_PARENT_LIST to confirm recursion.\n for (int i = 0; i < 55; i++) {\n commit().put(\"k1\", new DummyValue().add(i).add(i + 100)).withMetadata(\"c2\").toBranch(main);\n }\n\n // create a new branch, commit two assets, then delete the branch.\n BranchName toBeDeleted = BranchName.of(\"toBeDeleted\");\n versionStore.create(toBeDeleted, Optional.empty());\n Hash h = commit().put(\"k1\", new DummyValue().add(-1).add(-2)).withMetadata(\"c1\").toBranch(toBeDeleted);\n versionStore.delete(toBeDeleted, Optional.of(h));\n\n store.clearOverride();\n {\n // Create a dangling value to ensure that the slop factor avoids deletion of the assets of this otherwise dangling value.\n save(TimeUnit.MILLISECONDS.toMicros(System.currentTimeMillis()), new DummyValue().add(-50).add(-51));\n\n // create a dangling value that should be cleaned up.\n save(TimeUnit.MILLISECONDS.toMicros(System.currentTimeMillis()) - TimeUnit.DAYS.toMicros(2), new DummyValue().add(-60).add(-61));\n }\n\n SparkSession spark = SparkSession\n .builder()\n .appName(\"test-nessie-gc-collection\")\n .master(\"local[2]\")\n .getOrCreate();\n\n // now confirm that the unreferenced assets are marked for deletion. These are found based\n // on the no-longer referenced commit as well as the old commit.\n GcOptions options = ImmutableGcOptions.builder()\n .bloomFilterCapacity(10_000_000)\n .maxAgeMicros(ONE_DAY_OLD_MICROS)\n .timeSlopMicros(ONE_HOUR_OLD_MICROS)\n .build();\n IdentifyUnreferencedAssets<DummyValue> app = new IdentifyUnreferencedAssets<DummyValue>(helper, new DynamoSupplier(), spark, options);\n Dataset<UnreferencedItem> items = app.identify();\n Set<String> unreferencedItems = items.collectAsList().stream().map(UnreferencedItem::getName).collect(Collectors.toSet());\n assertThat(unreferencedItems, containsInAnyOrder(\"-1\", \"-2\", \"-3\", \"-60\", \"-61\"));\n }",
"private void initializeVolumeFields() {\n s_logger.info(\"Updating detached full copy volumes.\");\n DbClient dbClient = this.getDbClient();\n List<URI> volumeURIs = dbClient.queryByType(Volume.class, true);\n\n Iterator<Volume> volumes =\n dbClient.queryIterativeObjects(Volume.class, volumeURIs);\n while (volumes.hasNext()) {\n Volume volume = volumes.next();\n boolean volumeUpdated = false;\n\n s_logger.info(\"Examining Volume (id={}) for upgrade\", volume.getId().toString());\n String replicaState = volume.getReplicaState();\n // Check if the replicate state is detached.\n if ((NullColumnValueGetter.isNotNullValue(replicaState)) &&\n (ReplicationState.DETACHED.name().equals(replicaState))) {\n URI sourceURI = volume.getAssociatedSourceVolume();\n if (!NullColumnValueGetter.isNullURI(sourceURI)) {\n // We make sure the associated source volume is null.\n // This change was made in ViPR 2.3 for Jira 12659, but\n // the 2.3 upgrade callback never marked the associated\n // source volume null for existing, detached full copies\n // in the database, which all full copies were prior to 2.3.\n // See class FullCopyVolumeReplicaStateMigration.\n s_logger.info(\"Setting associated source volume to null\");\n volume.setAssociatedSourceVolume(NullColumnValueGetter.getNullURI());\n volumeUpdated = true;\n }\n }\n\n // For any volume that has full copies, make sure none of those full copies\n // are in a detached state.\n HashSet<String> fullCopiesToRemove = new HashSet<String>();\n StringSet fullCopies = volume.getFullCopies();\n if (fullCopies != null) {\n for (String fullCopyId : fullCopies) {\n Volume fullCopy = dbClient.queryObject(Volume.class, URI.create(fullCopyId));\n if (fullCopy != null) {\n replicaState = fullCopy.getReplicaState();\n // Check if the replicate state is detached.\n if ((NullColumnValueGetter.isNotNullValue(replicaState)) &&\n (ReplicationState.DETACHED.name().equals(replicaState))) {\n fullCopiesToRemove.add(fullCopyId);\n }\n } else {\n fullCopiesToRemove.add(fullCopyId);\n }\n }\n\n // Existing, detached full copies in the database should be\n // removed from the full copies list of their source volume.\n // This is the change for Jira 12766 (COP-13552) which is\n // made in the Darth (2.4) ViPR release.\n s_logger.info(\"Removing {} from full copies list of source volume {}:{}\", fullCopiesToRemove, volume.getId());\n fullCopies.removeAll(fullCopiesToRemove);\n volumeUpdated = true;\n }\n\n // Persist the changes if necessary.\n if (volumeUpdated) {\n dbClient.persistObject(volume);\n }\n }\n }",
"private void duplicate(Node nodo) {\n int reference_page = nodo.getReference();\n if(this.debug)\n System.out.println(\"ExtHash::duplicate >> duplicando nodo con referencia \" + reference_page);\n\n ArrayList<Integer> content = this.fm.read(reference_page); this.in_counter++;\n if(this.debug) {\n System.out.println(\"ExtHash::duplicate >> contenido de la pagina:\");\n for(int i=1; i<content.get(0); i++) {\n System.out.println(\" \" + content.get(i));\n }\n }\n\n int shift = nodo.getAltura();\n nodo.activateReference(false);\n\n ArrayList<Integer> left = new ArrayList<>();\n ArrayList<Integer> right = new ArrayList<>();\n\n for(int i=1; i<=content.get(0); i++) {\n int chain = content.get(i);\n if((chain & (1 << shift)) == 0) {\n left.add(chain);\n } else {\n right.add(chain);\n }\n }\n\n left.add(0, left.size());\n right.add(0, right.size());\n\n this.fm.write(left, reference_page); this.out_counter++;\n Node l = new Node(reference_page);\n l.setAltura(shift + 1);\n\n this.fm.write(right, this.last); this.out_counter++;\n Node r = new Node(this.last); this.last++;\n r.setAltura(shift + 1);\n\n total_active_block++;\n\n if(this.debug) {\n System.out.println(\"ExtHash::duplicate >> contentido de paginas duplicadas(left), ref: \" + reference_page);\n for(int i=0; i<left.size(); i++) {\n System.out.println(\" \" + left.get(i));\n }\n }\n\n if(this.debug) {\n System.out.println(\"ExtHash::duplicate >> contentido de paginas duplicadas(right), ref: \" + (this.last - 1));\n for(int i=0; i<right.size(); i++) {\n System.out.println(\" \" + right.get(i));\n }\n }\n\n nodo.addLeftNode(l);\n nodo.addRightNode(r);\n\n ArrayList<Integer> last = new ArrayList<>();\n last.add(0);\n if(left.get(0) == B-2 && shift + 1 < 30) {\n this.duplicate(l);\n } else if(left.get(0) == B-2 && shift + 1 == 30) {\n left.add(this.last);\n this.fm.write(left, l.getReference()); this.out_counter++;\n\n this.fm.write(last, this.last); this.out_counter++;\n this.last++;\n }\n\n if(right.get(0) == B-2 && shift + 1 < 30) {\n this.duplicate(r);\n } else if(right.get(0) == B-2 && shift + 1 == 30) {\n right.add(this.last);\n this.fm.write(right, r.getReference()); this.out_counter++;\n\n this.fm.write(last, this.last); this.out_counter++;\n this.last++;\n }\n }",
"public synchronized int resize(int newBytesPerId, int newBytesPerType, int newBytesPerPath)\n throws IOException {\n if (this.bytesPerId > newBytesPerId && this.entries > 0)\n throw new IllegalStateException(\"Cannot reduce the number of bytes per id when there are entries in the index\");\n if (this.bytesPerType > newBytesPerType && this.entries > 0)\n throw new IllegalStateException(\"Cannot reduce the number of bytes per type when there are entries in the index\");\n if (this.bytesPerPath > newBytesPerPath && this.entries > 0)\n throw new IllegalStateException(\"Cannot reduce the number of bytes per path when there are entries in the index\");\n if (this.isReadOnly)\n throw new IllegalStateException(\"This index is readonly\");\n \n int newBytesPerSlot = newBytesPerId + newBytesPerType + newBytesPerPath;\n \n logger.info(\"Resizing uri index to {} ({}) slots and {} ({}) bytes per entry\", new Object[] { slots, this.slots, newBytesPerSlot, this.bytesPerSlot });\n \n String fileName = FilenameUtils.getBaseName(idxFile.getName());\n String fileExtension = FilenameUtils.getExtension(idxFile.getName());\n String idxFilenameNew = fileName + \"_resized.\" + fileExtension;\n File idxNewFile = new File(idxFile.getParentFile(), idxFilenameNew);\n long time = System.currentTimeMillis();\n \n logger.debug(\"Creating resized index at \" + idxNewFile);\n \n // Create the new index\n RandomAccessFile idxNew = null;\n try {\n idxNew = new RandomAccessFile(idxNewFile, \"rwd\");\n } catch (FileNotFoundException e) {\n throw new IllegalArgumentException(\"Index file \" + idxNewFile + \" cannot be created: \" + e.getMessage(), e);\n }\n \n // Write header\n idxNew.seek(IDX_START_OF_HEADER);\n idxNew.writeInt(indexVersion);\n idxNew.writeInt(newBytesPerId);\n idxNew.writeInt(newBytesPerType);\n idxNew.writeInt(newBytesPerPath);\n idxNew.writeLong(slots);\n idxNew.writeLong(entries);\n \n // Position to read the whole content\n idx.seek(IDX_START_OF_CONTENT);\n \n // Write entries\n for (int i = 0; i < slots; i++) {\n byte[] bytes = new byte[newBytesPerSlot];\n if (i < this.slots) {\n idx.read(bytes, 0, this.bytesPerSlot);\n idxNew.write(bytes);\n } else {\n // Write an empty line\n idxNew.write(bytes);\n }\n }\n \n logger.debug(\"Removing old index at \" + idxFile);\n \n // Close and delete the old index\n idx.close();\n if (!idxFile.delete())\n throw new IOException(\"Unable to delete old index file \" + idxFile);\n \n // Close the new index, and move it into the old index' place\n logger.debug(\"Moving resized index into regular position at \" + idxFile);\n idxNew.close();\n if (!idxNewFile.renameTo(idxFile))\n throw new IOException(\"Unable to move new index file to \" + idxFile);\n \n try {\n idx = new RandomAccessFile(idxFile, \"rwd\");\n } catch (FileNotFoundException e) {\n throw new IllegalArgumentException(\"Index file \" + idxNewFile + \" cannot be created: \" + e.getMessage(), e);\n }\n \n this.bytesPerSlot = newBytesPerSlot;\n this.bytesPerId = newBytesPerId;\n this.bytesPerType = newBytesPerType;\n this.bytesPerPath = newBytesPerPath;\n \n time = System.currentTimeMillis() - time;\n logger.info(\"Uri index resized in {}\", ConfigurationUtils.toHumanReadableDuration(time));\n return newBytesPerSlot;\n }",
"@Test\n public void testUnfreezeDelegatedBalanceForBandwidthSameTokenNameClose() {\n UnfreezeBalanceActuatorTest.dbManager.getDynamicPropertiesStore().saveAllowDelegateResource(0);\n long now = System.currentTimeMillis();\n UnfreezeBalanceActuatorTest.dbManager.getDynamicPropertiesStore().saveLatestBlockHeaderTimestamp(now);\n AccountCapsule owner = UnfreezeBalanceActuatorTest.dbManager.getAccountStore().get(ByteArray.fromHexString(UnfreezeBalanceActuatorTest.OWNER_ADDRESS));\n owner.setDelegatedFrozenBalanceForBandwidth(UnfreezeBalanceActuatorTest.frozenBalance);\n Assert.assertEquals(UnfreezeBalanceActuatorTest.frozenBalance, owner.getTronPower());\n AccountCapsule receiver = UnfreezeBalanceActuatorTest.dbManager.getAccountStore().get(ByteArray.fromHexString(UnfreezeBalanceActuatorTest.RECEIVER_ADDRESS));\n receiver.setAcquiredDelegatedFrozenBalanceForBandwidth(UnfreezeBalanceActuatorTest.frozenBalance);\n Assert.assertEquals(0L, receiver.getTronPower());\n UnfreezeBalanceActuatorTest.dbManager.getAccountStore().put(owner.createDbKey(), owner);\n UnfreezeBalanceActuatorTest.dbManager.getAccountStore().put(receiver.createDbKey(), receiver);\n // init DelegatedResourceCapsule\n DelegatedResourceCapsule delegatedResourceCapsule = new DelegatedResourceCapsule(owner.getAddress(), receiver.getAddress());\n delegatedResourceCapsule.setFrozenBalanceForBandwidth(UnfreezeBalanceActuatorTest.frozenBalance, (now - 100L));\n UnfreezeBalanceActuatorTest.dbManager.getDelegatedResourceStore().put(DelegatedResourceCapsule.createDbKey(ByteArray.fromHexString(UnfreezeBalanceActuatorTest.OWNER_ADDRESS), ByteArray.fromHexString(UnfreezeBalanceActuatorTest.RECEIVER_ADDRESS)), delegatedResourceCapsule);\n // init DelegatedResourceAccountIndex\n {\n DelegatedResourceAccountIndexCapsule delegatedResourceAccountIndex = new DelegatedResourceAccountIndexCapsule(owner.getAddress());\n delegatedResourceAccountIndex.addToAccount(ByteString.copyFrom(ByteArray.fromHexString(UnfreezeBalanceActuatorTest.RECEIVER_ADDRESS)));\n UnfreezeBalanceActuatorTest.dbManager.getDelegatedResourceAccountIndexStore().put(ByteArray.fromHexString(UnfreezeBalanceActuatorTest.OWNER_ADDRESS), delegatedResourceAccountIndex);\n }\n {\n DelegatedResourceAccountIndexCapsule delegatedResourceAccountIndex = new DelegatedResourceAccountIndexCapsule(receiver.getAddress());\n delegatedResourceAccountIndex.addFromAccount(ByteString.copyFrom(ByteArray.fromHexString(UnfreezeBalanceActuatorTest.OWNER_ADDRESS)));\n UnfreezeBalanceActuatorTest.dbManager.getDelegatedResourceAccountIndexStore().put(ByteArray.fromHexString(UnfreezeBalanceActuatorTest.RECEIVER_ADDRESS), delegatedResourceAccountIndex);\n }\n UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(getDelegatedContractForBandwidth(UnfreezeBalanceActuatorTest.OWNER_ADDRESS, UnfreezeBalanceActuatorTest.RECEIVER_ADDRESS), UnfreezeBalanceActuatorTest.dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n try {\n actuator.validate();\n actuator.execute(ret);\n TestCase.fail(\"cannot run here.\");\n } catch (ContractValidateException e) {\n Assert.assertTrue((e instanceof ContractValidateException));\n Assert.assertEquals(\"no frozenBalance(BANDWIDTH)\", e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertTrue((e instanceof ContractExeException));\n }\n }",
"@Test\n public void testInvalidAttemptLinks() {\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(1, 2));\n largeMaze.linkPillars(Maze.position(3, 1), Maze.position(4, 1));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(1, 3));\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(0, 3));\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(2, 3));\n largeMaze.linkPillars(Maze.position(3, 3), Maze.position(4, 3));\n largeMaze.linkPillars(Maze.position(0, 3), Maze.position(0, 4));\n\n //link row 5\n largeMaze.linkPillars(Maze.position(0, 4), Maze.position(1, 4));\n largeMaze.linkPillars(Maze.position(1, 4), Maze.position(2, 4));\n largeMaze.linkPillars(Maze.position(2, 4), Maze.position(3, 4));\n largeMaze.linkPillars(Maze.position(3, 4), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(0, 0));\n largeMaze.setEnd(Maze.position(4, 4));\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n\n //invoke attemptLinks\n try {\n testPillars = largeMaze.getPillars();\n testPillar = testPillars.get(Maze.position(3,3));\n testPillar.setPlanksLeft(0);\n attemptLinks.invoke(solver.getClass(), testPillar, largeMaze.getEnd(), testESet, testNQueue);\n } catch (Exception e) {\n fail(\"Unexpectedly could not invoke attemptLinks().\");\n }\n\n assertEquals(0, testESet.size());\n assertEquals(0, testNQueue.size());\n }"
]
| [
"0.7113509",
"0.63051337",
"0.60755634",
"0.55016726",
"0.54200673",
"0.52881193",
"0.5243504",
"0.5206455",
"0.5189131",
"0.5162679",
"0.5083207",
"0.50212884",
"0.50039124",
"0.5002779",
"0.500273",
"0.49497902",
"0.4933996",
"0.48949704",
"0.48889732",
"0.48889002",
"0.4849315",
"0.48314428",
"0.48291558",
"0.48280084",
"0.48168138",
"0.47731078",
"0.4771261",
"0.47612137",
"0.4733383",
"0.470441",
"0.467559",
"0.46464428",
"0.46015364",
"0.45802313",
"0.4549987",
"0.45415196",
"0.4518946",
"0.45118126",
"0.45103967",
"0.44984633",
"0.4496338",
"0.44929212",
"0.4469473",
"0.4459725",
"0.4454057",
"0.4447898",
"0.4435613",
"0.4426846",
"0.4416815",
"0.44142836",
"0.44130823",
"0.44121832",
"0.44034705",
"0.44031677",
"0.439354",
"0.43912494",
"0.43819758",
"0.43809184",
"0.4378673",
"0.4376167",
"0.43707138",
"0.43704903",
"0.43643752",
"0.43530047",
"0.4333542",
"0.43335092",
"0.43186292",
"0.43068737",
"0.4299223",
"0.42911482",
"0.42797676",
"0.42767638",
"0.42756903",
"0.42667767",
"0.4265276",
"0.4262687",
"0.42615464",
"0.42422736",
"0.4238871",
"0.42330194",
"0.4229613",
"0.42216074",
"0.42194068",
"0.4212623",
"0.42059928",
"0.4205811",
"0.41910663",
"0.41854456",
"0.4178895",
"0.4168235",
"0.41675982",
"0.416277",
"0.41614974",
"0.41536346",
"0.41456488",
"0.41443875",
"0.41436338",
"0.41362923",
"0.413528",
"0.41304514"
]
| 0.6566458 | 1 |
for local replicas, the replica location is assumed to be a file. | @Override
public void updateWithReplica(StorageLocation replicaLocation) {
File diskFile = null;
try {
diskFile = new File(replicaLocation.getUri());
} catch (IllegalArgumentException e) {
diskFile = null;
}
if (null == diskFile) {
setDirInternal(null);
} else {
setDirInternal(diskFile.getParentFile());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract String getFileLocation();",
"public Replica( String replica )\n {\n if ( StringTools.isEmpty( replica ) )\n {\n log.error( \"Null or empty replica are not allowed\" );\n throw new IllegalArgumentException( \"Null or empty Replica \" );\n }\n \n replica = replica.trim();\n \n int atPos = replica.indexOf( '@' );\n \n if ( atPos <= 0 )\n {\n log.error( \"The ReplicaId '@' element is missing in {}\", replica );\n throw new IllegalArgumentException( \"Replica ID not found: \" + replica );\n }\n \n int colonPos = replica.indexOf( atPos, ':' );\n \n if ( colonPos < 0 )\n {\n log.error( \"Replica port not found in {}\", replica );\n throw new IllegalArgumentException( \"Port number not found in replica : \" + replica );\n }\n \n id = new ReplicaId( replica.substring( 0, atPos ) );\n String server = replica.substring( atPos + 1, colonPos );\n int port = -1;\n \n try\n {\n port = Integer.parseInt( replica.substring( colonPos + 1 ) ) ;\n }\n catch ( NumberFormatException nfe )\n {\n log.error( \"The port value should be a value between 1 and 65535, port : {}\", new Integer( port ) );\n throw new IllegalArgumentException( \"Bad port number : \" + port );\n }\n \n try\n {\n address = new InetSocketAddress( server, port );\n }\n catch ( IllegalArgumentException iae )\n {\n log.error( \"The server address/name is invalid ({}) in replica {}\", server, replica );\n throw new IllegalArgumentException( \"The server address/name is invalid in replica \" + replica \n + \", error : \" + iae.getMessage() );\n }\n \n if ( IS_DEBUG )\n {\n log.debug( \"Created a replica {} on server {}\", id, server + ':' + port );\n }\n }",
"public int append(String filePath, byte[] bytes) throws IOException {\n\t\tint ret;\n\t\t\n\t\t// check in file cache whether such file exists\n\t\tTFSClientFile file = getFileFromCache(filePath);\n\t\tif (file == null) {\t\t// cannot find the file, try to get file info from the master\n\t\t\tret = getFileInfo(filePath);\n\t\t\t\n\t\t\tif (ret != OK)\n\t\t\t\treturn NOT_FOUND;\n\t\t\telse {\n\t\t\t\tfile = getFileFromCache(filePath);\t\t\t\t\n\t\t\t\tassert(file != null);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// file info is ready now, get the first chunkserver\n\t\tif (file.getChunkServers().length == 0) {\n\t\t\tif (trace)\n\t\t\t\tSystem.out.println(\"There is no chunk servers found.\");\n\t\t\t\n\t\t\treturn NOT_FOUND;\n\t\t}\n\t\t\n\t\tString strs[] = file.getChunkServers()[0].split(\" \");\n\t\t\n\t\tif (strs.length != 2) {\n\t\t\tif (trace)\n\t\t\t\tSystem.out.println(\"Bad chunk server address.\");\n\t\t\t\n\t\t\treturn CLIENT_ERROR;\n\t\t}\n\t\t\n\t\t\n\t\tString ip = strs[0];\n\t\tint port = 0;\n\t\ttry {\n\t\t\tport = Integer.parseInt(strs[1]);\n\t\t} catch (NumberFormatException e) {\n\t\t\tif (trace)\n\t\t\t\tSystem.out.println(\"Bad chunk server address (wrong port).\");\n\t\t\t\n\t\t\treturn CLIENT_ERROR;\n\t\t}\n\t\t\n\t\tret = writeRequest(ip, port, file.getAbsolutePath());\n\t\t\n\t\tif (ret != OK) {\n\t\t\treturn ret;\n\t\t}\n\t\t\n\t\t// at this time, the client knows what is the primary replica it should contact with\n\t\t// then it can start the write process\n\t\t\n\t\t// tell the primary replica to append\n\t\tSocket sock = new Socket(priReplicaIpAddress, priReplicaPort);\n\t\tSocketIO sockIO = new SocketIO(sock);\n\t\t\n\t\tsockIO.write((TFSClient.APPEND + \" \" + filePath + \" \" + bytes.length + \"\\r\\n\").getBytes());\n\t\tsockIO.write(bytes);\n\t\tsockIO.flush();\n\t\t\n\t\tString line = sockIO.readLine();\n\t\t\n\t\tsockIO.close();\n\t\t\n\t\tswitch (line) {\n\t\tcase STR_OK:\n\t\t\tret = OK;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tret = SERVER_ERROR;\n\t\t}\t\t\n\t\t\n\t\treturn ret;\n\t}",
"public String getLocalFilePath() {\n return loadConn.getProperty(\"filePath\");\n }",
"private static void getAllReplicaAddress(String fileName) throws IOException {\n\n\t\tSystem.out.println(\"Working Directory = \" +\n\t System.getProperty(\"user.dir\"));\n\t\tBufferedReader br = new BufferedReader(new FileReader(fileName));\n\t\ttry {\n\t\t\tString line = br.readLine();\n\t\t\t\n\t\t while(line!=null && !line.trim().equals(\"\")) {\n\t\t \tallReplicaAddrs.add(line);\n\t\t \tline = br.readLine();\n\t\t }\n\t\t \n\t\t} finally {\n\t\t br.close();\n\t\t}\n\t}",
"private static Path localTemp(Configuration conf, int taskId, int attemptId) {\n String localDirs = conf.get(\"mapreduce.cluster.local.dir\");\n Random rand = new Random(Objects.hashCode(taskId, attemptId));\n String[] dirs = localDirs.split(\",\");\n String dir = dirs[rand.nextInt(dirs.length)];\n\n try {\n return FileSystem.getLocal(conf).makeQualified(new Path(dir));\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to localize path: \" + dir, e);\n }\n }",
"Replica get(String resourceGroupName, String resourceName, String replicaName);",
"edu.usfca.cs.dfs.StorageMessages.FileLocation getFileLocation();",
"public final File getLocalFile() throws IllegalArgumentException\n {\n if (hostOrNull != null)\n {\n throw new IllegalArgumentException(\"getLocalFile can only be called on local paths.\");\n }\n return new File(path);\n }",
"File getTilePathBase();",
"public Member getCurrentTargetReplica() {\n return currentTargetReplicaAddress;\n }",
"public String getStorageLocation() {\n\t\treturn io.getFile();\n\t}",
"public List<ReplicaInfo> getReplicas() {\n return replicas;\n }",
"private ReplicaInfo createNewReplicaObj(ExtendedBlock block, FsDatasetImpl\n fsDataSetImpl) throws IOException {\n ReplicaInfo replicaInfo = fsDataSetImpl.getReplicaInfo(block);\n FsVolumeSpi destVolume = getDestinationVolume(block, fsDataSetImpl);\n return fsDataSetImpl.copyReplicaToVolume(block, replicaInfo,\n destVolume.obtainReference());\n }",
"public void setBackupServerFolderLocation(String argBackupServerFolderLoaction){\n\t backupServerFolderLocation=argBackupServerFolderLoaction;\n }",
"String getDockerFilelocation();",
"File getWorkfile();",
"public File getRessourceFile() {\r\n\t\treturn local;\r\n\t}",
"phaseI.Hdfs.DataNodeLocation getLocation();",
"private DataLocation createLocation(String fileName) throws IOException {\n SimpleURI uri = new SimpleURI(fileName);\n if (uri.getSchema().isEmpty()) {\n // Add default File scheme and wrap local paths\n String canonicalPath = new File(fileName).getCanonicalPath();\n uri = new SimpleURI(Protocol.FILE_URI.getSchema() + canonicalPath);\n }\n\n // Check host\n Resource host = Comm.getAppHost();\n String hostName = uri.getHost();\n if (hostName != null && !hostName.isEmpty()) {\n host = Resource.getResource(hostName);\n if (host == null) {\n ErrorManager.error(\"Host \" + hostName + \" not found when creating data location.\");\n }\n }\n\n // Create location\n return DataLocation.createLocation(host, uri);\n }",
"private File getConnConfigFile(){\n\t\tFile f = new File(getHomeDir(),filename);\n\t\treturn f;\n\t}",
"public HdfsCloudlet(int cloudletId, long cloudletLength, int pesNumber, long cloudletFileSize, long cloudletOutputSize,\n UtilizationModel utilizationModelCpu, UtilizationModel utilizationModelRam, UtilizationModel utilizationModelBw,\n List<String> fileList, int blockSize, int replicaNum) {\n super(cloudletId, cloudletLength, pesNumber, cloudletFileSize, cloudletOutputSize, utilizationModelCpu, utilizationModelRam, utilizationModelBw, fileList);\n this.blockSize = blockSize;\n this.replicaNum = replicaNum;\n // by default the type will be Data Node, this is because I made this change after writing all the file transfer code\n this.hdfsType = HDFS_DN;\n }",
"public static void customTest() throws IOException, NotBoundException, MessageNotFoundException {\n Client c = new Client();\n String fileName = \"file1\";\n\n char[] ss = \"[INITIAL DATA!]\".toCharArray(); // len = 15\n byte[] data = new byte[ss.length];\n for (int i = 0; i < ss.length; i++) {\n data[i] = (byte) ss[i];\n }\n\n c.write(fileName, data);\n\n c = new Client();\n ss = \"File 1 test test END\".toCharArray(); // len = 20\n data = new byte[ss.length];\n for (int i = 0; i < ss.length; i++) {\n data[i] = (byte) ss[i];\n }\n\n byte[] chunk = new byte[Configurations.CHUNK_SIZE];\n\n int seqN = data.length / Configurations.CHUNK_SIZE;\n int lastChunkLen = Configurations.CHUNK_SIZE;\n\n if (data.length % Configurations.CHUNK_SIZE > 0) {\n lastChunkLen = data.length % Configurations.CHUNK_SIZE;\n seqN++;\n }\n\n WriteAck ackMsg = c.masterStub.write(fileName);\n ReplicaServerClientInterface stub = (ReplicaServerClientInterface) registry.lookup(\"ReplicaClient\" + ackMsg.getLoc().getId());\n\n FileContent fileContent;\n @SuppressWarnings(\"unused\")\n ChunkAck chunkAck;\n //\t\tfor (int i = 0; i < seqN; i++) {\n System.arraycopy(data, 0 * Configurations.CHUNK_SIZE, chunk, 0, Configurations.CHUNK_SIZE);\n fileContent = new FileContent(fileName, chunk);\n chunkAck = stub.write(ackMsg.getTransactionId(), 0, fileContent);\n\n System.arraycopy(data, 1 * Configurations.CHUNK_SIZE, chunk, 0, Configurations.CHUNK_SIZE);\n fileContent = new FileContent(fileName, chunk);\n chunkAck = stub.write(ackMsg.getTransactionId(), 1, fileContent);\n\n // read here \n List<ReplicaLoc> locations = c.masterStub.read(fileName);\n System.err.println(\"[@CustomTest] Read1 started \");\n\n // TODO fetch from all and verify \n ReplicaLoc replicaLoc = locations.get(0);\n ReplicaServerClientInterface replicaStub = (ReplicaServerClientInterface) registry.lookup(\"ReplicaClient\" + replicaLoc.getId());\n fileContent = replicaStub.read(fileName);\n System.err.println(\"[@CustomTest] data:\");\n System.err.println(new String(fileContent.getData()));\n\n // continue write \n for (int i = 2; i < seqN - 1; i++) {\n System.arraycopy(data, i * Configurations.CHUNK_SIZE, chunk, 0, Configurations.CHUNK_SIZE);\n fileContent = new FileContent(fileName, chunk);\n chunkAck = stub.write(ackMsg.getTransactionId(), i, fileContent);\n }\n // copy the last chuck that might be < CHUNK_SIZE\n System.arraycopy(data, (seqN - 1) * Configurations.CHUNK_SIZE, chunk, 0, lastChunkLen);\n fileContent = new FileContent(fileName, chunk);\n chunkAck = stub.write(ackMsg.getTransactionId(), seqN - 1, fileContent);\n\n //commit\n ReplicaLoc primaryLoc = c.masterStub.locatePrimaryReplica(fileName);\n ReplicaServerClientInterface primaryStub = (ReplicaServerClientInterface) registry.lookup(\"ReplicaClient\" + primaryLoc.getId());\n primaryStub.commit(ackMsg.getTransactionId(), seqN);\n\n // read\n locations = c.masterStub.read(fileName);\n System.err.println(\"[@CustomTest] Read3 started \");\n\n replicaLoc = locations.get(0);\n replicaStub = (ReplicaServerClientInterface) registry.lookup(\"ReplicaClient\" + replicaLoc.getId());\n fileContent = replicaStub.read(fileName);\n System.err.println(\"[@CustomTest] data:\");\n System.err.println(new String(fileContent.getData()));\n\n }",
"public Address getFilebase() {\n return new Address(m_module.getConfiguration().getFileBase().toBigInteger());\n }",
"public int createFile(String fileName, String path, int numOfReplicas) throws IOException {\n\t\tmasterSock.write((CREATE_FILE + \" \" + fileName + \" \" + path + \" \" + numOfReplicas).getBytes());\n\t\tmasterSock.write(\"\\r\\n\".getBytes());\n\t\tmasterSock.flush();\n\t\t\n\t\tString line = null;\n\t\t\n\t\tline = masterSock.readLine();\n\t\t\n\t\tswitch (line) {\t\t\t\n\t\tcase STR_EXISTED:\n\t\t\treturn EXISTED;\n\t\tcase STR_CLIENT_ERROR:\n\t\t\treturn CLIENT_ERROR;\n\t\tcase STR_SERVER_ERROR:\n\t\t\treturn SERVER_ERROR;\n\t\tcase STR_REPLICA_EXCEED:\n\t\t\treturn REPLICA_EXCEED;\n\t\tdefault:\n\t\t\tif (line.contains(STR_OK)) {\n\t\t\t\tString[] strs = line.split(\" \");\n\t\t\t\t\n\t\t\t\t// set up the file item\n\t\t\t\tif (trace)\n\t\t\t\t\tSystem.out.println(\"File chunkservers: \");\n\t\t\t\t\n\t\t\t\tTFSClientFile file = new TFSClientFile(path + \"/\" + fileName);\t\t\t\t\n\t\t\t\tString[] servers = new String[(strs.length - 1) / 2];\n\t\t\t\tfor (int i = 0; i < servers.length; i++) {\n\t\t\t\t\tservers[i] = strs[2 * i + 1] + \" \" + strs[2 * i + 2];\n\t\t\t\t\t\n\t\t\t\t\tif (trace)\n\t\t\t\t\t\tSystem.out.println(\"\\t\" + servers[i]);\n\t\t\t\t}\t\t\t\t\n\t\t\t\tfile.setChunkServers(servers);\n\t\t\t\t\n\t\t\t\t// add to file cache for future reference\n\t\t\t\tfilesCache.add(file);\n\t\t\t\t\n\t\t\t\treturn OK;\n\t\t\t} else\n\t\t\t\treturn SERVER_ERROR;\n\t\t}\n\t}",
"@FameProperty(name = \"replicas\", derived = true)\n public Replica getReplicas() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }",
"public String getLocationPath();",
"private static void readFileOnClient(FileStore.Client client) throws SystemException, TException {\n String fileName = \"sample.txt\";\n NodeID nodeId = client.findSucc(getSHA(fileName));\n TTransport transport = new TSocket(nodeId.getIp(), nodeId.getPort());\n transport.open();\n\n TProtocol protocol = new TBinaryProtocol(transport);\n FileStore.Client readFileClient = new FileStore.Client(protocol);\n\n RFile rFile = readFileClient.readFile(fileName);\n System.out.println(\"Filename - \" + rFile.getMeta().getFilename());\n System.out.println(\"Version Number - \" + rFile.getMeta().getVersion());\n System.out.println(\"Content - \" + rFile.getContent());\n transport.close();\n }",
"public Path getRemoteRepositoryBaseDir();",
"public File getFile()\r\n \t{\r\n \t\tFile result = null;\r\n \t\t\r\n \t\tString hostName = getAuthority();\r\n \t\t\r\n \t\tif((hostName == null) || hostName.equals(\"\") || hostName.equalsIgnoreCase(\"localhost\"))\r\n \t\t{\r\n \t\t\tString filePath = getPath();\r\n \t\t\tresult = new File(filePath);\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tthrow new RuntimeException(\"Can't resolve files on remote host machines\");\r\n \t\t}\r\n \t\t\r\n \t\treturn result;\r\n \t}",
"public FileServer(){\n\t\tfilePath = new ConcurrentHashMap<String, String>();\n\t}",
"private static void generateReplica() {\r\n\t\tArrayList<String> rep = new ArrayList<String>();\r\n\t\trep.add(NamespaceMap.get(5));\r\n\t\trep.add(NamespaceMap.get(6));\r\n\t\tReplicationMap.put(1, rep);\r\n\t\trep.set(0, NamespaceMap.get(6));\r\n\t\trep.set(1, NamespaceMap.get(1));\r\n\t\tReplicationMap.put(2, rep);\r\n\t\trep.set(0, NamespaceMap.get(1));\r\n\t\trep.set(1, NamespaceMap.get(2));\r\n\t\tReplicationMap.put(3, rep);\r\n\t\trep.set(0, NamespaceMap.get(2));\r\n\t\trep.set(1, NamespaceMap.get(3));\r\n\t\tReplicationMap.put(4, rep);\r\n\t\trep.set(0, NamespaceMap.get(3));\r\n\t\trep.set(1, NamespaceMap.get(4));\r\n\t\tReplicationMap.put(5, rep);\r\n\t\trep.set(0, NamespaceMap.get(4));\r\n\t\trep.set(1, NamespaceMap.get(5));\r\n\t\tReplicationMap.put(6, rep);\r\n\t}",
"public String getBackupServerFolderLocation(){\n\t return backupServerFolderLocation;\n }",
"private void requestFile(NapFile file, Client fileOwner) {\r\n\t\ttry {\r\n\r\n\t\t\tFile localCopy = new File(\"./SharedFiles1/\" + file.FILE_NAME);\r\n\r\n\t\t\tif (localCopy.createNewFile()) {\r\n\t\t\t\tcmdDisplay.setText(cmdDisplay.getText() + \"\\n\" + \"Connecting to \" + fileOwner.IP.toString().substring(1)\r\n\t\t\t\t\t\t+ \":\" + fileOwner.PORT_NUM);\r\n\t\t\t\tSocket OwnerSocket = Net_Util.connectToServer(fileOwner.IP.toString().substring(1), fileOwner.PORT_NUM);\r\n\t\t\t\tNet_Util.send(OwnerSocket, file.FILE_NAME);\r\n\t\t\t\tString[] contents = Net_Util.recStrArr(OwnerSocket);\r\n\r\n\t\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(localCopy));\r\n\t\t\t\tfor (String lineContent : contents) {\r\n\t\t\t\t\twriter.write(lineContent + \"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\twriter.close();\r\n\t\t\t\twriter = new BufferedWriter(new FileWriter(\"./SharedFiles1/FileList.txt\", true));\r\n\t\t\t\twriter.newLine();\r\n\t\t\t\twriter.write(file.FILE_NAME + \"::\" + file.DESCRIPTION);\r\n\t\t\t\twriter.close();\r\n\r\n\t\t\t\tNet_Util.send(serverSocket, \"register \" + file.FILE_NAME);\r\n\r\n\t\t\t\tcmdDisplay.setText(cmdDisplay.getText() + \"\\n\" + \"File \" + file.FILE_NAME + \" retrieved sucessfully\");\r\n\t\t\t} else {\r\n\t\t\t\tcmdDisplay.setText(cmdDisplay.getText() + \"\\n\" + \"You already have a file with this name\");\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tcmdDisplay.setText(cmdDisplay.getText() + \"\\n\" + \"Couldn't send connect to file owner\");\r\n\t\t}\r\n\t}",
"java.lang.String getFileLoc();",
"@Test\n public void testAysncDiskServiceDeleteReplica()\n throws IOException, InterruptedException, TimeoutException {\n HdfsConfiguration config = new HdfsConfiguration();\n // Bump up replication interval.\n config.setInt(DFSConfigKeys.DFS_NAMENODE_REDUNDANCY_INTERVAL_SECONDS_KEY, 10);\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(config).numDataNodes(3).build();\n DistributedFileSystem fs = cluster.getFileSystem();\n String bpid = cluster.getNamesystem().getBlockPoolId();\n DataNodeFaultInjector oldInjector = DataNodeFaultInjector.get();\n final Semaphore semaphore = new Semaphore(0);\n try {\n cluster.waitActive();\n final DataNodeFaultInjector injector = new DataNodeFaultInjector() {\n @Override\n public void delayDeleteReplica() {\n // Lets wait for the remove replica process.\n try {\n semaphore.acquire(1);\n } catch (InterruptedException e) {\n // ignore.\n }\n }\n };\n DataNodeFaultInjector.set(injector);\n\n // Create file.\n Path path = new Path(\"/testfile\");\n DFSTestUtil.createFile(fs, path, 1024, (short) 3, 0);\n DFSTestUtil.waitReplication(fs, path, (short) 3);\n LocatedBlock lb = DFSTestUtil.getAllBlocks(fs, path).get(0);\n ExtendedBlock extendedBlock = lb.getBlock();\n DatanodeInfo[] loc = lb.getLocations();\n assertEquals(3, loc.length);\n\n // DN side.\n DataNode dn = cluster.getDataNode(loc[0].getIpcPort());\n final FsDatasetImpl ds = (FsDatasetImpl) DataNodeTestUtils.getFSDataset(dn);\n List<Block> blockList = Lists.newArrayList(extendedBlock.getLocalBlock());\n assertNotNull(ds.getStoredBlock(bpid, extendedBlock.getBlockId()));\n ds.invalidate(bpid, blockList.toArray(new Block[0]));\n\n // Test get blocks and datanodes.\n loc = DFSTestUtil.getAllBlocks(fs, path).get(0).getLocations();\n assertEquals(3, loc.length);\n List<String> uuids = Lists.newArrayList();\n for (DatanodeInfo datanodeInfo : loc) {\n uuids.add(datanodeInfo.getDatanodeUuid());\n }\n assertTrue(uuids.contains(dn.getDatanodeUuid()));\n\n // Do verification that the first replication shouldn't be deleted from the memory first.\n // Because the namenode still contains this replica, so client will try to read it.\n // If this replica is deleted from memory, the client would got an ReplicaNotFoundException.\n assertNotNull(ds.getStoredBlock(bpid, extendedBlock.getBlockId()));\n\n // Make it resume the removeReplicaFromMem method.\n semaphore.release(1);\n\n // Waiting for the async deletion task finish.\n GenericTestUtils.waitFor(() ->\n ds.asyncDiskService.countPendingDeletions() == 0, 100, 1000);\n\n // Sleep for two heartbeat times.\n Thread.sleep(config.getTimeDuration(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY,\n DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_DEFAULT,\n TimeUnit.SECONDS, TimeUnit.MILLISECONDS) * 2);\n\n // Test get blocks and datanodes again.\n loc = DFSTestUtil.getAllBlocks(fs, path).get(0).getLocations();\n assertEquals(2, loc.length);\n uuids = Lists.newArrayList();\n for (DatanodeInfo datanodeInfo : loc) {\n uuids.add(datanodeInfo.getDatanodeUuid());\n }\n // The namenode does not contain this replica.\n assertFalse(uuids.contains(dn.getDatanodeUuid()));\n\n // This replica has deleted from datanode memory.\n assertNull(ds.getStoredBlock(bpid, extendedBlock.getBlockId()));\n } finally {\n cluster.shutdown();\n DataNodeFaultInjector.set(oldInjector);\n }\n }",
"public A4_MUX (String inputLocation) throws IOException{\r\n fileLocation = inputLocation.concat(\"server.info\");\r\n filePath = Paths.get(fileLocation); \r\n }",
"@Override\n\tprotected String getFileArress() {\n\t\treturn fileAddress;\n\t}",
"private String db4oDBFullPath(Context ctx) {\t\n\t\treturn ctx.getDir(\"data\", 0) + \"/\" + LOCAL_SERVER;\n\t\n\t}",
"public abstract String getFullPath();",
"private boolean isLocalRepository() {\n\r\n File file = new File(m_Path.toString() + \"/.magit/Remote\");\r\n return file.exists();\r\n }",
"private File getSnapshotFileForLocation(Location location) {\n // Convert location to chunk coordinates.\n int chunkX = location.getBlockX() >> 4;\n int chunkZ = location.getBlockZ() >> 4;\n\n // Construct the snapshot filename based on chunk coordinates.\n String snapshotFileName = chunkX + \"_\" + chunkZ + \"_16.zip\";\n\n // Fetch the snapshots' folder.\n File snapshotsFolder = new File(TownyWars.getInstance().getDataFolder(), \"snapshots\");\n\n // Construct the full path to the snapshot file.\n File snapshotFile = new File(snapshotsFolder, snapshotFileName);\n\n return snapshotFile;\n }",
"static void respawnReplicaServers(Master master) throws IOException {\n System.out.println(\"[@main] respawning replica servers \");\n // TODO make file names global\n BufferedReader br = new BufferedReader(new FileReader(\"repServers.txt\"));\n int n = Integer.parseInt(br.readLine().trim());\n ReplicaLoc replicaLoc;\n String s;\n\n for (int i = 0; i < n; i++) {\n s = br.readLine().trim();\n replicaLoc = new ReplicaLoc(i, s.substring(0, s.indexOf(':')), true);\n ReplicaServer rs = new ReplicaServer(i, \"./\");\n\n ReplicaInterface stub = (ReplicaInterface) UnicastRemoteObject.exportObject(rs, 0);\n registry.rebind(\"ReplicaClient\" + i, stub);\n\n master.registerReplicaServer(replicaLoc, stub);\n\n System.out.println(\"replica server state [@ main] = \" + rs.isAlive());\n }\n br.close();\n }",
"public interface StorageService {\n\n /**\n * Return the ReplicatSet configuration (list of services able to pin a file)\n * @return ReplicaSet List of PinningService\n */\n Set<PinningService> getReplicaSet();\n \n /**\n * Write content on the storage layer\n * @param content InputStream\n * @param noPin Disable persistence, require to pin/persist asynchrounsly (can improve the writing performance)\n * @return Content ID (hash, CID)\n */\n String write(InputStream content, boolean noPin);\n\n /**\n * Write content on the storage layer\n * @param content Byte array\n * @param noPin Disable persistence, require to pin/persist asynchrounsly (can improve the writing performance)\n * @return Content ID (hash, CID)\n */\n String write(byte[] content, boolean noPin);\n\n /**\n * Read content from the storage layer and write it in a ByteArrayOutputStream\n * @param id Content ID (hash, CID\n * @return content\n */\n OutputStream read(String id);\n \n /**\n * Read content from the storage layer and write it the OutputStream provided\n * @param id Content ID (hash, CID\n * @param output OutputStream to write content to\n * @return Outputstream passed as argument\n */\n OutputStream read(String id, OutputStream output);\n}",
"@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }",
"private static void writeFileOnClient(FileStore.Client client) throws SystemException, TException, IOException {\n String fileName = \"sample.txt\";\n\n String content = \"Content\";\n\n try {\n\n RFile rFile = new RFile();\n RFileMetadata rFileMetaData = new RFileMetadata();\n\n rFileMetaData.setFilename(fileName);\n rFileMetaData.setFilenameIsSet(true);\n\n rFile.setMeta(rFileMetaData);\n rFile.setMetaIsSet(true);\n\n rFile.setContent(content);\n rFile.setContentIsSet(true);\n\n client.writeFile(rFile);\n\n } catch (TException x) {\n throw x;\n }\n }",
"@Override\r\n protected String getDiskLocation()\r\n {\r\n return dataFile.getFilePath();\r\n }",
"public File referenceDestinationYAMLFile() {\n return new File(getDestinationFolder().getAbsolutePath() + File.separator +\n referenceTomcatInstanceFolder() + File.separator + referenceTomcatInstanceYAML());\n }",
"public WorkingCopy(final String address, final String root) {\n \t\tsuper(address, root);\n \n \t\tFile f = new File(root+ File.separatorChar + this.metadata_filename);\n \t\tif(f.exists())\n \t\t\tthis.setFilelist(this.readMetadata(this.getRoot()));\n \t}",
"private SystemMetadata populateInitialReplicaList(SystemMetadata systemMetadata) throws SynchronizationFailed, RetryableException, UnrecoverableException {\n\n try {\n logger.debug(task.taskLabel() + \" entering populateInitialReplicaList\");\n /*\n * DataONE Bug #2603 Synchronization should delete existing replicas on create\n */\n List<Replica> replicaList = new ArrayList<Replica>();\n systemMetadata.setReplicaList(replicaList);\n\n Replica originalReplica = new Replica();\n NodeReference originalReplicaReference = new NodeReference();\n originalReplicaReference.setValue(task.getNodeId());\n originalReplica.setReplicaMemberNode(originalReplicaReference);\n originalReplica.setReplicationStatus(ReplicationStatus.COMPLETED);\n originalReplica.setReplicaVerified(new Date());\n systemMetadata.addReplica(originalReplica);\n\n logger.debug(task.taskLabel() + \" Included replica for original MN\");\n // data objects are not fully synchronized, only their metadata is\n // synchronized,\n // only set valid science metadata formats as having been replicated\n logger.debug(task.taskLabel() + \" Get Object Format\");\n ObjectFormat objectFormat = nodeCommunications.getCnCore().getFormat(\n systemMetadata.getFormatId());\n if ((objectFormat != null) && !(objectFormat.getFormatType().equalsIgnoreCase(\"DATA\"))) {\n NodeReference cnReference = new NodeReference();\n cnReference.setValue(cnIdentifier);\n Replica cnReplica = new Replica();\n cnReplica.setReplicaMemberNode(cnReference);\n cnReplica.setReplicationStatus(ReplicationStatus.COMPLETED);\n cnReplica.setReplicaVerified(new Date());\n systemMetadata.addReplica(cnReplica);\n if (logger.isDebugEnabled()) \n logger.debug(task.taskLabel()\n + \" Added CN as replica because formatType \" + objectFormat.getFormatType()\n + \" is not DATA\");\n }\n\n } catch (ServiceFailure ex) {\n logger.error(buildStandardLogMessage(ex, \"serviceFailure while finding format:\" + ex.getDescription()),ex);\n V2TransferObjectTask.extractRetryableException(ex);\n throw new UnrecoverableException(task.getPid() + \" - from cn.getFormat\", ex);\n\n } catch (NotFound ex) {\n logger.error(buildStandardLogMessage(ex, \"format NotFound: \" + ex.getDescription()),ex);\n throw SyncFailedTask.createSynchronizationFailed(task.getPid(), \"cn.Core could not find the format\", ex);\n\n } catch (NotImplemented ex) {\n logger.error(buildStandardLogMessage(ex, ex.getDescription()),ex);\n throw new UnrecoverableException(task.getPid() + \" - Unexpectedly, cn.getFormat returned NotImplemented!!\", ex);\n\n } catch (Exception ex) {\n logger.error(buildStandardLogMessage(ex, ex.getMessage()),ex);\n throw new UnrecoverableException(task.getPid() + \" - from cn.getFormat\", ex);\n\n }\n return systemMetadata;\n }",
"private File getIOFile() {\n \t\tIPath location = resource.getLocation();\n \t\tif(location!=null) {\n \t\t\treturn location.toFile();\n \t\t}\n \t\treturn null;\n \t}",
"public File getWorkingParent()\n {\n return validatePath(ServerSettings.getInstance().getProperty(ServerSettings.WORKING_PARENT));\n }",
"edu.usfca.cs.dfs.StorageMessages.FileLocationOrBuilder getFileLocationOrBuilder();",
"public ClientLogic(String host, String file) {\n\t\t\thostName = host;\n\t\t\tfileName = file;\n\t\t}",
"public File referenceSourceYAMLFile() {\n return new File(getDestinationFolder().getAbsolutePath() + File.separator + referenceTomcatInstanceYAML());\n }",
"public FileService(@Value(\"${armory.filelocation}\") String saveLocation) {\n mapLines = Collections.synchronizedSortedMap(new TreeMap<>());\n this.saveLocation = saveLocation;\n checkIfLocationExists();\n }",
"@Test\n public void testFileNotFound() throws Exception {\n final Coordinator coordinator = new Coordinator(2, 2, 100000);\n try {\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n coordinator.startCoordinatorService();\n }\n });\n thread.start();\n Thread.sleep(1000);\n\n // server 1\n final int port = Utilities.getRandomPort();\n Thread thread2 = new Thread(new Runnable() {\n @Override\n public void run() {\n FileServer fileServer = new FileServer(\"localhost\");\n fileServer.startService(\"localhost\", port, \"localhost\");\n }\n });\n thread2.start();\n Thread.sleep(1000);\n\n TTransport nodeSocket = new TSocket(\"localhost\", port);\n nodeSocket.open();\n TProtocol protocol = new TBinaryProtocol(nodeSocket);\n FileServerEndPoints.Client client = new FileServerEndPoints.Client(protocol);\n\n // server 2\n final int port2 = Utilities.getRandomPort();\n Thread thread3 = new Thread(new Runnable() {\n @Override\n public void run() {\n FileServer fileServer = new FileServer(\"localhost\");\n fileServer.startService(\"localhost\", port2, \"localhost\");\n }\n });\n thread3.start();\n Thread.sleep(1000);\n\n ReadResponse readResponse = client.read(\"foo.txt\");\n assertEquals(Status.FILE_NOT_FOUND, readResponse.getStatus());\n\n coordinator.stopCoordinatorService();\n } finally {\n // to make sure 9090 port is closed before next test run\n coordinator.stopCoordinatorService();\n }\n }",
"public StorageServer(File root)\n {\n this(root, 0, 0);\n }",
"@Test\r\n public void testReadWhenShared() {\n System.out.println(\"Test : Alice shares her file with Bob and Bob can read it\");\r\n System.out.println();\r\n String userId = \"Alice\";\r\n String filePath = \"/home/Alice/shared/Af1.txt\";\r\n String targetUserId = \"Bob\";\r\n String fileName = \"Af1.txt\";\r\n File file = new File (filePath, userId, fileName);\r\n List<File> fileList = FileList.getFileList();\r\n fileList.add(file);\r\n service.shareFile(userId, targetUserId, filePath);\r\n try {\r\n assertNotNull(service.readFile(targetUserId, filePath));\r\n } catch (Exception e) {\r\n assertFalse(\"Should not throw any exception\", true);\r\n }\r\n System.out.println();\r\n\r\n }",
"TrackerClient locate(String path);",
"public String getFilePath() {\n return theRemoteFilePath;\n }",
"private static void write(Client client, String user, String filename,String fileContent) throws SystemException, TException {\n\t\t\n\t\t\n\t\tString keyString = user + \":\" + filename;\n\t\tString key = sha_256(keyString);\n\t\t\n\t\tSystem.out.println(\"Client Locating server\");\n\t\tNodeID succNode = client.findSucc(key);\n\t\tString predIP = succNode.ip;\n\t\tint predPort = succNode.port;\n\t\tSystem.out.println(\"Client located server : \"+predPort);\n\n\t\ttry {\n\t\t\tTSocket transport = new TSocket(predIP, predPort);\n\t\t\ttransport.open();\n\t\t\tTBinaryProtocol protocol = new TBinaryProtocol(transport);\n\t\t\tClient client1 = new chord_auto_generated.FileStore.Client(protocol);\n\t\t\tSystem.out.println(\"Writting file location : \" + predPort);\n\t\t\tRFile rFile = new RFile();\n\t\t\t// rFile.setContent(\"More Updated Files content\");\n\t\t\trFile.setContent(fileContent);\n\t\t\tRFileMetadata localMeta = new RFileMetadata();\n\t\t\tlocalMeta.setFilename(filename);\n\t\t\tlocalMeta.setOwner(user); // Is this the client or server probably Client\n\t\t\trFile.setMeta(localMeta);\n\t\t\tSystem.out.println(\"Writting file Starting----------\");\n\t\t\tclient1.writeFile(rFile);\n\t\t\tSystem.out.println(\"Writting file Done----------\");\n\t\t\ttransport.close();\n\t\t} catch (TTransportException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public String getFileTransferServer();",
"public String getConsistencyFilePath()\n {\n String consistency_file_path = getPreferenceStore().getString(CONSISTENCY_FILE_PATH);\n return consistency_file_path;\n }",
"protected void setBaseData(File location, String poolName, boolean readOnly) {\n if (poolName == null || \"\".equals(poolName)) {\n throw new IllegalArgumentException(\"The poolName must not be null or the empty string\");\n }\n try {\n checkLocation(location, poolName);\n } catch (IOException e) {\n throw new IllegalArgumentException(String.format(\n \"setBaseData: Unable to create folder '%s' for pool '%s'\", location, poolName), e);\n }\n this.location = location;\n this.poolName = poolName;\n this.readOnly = readOnly;\n log.trace(String.format(\n \"Assigned base data location '%s', pool name '%s' and readOnly %s\", location, poolName, readOnly));\n }",
"private Path createMobStoreFile(String family) throws IOException {\n return createMobStoreFile(HBaseConfiguration.create(), family);\n }",
"public static MongoDbReplicaSet mongoDbReplicaSet() {\n // will be used only in environment with docker desktop\n var portResolver = ParsingPortResolver.parseProperty(MONGO_DOCKER_DESKTOP_PORT_PROPERTY, MONGO_DOCKER_DESKTOP_PORT_DEFAULT);\n var replicaSize = Integer.parseInt(System.getProperty(MONGO_REPLICA_SIZE, \"1\"));\n\n return MongoDbReplicaSet.replicaSet()\n .memberCount(replicaSize)\n .portResolver(portResolver)\n .build();\n }",
"public FileLocation(File file) {\n this(file, -1, -1);\n }",
"public FileBean getFullFileBean(){\r\n\t\t\r\n\t\ttry {\r\n\t\t\treturn new FileBean(new File(getLocation()));\r\n\t\t} catch (FileNotFoundException | UnsupportedEncodingException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tFileBean temp = new FileBean();\r\n\t\t\ttemp.setLocation(\"error\");\r\n\t\t\treturn temp;\r\n\t\t}\r\n\t}",
"public String getLocalBasePath() {\n\t\treturn DataManager.getLocalBasePath();\n\t}",
"public String getLogfileLocation() {\n return logfileLocation;\n }",
"private boolean isLocalFile(Uri uri) {\n String auth = uri.getHost();\n\n if (auth.equals(\"localhost\") || uri.getScheme().equals(\"file\")) {\n return true;\n }\n return false;\n }",
"@Override\n protected int minimumNumberOfReplicas() {\n return 1;\n }",
"public DBMaker useRandomAccessFile(){\n this.useRandomAccessFile = true;\n return this;\n }",
"void delete(String resourceGroupName, String resourceName, String replicaName);",
"private ReplicaInfo createNewReplicaObjWithLink(ExtendedBlock block,\n FsDatasetImpl fsDataSetImpl) throws IOException {\n ReplicaInfo replicaInfo = fsDataSetImpl.getReplicaInfo(block);\n FsVolumeSpi destVolume = getDestinationVolume(block, fsDataSetImpl);\n return fsDataSetImpl.moveReplicaToVolumeOnSameMount(block, replicaInfo,\n destVolume.obtainReference());\n }",
"public void testGetFileForLocation() {\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tassertTrue(\"1.0\", root.getFileForLocation(root.getLocation()) == null);\n \t}",
"private String getLocatorYamlFilePath(HashMap confMap) {\n return confMap.get(\"LocatorFile\").toString();\n }",
"public abstract ReplicationFactor getReplicationFactor();",
"public String getWorkingDataFile()\n\t{\n\t return workingDataFileName;\n\t}",
"private void recover() throws IOException, NumberFormatException,\n\t\t\tNotBoundException {\n\t\tFileReader fileReader = new FileReader(registryBackup);\n\n\t\t// Always wrap FileReader in BufferedReader.\n\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\t\tString line = null;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\tlist.add(line);\t\n\t\t}\n\t\t// Always close files.\n\t\tbufferedReader.close();\n\n\t\tPrintWriter writer = new PrintWriter(registryBackup);\n\t\twriter.print(\"\");\n\t\twriter.close();\n\t\t\n\t\tfor(String conInfo : list){\n\t\tString[] split = conInfo.split(\" \");\n\t\ttry {\n\t\t\tthis.addReplica(split[0], Integer.parseInt(split[1]));\n\t\t} catch (Exception ex) {\n\t\t\tprint(ex.getMessage());\n\t\t}\n\t\t}\n\t}",
"String getUserDatabaseFilePath();",
"@ApiModelProperty(example = \"2.0\", required = true, value = \"The current minimal ammount of replicas\")\n public BigDecimal getReplicas() {\n return replicas;\n }",
"public void gettingDesktopPath() {\n FileSystemView filesys = FileSystemView.getFileSystemView();\n File[] roots = filesys.getRoots();\n homePath = filesys.getHomeDirectory().toString();\n System.out.println(homePath);\n //checking if file existing on that location\n pathTo = homePath + \"\\\\SpisakReversa.xlsx\";\n }",
"File getDefaultFile();",
"public FSLockWithShared(File baseFile) {\n file = baseFile;\n }",
"java.lang.String getMountPath();",
"public URI getRecoveryFile() {\n return recoveryFile;\n }",
"public void setLocalPath(@NotNull FilePath localPath) { this.myLocalPath = localPath; }",
"FsPath baseDir();",
"private void notifyReplicaNode(SystemMetadata cnSystemMetadata, NodeReference nodeId)\n throws InvalidToken, NotAuthorized, NotImplemented, ServiceFailure, NotFound, InvalidRequest {\n\n // Characterize the replica MemberNode\n Node replicaNode = nodeCommunications.getNodeRegistryService().getNode(nodeId);\n if (!replicaNode.getType().equals(NodeType.MN)) \n return; //quietly\n \n \n boolean isV1Tier3 = false;\n boolean isV2Tier3 = false;\n boolean hasTier3 = false;\n // Find out if a tier 3 node, if not then do not callback since it is not implemented\n for (Service service : replicaNode.getServices().getServiceList()) {\n if (service.getName() != null && service.getName().equals(\"MNStorage\") && service.getAvailable()) {\n if (service.getVersion().equalsIgnoreCase(\"V1\")) {\n isV1Tier3 = true;\n hasTier3 = true;\n } else if (service.getVersion().equalsIgnoreCase(\"V2\")) {\n isV2Tier3 = true;\n hasTier3 = true;\n }\n }\n }\n if (!hasTier3)\n return; //quietly\n \n // If this far, notify the replicaNode\n \n // removed the sanity checks on notification - there isn't a clear reason for them, \n // and more likely to fail for trivial reasons (NPEs, IOExceptions) and cause some trouble. \n // (was added 11/11/2011, part of #1979, today is 10/22/2015)\n // (the code used to retrieve the systemMetadata from the replica node\n // and make sure the modified time was different)\n \n \n NodeComm nodeComm = null;\n try {\n // get a nodeComm to occupy one of the communication slots in the pool\n // but it's going to be simpler logic to ignore existing MnRead from\n // the NodeComm, and get an MNode from a D1Client instead\n // TODO: this should be refactored to allow use of mock objects for\n // unit testing (we shouldn't be going outside of the NodeComm bundle)\n nodeComm = NodeCommSyncObjectFactory.getInstance().getNodeComm(nodeId);\n \n if (isV2Tier3) {\n org.dataone.client.v2.itk.D1Client.getMN(replicaNode.getBaseURL())\n .systemMetadataChanged(session, \n cnSystemMetadata.getIdentifier(),\n cnSystemMetadata.getSerialVersion().longValue(), \n cnSystemMetadata.getDateSysMetadataModified());\n logger.info(buildStandardLogMessage(null,\" Notified (v2) \" + nodeId.getValue()));\n } \n else if (isV1Tier3) {\n org.dataone.client.v1.itk.D1Client.getMN(replicaNode.getBaseURL())\n .systemMetadataChanged(session, \n cnSystemMetadata.getIdentifier(),\n cnSystemMetadata.getSerialVersion().longValue(), \n cnSystemMetadata.getDateSysMetadataModified());\n logger.info(buildStandardLogMessage(null,\" Notified (v1) \" + nodeId.getValue()));\n }\n } catch (NodeCommUnavailable e) {\n throw new ServiceFailure(\"0000\", \"In notifyReplicaNode: \" + e.getMessage());\n } finally {\n if (nodeComm != null)\n nodeComm.setState(NodeCommState.AVAILABLE);\n }\n }",
"public String getRemoteFileName() {\n\t\treturn this.reader.getRemoteFileName();\n\t}",
"String getFullWorkfileName();",
"static public File getLatestPlatformLocation(){\n Iterator i = serverLocationAndClassLoaderMap.entrySet().iterator();\n File ret =null;\n while (i.hasNext()){\n Map.Entry e = (Map.Entry)i.next();\n String loc = (String)e.getKey();\n File possibleOne = new File(loc);\n if (ret==null){\n ret =possibleOne;\n }\n if (isGlassFish(possibleOne)){\n ret =possibleOne;\n }\n }\n return ret;\n \n }",
"private boolean hasExistingReplica(String collection, String shard, String node) throws IOException, SolrServerException {\n \n CollectionAdminRequest.ClusterStatus statusRequest = new CollectionAdminRequest.ClusterStatus();\n statusRequest.setCollectionName(collection);\n NamedList<Object> response = statusRequest.process(solr).getResponse();\n\n HashMap<String, Object> collectionObj = (HashMap<String, Object>) response.findRecursive(\"cluster\", \"collections\", collection);\n HashMap<String, Object> replicasObj = get(get(get(collectionObj, \"shards\"), shard), \"replicas\");\n for (String key : replicasObj.keySet()) {\n HashMap<String, Object> replica = get(replicasObj, key);\n String nodeName = (String)replica.get(\"node_name\");\n if (nodeName.equals(node)) return true;\n }\n return false;\n }",
"File getWorkingDirectory();",
"public void setJobFilePath(File file) {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n if (file != null) {\n prefs.put(powerdropshipDir, file.getPath());\n\n primaryStage.setTitle(\"PowerDropship - \" + file.getName());\n } else {\n prefs.remove(powerdropshipDir);\n\n primaryStage.setTitle(\"PowerDropship\");\n }\n }",
"@Test\n public void testReplicaMapAfterDatanodeRestart() throws Exception {\n Configuration conf = new HdfsConfiguration();\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf, new File(GenericTestUtils.getRandomizedTempPath())).nnTopology(MiniDFSNNTopology.simpleFederatedTopology(2)).build();\n try {\n cluster.waitActive();\n NameNode nn1 = cluster.getNameNode(0);\n NameNode nn2 = cluster.getNameNode(1);\n Assert.assertNotNull(\"cannot create nn1\", nn1);\n Assert.assertNotNull(\"cannot create nn2\", nn2);\n // check number of volumes in fsdataset\n DataNode dn = cluster.getDataNodes().get(0);\n FsDatasetImpl dataSet = ((FsDatasetImpl) (DataNodeTestUtils.getFSDataset(dn)));\n List<FsVolumeSpi> volumes = null;\n try (FsDatasetSpi.FsVolumeReferences referredVols = dataSet.getFsVolumeReferences()) {\n // number of volumes should be 2 - [data1, data2]\n Assert.assertEquals(\"number of volumes is wrong\", 2, referredVols.size());\n volumes = new ArrayList(referredVols.size());\n for (FsVolumeSpi vol : referredVols) {\n volumes.add(vol);\n }\n }\n ArrayList<String> bpList = new ArrayList(Arrays.asList(cluster.getNamesystem(0).getBlockPoolId(), cluster.getNamesystem(1).getBlockPoolId()));\n Assert.assertTrue(\"Cluster should have 2 block pools\", ((bpList.size()) == 2));\n createReplicas(bpList, volumes, cluster.getFsDatasetTestUtils(dn));\n ReplicaMap oldReplicaMap = new ReplicaMap(new AutoCloseableLock());\n oldReplicaMap.addAll(dataSet.volumeMap);\n cluster.restartDataNode(0);\n cluster.waitActive();\n dn = cluster.getDataNodes().get(0);\n dataSet = ((FsDatasetImpl) (dn.getFSDataset()));\n testEqualityOfReplicaMap(oldReplicaMap, dataSet.volumeMap, bpList);\n } finally {\n cluster.shutdown();\n }\n }",
"@Test(timeout=20000)\n public void testWithReplicationFactorAsOne() throws Exception {\n Configuration conf = new HdfsConfiguration();\n conf.setLong(DFSConfigKeys.DFS_BLOCKREPORT_INTERVAL_MSEC_KEY, 1000L);\n conf.set(DFSConfigKeys.DFS_NAMENODE_RECONSTRUCTION_PENDING_TIMEOUT_SEC_KEY, Integer.toString(2));\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build();\n FileSystem fs = cluster.getFileSystem();\n final FSNamesystem namesystem = cluster.getNamesystem();\n\n try {\n final Path fileName = new Path(\"/foo1\");\n DFSTestUtil.createFile(fs, fileName, 2, (short) 2, 0L);\n DFSTestUtil.waitReplication(fs, fileName, (short) 2);\n\n ExtendedBlock block = DFSTestUtil.getFirstBlock(fs, fileName);\n corruptBlock(cluster, fs, fileName, 0, block);\n\n DFSTestUtil.waitReplication(fs, fileName, (short) 1);\n\n assertEquals(1, countReplicas(namesystem, block).liveReplicas());\n assertEquals(1, countReplicas(namesystem, block).corruptReplicas());\n\n namesystem.setReplication(fileName.toString(), (short) 1);\n\n // wait for 3 seconds so that all block reports are processed.\n for (int i = 0; i < 10; i++) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException ignored) {\n }\n if (countReplicas(namesystem, block).corruptReplicas() == 0) {\n break;\n }\n }\n\n assertEquals(1, countReplicas(namesystem, block).liveReplicas());\n assertEquals(0, countReplicas(namesystem, block).corruptReplicas());\n\n } finally {\n cluster.shutdown();\n }\n }",
"public LocalFileConfig(ServicesContainer services) {\n this.services = services;\n String localfilePropertyValue = System.getProperty(\"cashmanager.config.localfile\");\n if (localfilePropertyValue != null) {\n this.filePathAString = localfilePropertyValue;\n }\n }"
]
| [
"0.5477617",
"0.5430574",
"0.53795457",
"0.5253207",
"0.5131484",
"0.5121071",
"0.5112115",
"0.50835073",
"0.50716347",
"0.4969949",
"0.49615592",
"0.4918371",
"0.48560798",
"0.48560435",
"0.484454",
"0.48283276",
"0.48273504",
"0.48255217",
"0.48225272",
"0.48196688",
"0.48152402",
"0.48119557",
"0.47894132",
"0.47784522",
"0.47781557",
"0.4775263",
"0.47712237",
"0.47624722",
"0.4739418",
"0.4736142",
"0.47196507",
"0.47151384",
"0.47069466",
"0.46830377",
"0.46782836",
"0.4669954",
"0.4665376",
"0.46632266",
"0.46606296",
"0.46577907",
"0.46569222",
"0.46528444",
"0.46487755",
"0.4645752",
"0.4644915",
"0.4627731",
"0.46257752",
"0.4610517",
"0.460588",
"0.45985505",
"0.45942214",
"0.45908704",
"0.45900813",
"0.4587735",
"0.4574772",
"0.45441124",
"0.45328274",
"0.45264706",
"0.4526019",
"0.45241475",
"0.45219395",
"0.45149451",
"0.45132515",
"0.45001394",
"0.44845036",
"0.44764087",
"0.44681382",
"0.44660735",
"0.44650197",
"0.44633487",
"0.4462102",
"0.44582757",
"0.44543606",
"0.4450734",
"0.4440142",
"0.44380453",
"0.44365674",
"0.44318095",
"0.44317797",
"0.443157",
"0.44287717",
"0.44260225",
"0.44111404",
"0.44064185",
"0.44002137",
"0.43940964",
"0.43853316",
"0.43819365",
"0.43809658",
"0.4376464",
"0.4376373",
"0.43739924",
"0.43713254",
"0.43691692",
"0.43654355",
"0.43638635",
"0.43637943",
"0.4354107",
"0.43533015",
"0.43532324"
]
| 0.72079587 | 0 |
for local replicas, we assume the destination URI is file | @Override
public void copyMetadata(URI destination) throws IOException {
getFileIoProvider().nativeCopyFileUnbuffered(
getVolume(), getMetaFile(), new File(destination), true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getFileTransferServer();",
"@Override\n\tpublic URI copy(URI uri, URI toURI) throws StorageSecuirtyException,\n\t\t\tResourceAccessException {\n\t\treturn null;\n\t}",
"private Step copyRemoteFiles() {\n return stepBuilderFactory.get(STEP_COPY_REMOTE_FILES)\n .tasklet(copyRemoteFilesTask)\n .build();\n }",
"private Path getTargetFile(Endpoint target) {\n Path targetFile;\n if (target.getUrl().startsWith(\"sftp:\")) {\n URI host = null;\n URI rawuri = null;\n String path = null;\n try {\n rawuri = new URI(target.getUrl());\n path = rawuri.getRawPath();\n if (rawuri.getPort() == -1) {\n host = new URI(rawuri.getScheme() + \"://\" + rawuri.getHost());\n } else {\n host = new URI(rawuri.getScheme() + \"://\" + rawuri.getHost() + \":\" + rawuri.getPort());\n }\n } catch (URISyntaxException e) {\n throw new IllegalArgumentException(e);\n }\n SFTPEnvironment environment = new SFTPEnvironment().withUsername(target.getUser())\n .withPassword(target.getPassword().toCharArray())\n .withKnownHosts(new File(System.getProperty(\"user.home\"), \".ssh/known_hosts\"));\n FileSystem fileSystem = null;\n try {\n fileSystem = FileSystems.newFileSystem(host, environment,\n SFTPFileSystemProvider.class.getClassLoader());\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n targetFile = fileSystem.getPath(path);\n } else {\n targetFile = getProject().file(target.getUrl()).toPath();\n }\n return targetFile;\n \n }",
"@Test(groups = \"Integration\")\n public void testCopyStreamTo() throws Exception {\n String contents = \"abc\";\n File dest = new File(Os.tmp(), \"sssMachineLocationTest_dest.tmp\");\n try {\n host.copyTo(Streams.newInputStreamWithContents(contents), dest.getAbsolutePath());\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n dest.delete();\n }\n }",
"public void saveLink() {\n\t\t\t// check to see if the file exists locally\n\t\t\tString localFile = localUrl + \"/\" + filePath;\n\n\t\t\tboolean finished = false;\n\t\t\twhile (!finished) {\n\t\t\t\ttry {\n\n\t\t\t\t\tFile file = new File(localFile);\n\t\t\t\t\t// build remote path\n\t\t\t\t\tString finalRemoteUrl = remoteUrl;\n\t\t\t\t\tif (filePath.startsWith(\"/\")) {\n\t\t\t\t\t\tURL url = new URL(finalRemoteUrl);\n\t\t\t\t\t\tfinalRemoteUrl = url.getProtocol() + \"://\" + url.getHost();\n\t\t\t\t\t}\n\n\t\t\t\t\tString remoteFile = finalRemoteUrl + filePath;\n\t\t\t\t\tif (file.canRead() && !file.isDirectory()) {\n\t\t\t\t\t\tLong fileLength = file.length();\n\t\t\t\t\t\t// if it does, check to see if it is complete based on\n\t\t\t\t\t\t// length of file\n\t\t\t\t\t\tlogger.trace(\"file/dir already exists: {}\", localFile);\n\t\t\t\t\t\tURLConnection connection = buildConnection(remoteFile);\n\t\t\t\t\t\tMap<String, List<String>> map = connection.getHeaderFields();\n\t\t\t\t\t\tif (map.get(\"Content-Length\") == null) {\n\t\t\t\t\t\t\tlogger.debug(\"no header fields were returned when attempting to access: {}\", remoteFile);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tLong remoteLength = Long.parseLong(map.get(\"Content-Length\").iterator().next());\n\n\t\t\t\t\t\t// if it is not complete, resume downloading\n\t\t\t\t\t\tif (remoteLength > fileLength || fileLength == 0) {\n\t\t\t\t\t\t\ttransferFromRemoteToLocal(remoteFile, localFile, fileLength, remoteLength);\n\t\t\t\t\t\t\tfinished = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlogger.trace(\"file is already complete, moving on\");\n\t\t\t\t\t\t\tfinished = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if it is does not exist, create the directory or file\n\t\t\t\t\t\tlogger.trace(\"file does not exist: {}\", localFile);\n\n\t\t\t\t\t\t// take care of the directory structure\n\t\t\t\t\t\tFiles.createParentDirs(new File(localFile));\n\n\t\t\t\t\t\t// save the file\n\t\t\t\t\t\tlogger.trace(\"preparing to write remote file {} to local file {}\", new Object[] { remoteFile,\n\t\t\t\t\t\t\t\tlocalFile });\n\n\t\t\t\t\t\ttransferFromRemoteToLocal(remoteFile, localFile);\n\t\t\t\t\t\tlogger.trace(\"file created: {}\", localFile);\n\t\t\t\t\t\tfinished = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t// timeout took place. pause, then let the loop execute\n\t\t\t\t\t// again\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\tlogger.error(\"exception while processing a link\", e);\n\t\t\t\t\tfinished = true;\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tlogger.error(\"exception while processing a link\", e);\n\t\t\t\t\tlogger.debug(\"will try again in {} milliseconds\", TIMEOUT_TIME);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(TIMEOUT_TIME);\n\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\tlogger.error(\"failed while trying to wait {} milliseconds\", TIMEOUT_TIME);\n\t\t\t\t\t}\n\t\t\t\t\tlogger.debug(\"just woke up, trying again\");\n\t\t\t\t\tfinished = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounter.incrementAndGet();\n\t\t\tlogger.debug(\"successfully downloaded the file {} from {} to {} - {}\", new Object[] { filePath, remoteUrl,\n\t\t\t\t\tlocalUrl, completionMessage() });\n\n\t\t\tLinesToFileWriter lineWriter = new LinesToFileWriter(localUrl, COMPLETED_PATH_LIST, true);\n\t\t\t// write line to completed file list\n\t\t\tlineWriter.writeLine(filePath);\n\t\t\tlineWriter.close();\n\t\t}",
"public void setFileTransferServer(String serverUrl);",
"private boolean isLocalFile(Uri uri) {\n String auth = uri.getHost();\n\n if (auth.equals(\"localhost\") || uri.getScheme().equals(\"file\")) {\n return true;\n }\n return false;\n }",
"public abstract String getFileLocation();",
"@Cold\n @Override\n public Single<Uri> getDownloadUrl(String remoteDestinationPath) {\n return RxTask.toSingle(() -> createReference(remoteDestinationPath).getDownloadUrl())\n .doOnError(e -> Timber.e(\"StorageException handled and can be ignored\"));\n }",
"abstract String getFileRoute() throws IOException;",
"protected void downloadTo(VFSTransfer transfer,VFile targetLocalFile)\n throws VlException\n {\n // copy contents into local file:\n vrsContext.getTransferManager().doStreamCopy(transfer,this,targetLocalFile); \n }",
"URL toURL(FileReference fileReferece);",
"@Override\n\tprotected RemoteOperationResult run(OwnCloudClient client) {\n\n \t/// check parameters\n if (!FileUtils.isValidPath(mTargetRemotePath)) {\n \treturn new RemoteOperationResult(ResultCode.INVALID_CHARACTER_IN_NAME);\n }\n\n if (mTargetRemotePath.equals(mSrcRemotePath)) {\n \t// nothing to do!\n return new RemoteOperationResult(ResultCode.OK);\n }\n\n if (mTargetRemotePath.startsWith(mSrcRemotePath)) {\n \treturn new RemoteOperationResult(ResultCode.INVALID_MOVE_INTO_DESCENDANT);\n }\n\n\n /// perform remote operation\n\t\t//LocalMoveMethod move = null;\n\t\tMoveMethod move = null;\n\t\tRemoteOperationResult result = null;\n try {\n move = new MoveMethod(\n \t\tclient.getWebdavUri() + WebdavUtils.encodePath(mSrcRemotePath),\n \t\tclient.getWebdavUri() + WebdavUtils.encodePath(mTargetRemotePath),\n \t\tmOverwrite\n \t\t);\n int status = client.executeMethod(move, MOVE_READ_TIMEOUT, MOVE_CONNECTION_TIMEOUT);\n\n /// process response\n \tif (status == HttpStatus.SC_MULTI_STATUS) {\n \t\tresult = processPartialError(move);\n\n \t} else if (status == HttpStatus.SC_PRECONDITION_FAILED && !mOverwrite) {\n\n \t\tresult = new RemoteOperationResult(ResultCode.INVALID_OVERWRITE);\n \t\tclient.exhaustResponse(move.getResponseBodyAsStream());\n\n\n \t\t/// for other errors that could be explicitly handled, check first:\n \t\t/// http://www.webdav.org/specs/rfc4918.html#rfc.section.9.9.4\n\n \t} else {\n\n\t result = new RemoteOperationResult(\n\t \t\tisSuccess(status), \t// move.succeeded()? trustful?\n\t \t\tstatus,\n\t \t\tmove.getResponseHeaders()\n \t\t);\n \t\tclient.exhaustResponse(move.getResponseBodyAsStream());\n }\n\n Log.i(TAG, \"Move \" + mSrcRemotePath + \" to \" + mTargetRemotePath + \": \" +\n \t\tresult.getLogMessage());\n\n } catch (Exception e) {\n result = new RemoteOperationResult(e);\n Log.e(TAG, \"Move \" + mSrcRemotePath + \" to \" + mTargetRemotePath + \": \" +\n \t\tresult.getLogMessage(), e);\n\n } finally {\n if (move != null)\n move.releaseConnection();\n }\n\n return result;\n\t}",
"@Override\n public void prepare() {\n //Caching as file resource.\n File file = this.getResource().file;\n logger.info(\"Preparing {} streams for file: {}\", this.getTransferType(), file.getName());\n\n if (this.getTransferType() == ResourceTransferType.OUTBOUND) {\n //Sending\n try {\n buffer = new byte[BUFFER_SIZE];\n sent = 0;\n inputChannel = new FileInputStream(file).getChannel();\n inputBuffer = inputChannel.map(FileChannel.MapMode.READ_ONLY, 0, inputChannel.size());\n } catch (FileNotFoundException e) { //File doesn't exist.\n //Calling a transfer error.\n callError(e);\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else {\n //Receiving\n //Checking if file already exists.\n written = 0;\n saved = 0;\n if (getResource().isLocal()) {\n getResource().calcNetworkId();\n if (getResource().getNetworkID().equals(getTunnel().getDestination())) {\n //The file is already stored locally.\n getTunnel().sendMessage(new ResourceTransferControlMessage(this.getTransferId(), -2));\n this.close();\n return;\n }\n }\n\n //Creating or replacing the file.\n buffer = new byte[BUFFER_SIZE * 16];\n if (file.exists()) {\n file.delete();\n }\n try { //Creating new file.\n file.createNewFile();\n outputStream = new FileOutputStream(file);\n } catch (IOException e) {\n //Calling a transfer error.\n callError(e);\n return;\n }\n\n //Requesting the first chunk.\n getTunnel().sendMessage(new ResourceTransferControlMessage(this.getTransferId(), 0));\n }\n }",
"private void downloadFile(URL source, File localDirectory, String localFileName, boolean griffin)\n throws SocketException {\n\n if (griffin) {\n try {\n downloadFileFromGriffin(source, localDirectory, localFileName);\n } catch (IOException ex) {\n downloadFileFromMentor(source, localDirectory, localFileName);\n }\n } else {\n downloadFileFromMentor(source, localDirectory, localFileName);\n }\n\n }",
"public File writeBackFileToDvn(RConnection c, String targetFilename,\n String tmpFilePrefix, String tmpFileExt, int fileSize){\n File tmprsltfl = null;\n \n String resultFilePrefix = tmpFilePrefix + PID + \".\";\n \n String rfsffx = \".\" + tmpFileExt;\n RFileInputStream ris = null;\n OutputStream outbr = null;\n try {\n tmprsltfl = File.createTempFile(resultFilePrefix, rfsffx);\n \n //outbr = new FileOutputStream(tmprsltfl);\n outbr = new BufferedOutputStream(new FileOutputStream(tmprsltfl));\n //File tmp = new File(targetFilename);\n //long tmpsize = tmp.length();\n // open the input stream\n ris = c.openFile(targetFilename);\n \n if (fileSize < 1024*1024*500){\n int bfsize = fileSize +1;\n byte[] obuf = new byte[bfsize];\n ris.read(obuf);\n //while ((obufsize =)) != -1) {\n outbr.write(obuf, 0, bfsize);\n //}\n }\n ris.close();\n outbr.close();\n return tmprsltfl;\n } catch (FileNotFoundException fe){\n fe.printStackTrace();\n dbgLog.fine(\"FileNotFound exception occurred\");\n return tmprsltfl;\n } catch (IOException ie){\n ie.printStackTrace();\n dbgLog.fine(\"IO exception occurred\");\n } finally {\n if (ris != null){\n try {\n ris.close();\n } catch (IOException e){\n \n }\n }\n \n if (outbr != null){\n try {\n outbr.close();\n } catch (IOException e){\n \n }\n }\n \n }\n return tmprsltfl;\n }",
"private String mainAccessToFile(String fileName, DataLocation loc, AccessMode am, String destDir) {\n FileAccessParams fap = new FileAccessParams(am, loc);\n DataLocation targetLocation = ap.mainAccessToFile(loc, fap, destDir);\n\n // Checks on target\n String path = (targetLocation == null) ? fileName : targetLocation.getPath();\n DataLocation finalLocation = (targetLocation == null) ? loc : targetLocation;\n if (finalLocation == null) {\n ErrorManager.fatal(ERROR_FILE_NAME);\n return null;\n }\n\n // Return the final target path\n String finalPath;\n MultiURI u = finalLocation.getURIInHost(Comm.getAppHost());\n if (u != null) {\n finalPath = u.getPath();\n } else {\n finalPath = path;\n }\n\n return finalPath;\n }",
"boolean download(\n String remoteFileName, OutputStream destination);",
"@Override\n\tpublic URI move(URI uri, URI toURI) throws StorageSecuirtyException,\n\t\t\tResourceAccessException {\n\t\treturn null;\n\t}",
"private String generateTargetFileUri(String fileUri) {\n return folderName.concat(fileUri);\n }",
"private boolean copyFile(FileInputStream srcStream, String filePath) {\n FileChannel srcChannel;\n FileOutputStream destStream;\n Throwable th;\n if (srcStream != null) {\n if (filePath != null) {\n FileOutputStream destStream2 = null;\n FileChannel dstChannel = null;\n FileChannel dstChannel2 = null;\n try {\n destStream2 = new FileOutputStream(createDestFile(filePath));\n FileChannel srcChannel2 = srcStream.getChannel();\n try {\n FileChannel dstChannel3 = destStream2.getChannel();\n try {\n srcChannel2.transferTo(0, srcChannel2.size(), dstChannel3);\n boolean isSuccess = true;\n try {\n srcChannel2.close();\n } catch (IOException e) {\n isSuccess = false;\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n try {\n destStream2.close();\n } catch (IOException e2) {\n isSuccess = false;\n Log.e(TAG, \"destStream close error, IOException:\");\n }\n if (dstChannel3 != null) {\n try {\n dstChannel3.close();\n } catch (IOException e3) {\n Log.e(TAG, \"dstChannel close error, IOException:\");\n return false;\n }\n }\n return isSuccess;\n } catch (FileNotFoundException e4) {\n dstChannel2 = dstChannel3;\n dstChannel = srcChannel2;\n boolean isSuccess2 = false;\n Log.e(TAG, \"copyFile FileNotFoundException.\");\n if (dstChannel != null) {\n try {\n dstChannel.close();\n } catch (IOException e5) {\n isSuccess2 = false;\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n }\n if (destStream2 != null) {\n try {\n destStream2.close();\n } catch (IOException e6) {\n Log.e(TAG, \"destStream close error, IOException:\");\n isSuccess2 = false;\n }\n }\n if (dstChannel2 == null) {\n return isSuccess2;\n }\n dstChannel2.close();\n return isSuccess2;\n } catch (IOException e7) {\n dstChannel2 = dstChannel3;\n dstChannel = srcChannel2;\n boolean isSuccess3 = false;\n try {\n Log.e(TAG, \"init IO error, IOException:\");\n if (dstChannel != null) {\n try {\n dstChannel.close();\n } catch (IOException e8) {\n isSuccess3 = false;\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n }\n if (destStream2 != null) {\n try {\n destStream2.close();\n } catch (IOException e9) {\n Log.e(TAG, \"destStream close error, IOException:\");\n isSuccess3 = false;\n }\n }\n if (dstChannel2 == null) {\n return isSuccess3;\n }\n try {\n dstChannel2.close();\n return isSuccess3;\n } catch (IOException e10) {\n Log.e(TAG, \"dstChannel close error, IOException:\");\n return false;\n }\n } catch (Throwable th2) {\n srcChannel = dstChannel2;\n destStream = destStream2;\n th = th2;\n }\n } catch (Throwable th3) {\n destStream = destStream2;\n th = th3;\n srcChannel = dstChannel3;\n dstChannel = srcChannel2;\n if (dstChannel != null) {\n try {\n dstChannel.close();\n } catch (IOException e11) {\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n }\n if (destStream != null) {\n try {\n destStream.close();\n } catch (IOException e12) {\n Log.e(TAG, \"destStream close error, IOException:\");\n }\n }\n if (srcChannel != null) {\n try {\n srcChannel.close();\n } catch (IOException e13) {\n Log.e(TAG, \"dstChannel close error, IOException:\");\n }\n }\n throw th;\n }\n } catch (FileNotFoundException e14) {\n dstChannel = srcChannel2;\n boolean isSuccess22 = false;\n Log.e(TAG, \"copyFile FileNotFoundException.\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n } catch (IOException e15) {\n dstChannel = srcChannel2;\n boolean isSuccess32 = false;\n Log.e(TAG, \"init IO error, IOException:\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n } catch (Throwable th4) {\n dstChannel = srcChannel2;\n srcChannel = null;\n destStream = destStream2;\n th = th4;\n if (dstChannel != null) {\n }\n if (destStream != null) {\n }\n if (srcChannel != null) {\n }\n throw th;\n }\n } catch (FileNotFoundException e16) {\n boolean isSuccess222 = false;\n Log.e(TAG, \"copyFile FileNotFoundException.\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n } catch (IOException e17) {\n boolean isSuccess322 = false;\n Log.e(TAG, \"init IO error, IOException:\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n }\n }\n }\n return false;\n }",
"@Test(groups = \"Integration\")\n public void testCopyFileTo() throws Exception {\n File dest = Os.newTempFile(getClass(), \".dest.tmp\");\n File src = Os.newTempFile(getClass(), \".src.tmp\");\n try {\n Files.write(\"abc\", src, Charsets.UTF_8);\n host.copyTo(src, dest);\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n src.delete();\n dest.delete();\n }\n }",
"private static Uri getOutputMediaFileUri(){\n return Uri.fromFile(getOutputMediaFile());\n }",
"public void execute(Request request, Response response, boolean do_copy) throws IOException, HTTPException {\n\t\t\n\t\tURI uri = request.getUri();\n\t\tIDirectory source_parent = getParent(uri); // Get the parent directory of the source location.\n\t\tString source_base_name = UriUtil.baseName(uri); // Get the name of the location within that directory.\n\t\tString if_header = request.getHeader(HTTP.HEADER_IF); // Get the If header.\n\t\tString lock_token = getLockTokenFromIfHeader(if_header);\n\t\t\n\t\tDiagnostic.trace(\"Source name = \" + source_base_name, Diagnostic.RUN);\n\t\t\n\t\t// Deal with the destination location.\n\t\tString destination_header = request.getHeader(HTTP.HEADER_DESTINATION);\n\t\tif (destination_header == null) throw new HTTPException(\"No destination specified\");\n\t\t\n\t\ttry {\n\t\t\tURI destination_file_path = new URI(destination_header); // Get the file path of the destination location.\n\t\t\tIDirectory destination_parent = getParent(destination_file_path); // Get the parent directory of that location.\n\t\t\tString destination_base_name = UriUtil.baseName(destination_file_path); // Get the name of the location within that directory.\n\t\t\t\n\t\t\t// Should overwrite unless flag explicitly set to false in header.\n\t\t\t// See RFC 2518 8.8.6/7.\n\t\t\tboolean overwrite = shouldOverwrite(request);\n\t\t\t\n\t\t\t// Remember whether destination is non-null, for setting result code.\n\t\t\tboolean destination_not_null = destination_parent.contains(destination_base_name);\n\t\t\t\n\t\t\t// If a lock token was specified in an If header, the file must be currently locked with the given token.\n\t\t\tif (lock_token != null) lock_manager.checkWhetherLockedWithToken(uri, lock_token);\n\t\t\t\n\t\t\t// TODO check if the destination is locked, in which case must have lock token. Ditto for source in case of move.\n\t\t\t\n\t\t\t// Either copy the object or move it.\n\t\t\tif (do_copy) {\n\t\t\t\tfile_system.copyObject(source_parent, source_base_name, destination_parent, destination_base_name, overwrite);\n\t\t\t} else {\n\t\t\t\tfile_system.moveObject(source_parent, source_base_name, destination_parent, destination_base_name, overwrite);\n\t\t\t}\n\t\t\t\n\t\t\tif (destination_not_null) response.setStatusCode(HTTP.RESPONSE_NO_CONTENT);\n\t\t\telse response.setStatusCode(HTTP.RESPONSE_CREATED);\n\t\t\t\n\t\t\tresponse.close();\n\t\t}\n\t\tcatch (LockUseException e) {\n handleLockException(lock_token, e);\n\t\t}\n\t\tcatch (BindingAbsentException e) {\n\t\t\tthrow new HTTPException(\"Source object not found\", HTTP.RESPONSE_NOT_FOUND, true);\n\t\t}\n\t\tcatch (BindingPresentException e) {\n\t\t\tthrow new HTTPException(\"Destination non-null with no-overwrite\", HTTP.RESPONSE_PRECONDITION_FAILED, true);\n\t\t}\n\t\tcatch (PersistenceException e) {\n\t\t\tthrow new HTTPException(\"Couldn't create copy\", HTTP.RESPONSE_INTERNAL_SERVER_ERROR, true);\n\t\t}\n\t\tcatch (URISyntaxException e) {\n\t\t\tthrow new HTTPException(\"Invalid destination path\", HTTP.RESPONSE_BAD_REQUEST, true);\n\t\t}\n\t}",
"@Override\n\t\t\tprotected URI toUriImpl(String path) throws URISyntaxException {\n\t\t\t\treturn toFileToURI(path);\n\t\t\t}",
"@Override\n\tpublic void transferTo(File dest) throws IOException, IllegalStateException {\n\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tString sourcePathHdfs=args[0];\n\t\tString destinationPath=args[1];\n\t\tnew CopyToLocal().copyToLocal(sourcePathHdfs, destinationPath);\n\t\t\n\t}",
"@Override\r\n\tpublic boolean downloadFile() throws FileSystemUtilException {\r\n\t\tlogger.debug(\"Begin: \" + getClass().getName() + \":download()\");\r\n\t\ttry {\r\n\t\t\tconnect();\r\n\t\t\tgetFileData(0, \"\");\r\n\t\t\tdisconnect();\r\n\t\t\tif (stop) {\r\n\t\t\t\tthrow new FileSystemUtilException(\"999\");\r\n\t\t\t}\r\n\t\t\tFileSystemUtilsPlugin zu = new FileSystemUtilPluginFactory().getFileUtils(FileSystemTypeConstants.ZIP);\r\n\t\t\tif (zu.isZip(localFilePath)) {\r\n\r\n\t\t\t\t// unzip the localfilepath (a common method at import util level\r\n\t\t\t\t// can be used)\r\n\t\t\t\t// rename the extracted file to localfilepath+\".txt\r\n\t\t\t\t// delete the localfilepath\r\n\t\t\t}\r\n\t\t\tzu = null;\r\n\t\t\tlogger.debug(\"End: \" + getClass().getName() + \":download()\");\r\n\t\t\treturn true;\r\n\t\t} catch (FileSystemUtilException e) {\r\n\t\t\tdisconnect();\r\n\t\t\tlogger.info(new Date() + \":: Unable to download with parameters \" + \", username= \" + username\r\n\t\t\t\t\t+ \" , password = \" + password + \" , remotefilePath = \" + remoteFilePath + \", \" + \"localFilePath = \"\r\n\t\t\t\t\t+ localFilePath + \" , host= \" + hostname + \" and port =\" + port);\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}",
"public static void tranferFile() {\n\n FTPClient ftpClient = new FTPClient();\n try {\n ftpClient.connect(\"192.168.231.237\", 80);\n ftpClient.login(\"root\", \"xpsr@350\");\n ftpClient.enterLocalPassiveMode();\n\n ftpClient.setFileType(FTP.BINARY_FILE_TYPE);\n File sourceFile = new File(\"/home/sthiyagaraj/eclipse-workspace/KonnectAPI/target/APIURL.tar.gz\");\n InputStream inputStream = new FileInputStream(sourceFile);\n\n boolean done = ftpClient.storeFile(\"filename which receiver get\", inputStream);\n inputStream.close();\n if (done) {\n System.out.println(\"file is uploaded successfully..............\");\n }\n\n } catch (IOException e) {\n System.err.println(\"Exception occured while ftp : \"+e);\n } finally {\n try {\n if (ftpClient.isConnected()) {\n ftpClient.logout();\n ftpClient.disconnect();\n }\n } catch (IOException e) {\n System.err.println(\"Exception occured while ftp logout/disconnect : \"+e);\n }\n }\n\n }",
"public boolean copyFile(final Uri source, final Uri target)\n\t\t\tthrows IOException\n\t{\n\t\tInputStream inStream = null;\n\t\tOutputStream outStream = null;\n\n\t\tUsefulDocumentFile destinationDoc = getDocumentFile(target, false, true);\n\t\tUsefulDocumentFile.FileData destinationData = destinationDoc.getData();\n\t\tif (!destinationData.exists)\n\t\t{\n\t\t\tdestinationDoc.getParentFile().createFile(null, destinationData.name);\n\t\t\t// Note: destinationData is invalidated upon creation of the new file, so make a direct call following\n\t\t}\n\t\tif (!destinationDoc.exists())\n\t\t{\n\t\t\tthrow new WritePermissionException(\n\t\t\t\t\t\"Write permission not found. This indicates a SAF write permission was requested. \" +\n\t\t\t\t\t\"The app should store any parameters necessary to resume write here.\");\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tinStream = FileUtil.getInputStream(this, source);\n\t\t\toutStream = getContentResolver().openOutputStream(target);\n\n\t\t\tUtil.copy(inStream, outStream);\n\t\t}\n\t\tcatch(ArithmeticException e)\n\t\t{\n\t\t\tLog.d(TAG, \"File larger than 2GB copied.\");\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tthrow new IOException(\"Failed to copy \" + source.getPath() + \": \" + e.toString());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tUtil.closeSilently(inStream);\n\t\t\tUtil.closeSilently(outStream);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public void updateWithReplica(StorageLocation replicaLocation) {\n File diskFile = null;\n try {\n diskFile = new File(replicaLocation.getUri());\n } catch (IllegalArgumentException e) {\n diskFile = null;\n }\n\n if (null == diskFile) {\n setDirInternal(null);\n } else {\n setDirInternal(diskFile.getParentFile());\n }\n }",
"@Override\n public boolean createPhotoRefactored(File local, Album album, Url url) {\n AlbumSlice slice = WifiDirectProvider.this.getAlbumSlice(album, UserSessionDetails.user_id);\n //slice.photos.add(new CachedPhoto(slice, new Url(album.url+\"/\"+local.getName()), local));\n File output = new File(ctx.getFilesDir(), \"wifi-direct/\"+album.name + \"/\" + UserSessionDetails.user_id + \"/\" + local.getName());\n boolean result = Util.copyFile(local, output);\n if(result) {\n album.localPhotos.add(new CachedPhoto(slice, new Url(album.name + \"/\" + local.getName()), output));\n }\n\n //SocketManager.getInstance().sendPhoto(album.name, local.getName(), output);\n WifiDirectConnectionsManager.getInstance().broadcastPhoto(album.name,\n new File(ctx.getFilesDir(), \"wifi-direct/\"+album.name + \"/\" + UserSessionDetails.user_id + \"/\" + local.getName()));\n\n return result;\n }",
"private Uri getOutputMediaFileUri(int type){\n return Uri.fromFile(getOutputMediaFile(type));\n }",
"public Blob downloadFile(String inKey, File inDestFile);",
"public interface FileConnection {\r\n\r\n\t/**\r\n\t * Execute a SFTP get and write the file to the passed output stream.\r\n\t * \r\n\t * @param path\r\n\t * @param stream\r\n\t * @throws IOException \r\n\t */\r\n\tvoid getFile(String path, OutputStream stream) throws NotFoundException, IOException;\r\n\t\r\n\t/**\r\n\t * Request a range of bytes from the given file.\r\n\t * \r\n\t * @param path\r\n\t * @param stream\r\n\t * @param startByteIndex The index of the start of the byte range to be read.\r\n\t * @param endByteIndex The index of the end of the byte range to be read.\r\n\t * @return True if the end of the file was reached with this read.\r\n\t * \r\n\t * @throws NotFoundException\r\n\t * @throws IOException \r\n\t */\r\n\tboolean getFileRange(String path, OutputStream stream, long startByteIndex, long endByteIndex) throws NotFoundException, IOException;\r\n\r\n\t/**\r\n\t * Get the size of a given file.\r\n\t * @param path\r\n\t * @return\r\n\t */\r\n\tlong getFileSize(String path) throws NotFoundException;\r\n\t\r\n\t/**\r\n\t * Get the last modified date of the file in UTC.\r\n\t * @param path\r\n\t * @return\r\n\t * @throws NotFoundException\r\n\t */\r\n\tlong getLastModifiedDate(String path) throws NotFoundException;\r\n}",
"public File getFile()\r\n \t{\r\n \t\tFile result = null;\r\n \t\t\r\n \t\tString hostName = getAuthority();\r\n \t\t\r\n \t\tif((hostName == null) || hostName.equals(\"\") || hostName.equalsIgnoreCase(\"localhost\"))\r\n \t\t{\r\n \t\t\tString filePath = getPath();\r\n \t\t\tresult = new File(filePath);\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tthrow new RuntimeException(\"Can't resolve files on remote host machines\");\r\n \t\t}\r\n \t\t\r\n \t\treturn result;\r\n \t}",
"@Override\n public String getDestination() {\n return this.dest;\n }",
"@Test\n\tvoid testFileURI(@TempDir Path tempDir) {\n\t\tfinal File tempFile = tempDir.resolve(\"foo.bar\").toFile();\n\t\tfinal URI fileURI = Files.toURI(tempFile); //create a Java URI directly from a file\n\t\tassertThat(fileURI.getScheme(), is(FILE_SCHEME)); //file:\n\t\tassertTrue(fileURI.getRawPath().startsWith(ROOT_PATH)); //file:/\n\t\tassertFalse(fileURI.getRawPath().startsWith(ROOT_PATH + PATH_SEPARATOR + PATH_SEPARATOR)); //not file:/// (even though that is correct)\n\t}",
"protected File copyURLToFile(String filename) throws IOException {\r\n\t\tURL deltaFileUrl = getClass().getResource(filename);\t\t\r\n\t\tFile tempFile = File.createTempFile(\"test\", \".dlt\");\r\n\t\t_tempFiles.add(tempFile);\r\n\t\tFileUtils.copyURLToFile(deltaFileUrl, tempFile);\t\t\r\n\t\treturn tempFile;\t\r\n\t}",
"private static Uri getOutputMediaFileUri(int type){\n\t return Uri.fromFile(getOutputMediaFile(type));\n\t}",
"private boolean openLocalCopyFromUri(Uri dataUri) {\n String title = getContentUriName(dataUri);\n File contentFile = Utils.duplicateInDownload(this, dataUri, title);\n if (contentFile != null) {\n mQuitAppWhenDoneViewing = true;\n onFileSelected(contentFile, \"\");\n return true;\n }\n\n return false;\n }",
"protected void getTransfer( Resource resource, String url, File destination )\n throws TransferFailedException\n {\n fireTransferDebug( \"attempting to create parent directories for destination: \" + destination.getName() );\n createParentDirectories( destination );\n\n fireGetStarted( resource, destination );\n\n if ( null == EXTERNAL_LOADER || EXTERNAL_LOADER.length() <= 0 )\n {\n throw new RuntimeException( \"Invalid external format\" );\n }\n\n try\n {\n transfer ( resource, url, destination, TransferEvent.REQUEST_GET );\n }\n catch ( final IOException e )\n {\n if ( destination.exists() )\n {\n boolean deleted = destination.delete();\n\n if ( !deleted )\n {\n destination.deleteOnExit();\n }\n }\n\n fireTransferError( resource, e, TransferEvent.REQUEST_GET );\n\n String msg = \"GET request of: \" + resource.getName() + \" from \" + repository.getName() + \" failed\";\n\n throw new TransferFailedException( msg, e );\n }\n\n fireGetCompleted( resource, destination );\n }",
"private static Uri getOutputMediaFileUri(int type){\r\n\t return Uri.fromFile(getOutputMediaFile(type));\r\n\t}",
"@Override\n public boolean pullFile(String remoteFilePath, File localFile)\n throws DeviceNotAvailableException {\n boolean found = false;\n for (String[] item : dirs) {\n if (String.format(\"%s/%s\", item[0], item[1]).equals(remoteFilePath)) {\n found = true;\n break;\n }\n }\n assertTrue(\"trying to pull non-existent file: \" + remoteFilePath, found);\n try {\n return localFile.createNewFile();\n } catch (IOException ioe) {\n throw new RuntimeException(\"failed to create empty file\", ioe);\n }\n }",
"public void run() {\n if (latch != null)\n latch.countDown();\n\n System.out.println(\"transferring from \" + job.srcUrl + \" to \" + job.dstUrl);\n\n String srcScheme;\n String dstScheme;\n\n try {\n srcScheme = SchemeParser.getScheme(job.srcUrl);\n dstScheme = SchemeParser.getScheme(job.dstUrl);\n } catch (Exception e) {\n setError(e.getMessage());\n return;\n }\n\n Receiver probe = Receiver.getProbeForScheme(srcScheme);\n if (probe == null) {\n setError(String.format(\"unsupported scheme: %s\", srcScheme));\n return;\n }\n\n FileInfo info;\n try {\n System.out.println(\"query src file header information...\");\n info = probe.getFileInfo(job.srcUrl, new HashMap<>());\n System.out.println(\"file size: \" + info.size);\n } catch (Receiver.ReceiverOperationError e) {\n setError(e.getMessage());\n return;\n }\n\n Receiver receiver = Receiver.getReceiverForScheme(srcScheme, info.size);\n if (receiver == null) {\n setError(String.format(\"unsupported scheme: %s\", srcScheme));\n return;\n }\n\n Sender sender = Sender.getSenderForScheme(dstScheme, info.size);\n if (sender == null) {\n setError(String.format(\"unsupported scheme: %s\", dstScheme));\n return;\n }\n\n Downloader downloader = Downloader.getDownloader();\n Uploader uploader = Uploader.getUploader();\n\n File buffer = new File(\"buffer.file\");\n\n try {\n System.out.println(\"start downloading...\");\n FileOutputStream writer = new FileOutputStream(buffer);\n downloader.download(job.srcUrl, new HashMap<>(), receiver, writer);\n writer.close();\n System.out.println(\"download finished\");\n\n System.out.println(\"start uploading...\");\n FileInputStream reader = new FileInputStream(buffer);\n uploader.upload(job.dstUrl, new HashMap<>(), sender, reader);\n reader.close();\n System.out.println(\"upload finished\");\n\n } catch (FileNotFoundException e) {\n setError(\"can't crate buffer file for download\");\n return;\n } catch (Exception e) {\n setError(String.format(\"download error: %s\", e.getMessage()));\n return;\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n //\"/storage/emulated/0/IRON-HID/captures\" <== can open~!!\n //\"file:///mnt/sdcard/Download/20141025_170314.jpg\"\n if (requestCode == CHOOSE_FILE_TO_UPLOAD)\n {\n if (resultCode == RESULT_OK)\n {\n Uri uri = data.getData();\n if (uri != null)\n {\n // Send file\n String filePath = uri.getPath();\n filePath = filePath.replace(\"file://\", \"\");\n mPutCommand += \" \" + filePath;\n mCommandManager.SendCommand(mPutCommand);\n }\n }\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }",
"private boolean checkLocalFile() throws IOException {\n\t\tPath localfile = Paths.get(userdir, filename);\n\t\tif (Files.exists(localfile, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\tthis.downloadStatus = DownloadEnum.ERROR;\n\t\t\tthis.message = \"same name file on download directory, download has stopped\";\n\t\t\treturn false;\n\t\t} else {\n\t\t\tlocalfiletmp = Paths.get(localfile.toAbsolutePath().toString() + \".tmp\");\n\t\t\tif (Files.exists(localfiletmp, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\t\tlocalFileSize = localfiletmp.toFile().length();\n\t\t\t} else {\n\t\t\t\tFiles.createFile(localfiletmp);\n\t\t\t}\n\t\t\tcfgpath = Paths.get(localfile.toAbsolutePath().toString() + \".pcd.dl.cfg\");// local cache of download file\n\t\t\tif (!Files.exists(cfgpath, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\t\tFiles.createFile(cfgpath);\n\t\t\t}\n\t\t\tFileWriter fw = new FileWriter(cfgpath.toFile());\n\t\t\tfw.write(url);\n\t\t\tfw.flush();\n\t\t\tfw.close();\n\t\t\treturn true;\n\t\t}\n\t}",
"public interface TransferAgent\n extends Closeable\n{\n //-------------------------------------------------------------------------\n void throttle(long maxBytesPerSecond);\n void unThrottle();\n\n\n //-------------------------------------------------------------------------\n ShellFile file (String remoteFilePath);\n List<ShellFile> files(String inRemoteFilePath);\n\n\n //-------------------------------------------------------------------------\n // @returns true if the file already exists, or if it was created\n boolean makeDir (String remoteDirectoryPath);\n boolean makeDirs(String remoteDirectoryPath);\n\n\n //-------------------------------------------------------------------------\n boolean upload(\n String localFileName, String remoteFileName);\n\n boolean upload(\n File localFile, String remoteFile);\n\n /**\n * Does not automatically close the given source stream.\n * \n * Works only on the immediate host to which this agent logged into.\n * If you would like to transfer data that are one or more network\n * hops away (i.e. recursive ssh calls), then you will need to\n * upload to the immediate host, then scp to the destination host,\n * and then delete the immediate copy (to clean up).\n *\n * @param source data to be uploaded\n * @param remoteFileName destination file path/name\n * @return true if the entire uploaded was successful\n */\n boolean upload(\n InputStream source, String remoteFileName);\n \n \n //-------------------------------------------------------------------------\n boolean download(\n String remoteFileName, String localFileName);\n\n boolean download(\n String remoteFileName, File localFile);\n\n /**\n * Does not automatically close the given source stream.\n *\n * For downloading data from multiple network hops away,\n * use a similar method as described for uploading.\n * @see #upload(InputStream, String)\n * \n * @param remoteFileName file path/name to download\n * @param destination sink for remote file data\n * @return true if the entire download was successful\n */\n boolean download(\n String remoteFileName, OutputStream destination);\n\n\n //-------------------------------------------------------------------------\n boolean open();\n void openChecked() throws IOException;\n\n @Override\n void close();\n}",
"@Override\r\n\tpublic boolean uploadFile(String fileName) throws FileSystemUtilException {\r\n\t\tlogger.debug(\"Begin:\" + getClass().getName() + \".upload()\");\r\n\t\tFileInputStream fis = null;\r\n\t\tString tempLocalFilePath = null;\r\n\t\ttry {\r\n\t\t\tconnect(); \r\n\t\t\ttempLocalFilePath = localFilePath;\r\n\t\t\tString command = \"scp -C -p -t \" + remoteFilePath;\r\n\t\t\tObject[] ios = execCommand(command);\r\n\t\t\toutputstream = (OutputStream) ios[0];\r\n\t\t\tinputstream = (InputStream) ios[1];\r\n\t\t\ttempLocalFilePath = tempLocalFilePath + fileName;\r\n\t\t\tif (checkAck(inputstream) != 0) {\r\n\t\t\t\tlogger.info(\"10117 : checking if file exists\");\r\n\t\t\t\tthrow new FileSystemUtilException(\"File \" + tempLocalFilePath + \"already exists in the remoteSystem\");\r\n\t\t\t}\r\n\t\t\tlong filesize = (new File(tempLocalFilePath)).length();\r\n\t\t\tcommand = \"C0644 \" + filesize + \" \";\r\n\t\t\tif (tempLocalFilePath.lastIndexOf('/') > 0) {\r\n\t\t\t\tcommand += tempLocalFilePath.substring(tempLocalFilePath.lastIndexOf('/') + 1);\r\n\t\t\t\tlogger.info(\"uploadfile in scp tempLocalFilePath if:: \"+tempLocalFilePath);\r\n\t\t\t} else {\r\n\t\t\t\tlogger.info(\"uploadfile in scp tempLocalFilePath else:: \"+tempLocalFilePath);\r\n\t\t\t\tcommand += tempLocalFilePath;\r\n\t\t\t}\r\n\t\t\tcommand += \"\\n\";\r\n\t\t\toutputstream.write(command.getBytes());\r\n\t\t\toutputstream.flush();\r\n\t\t\t/*if (checkAck(inputstream) != 0) {\r\n\t\t\t\tlogger.info(\"10118 : writing failed\");\r\n\t\t\t\tthrow new FileSystemUtilException(\"Cannot write into outputstream\");\r\n\t\t\t}*/\r\n\t\t\tfis = new FileInputStream(tempLocalFilePath);\r\n\t\t\tbyte[] buf = new byte[1024];\r\n\t\t\twhile (true) {\r\n\t\t\t\tint len = fis.read(buf, 0, buf.length);\r\n\t\t\t\tif (len <= 0)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\toutputstream.write(buf, 0, len); // out.flush();\r\n\t\t\t}\r\n\t\t\tfis.close();\r\n\t\t\tfis = null;\r\n\t\t\t// send '\\0'\r\n\t\t\tbuf[0] = 0;\r\n\t\t\toutputstream.write(buf, 0, 1);\r\n\t\t\toutputstream.flush();\r\n\t\t\tif (checkAck(inputstream) != 0) {\r\n\t\t\t\tlogger.info(\"10119 : after flushing the stream \");\r\n\t\t\t\tthrow new FileSystemUtilException(\"files flushing failed\");\r\n\t\t\t}\r\n\t\t\t// outputstream.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"uploading of file failed :\",e);\r\n\t\t\tthrow new FileSystemUtilException(\"uploading of file failed :\",e);\r\n\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (fis != null)\r\n\t\t\t\t\tfis.close();\r\n\t\t\t} catch (Exception ee) {\r\n\t\t\t\tlogger.error(\"uploading of file failed :\",ee);\r\n\t\t\t\tthrow new FileSystemUtilException(\"input stream not closed :\",ee);\r\n\t\t\t}\r\n\t\t\tdisconnect();\r\n\t\t}\r\n\t\tlogger.debug(\"End:\" + getClass().getName() + \".upload()\");\r\n\t\treturn true;\r\n\t}",
"private boolean doSingleFileMove(Path src, Path dst) throws IOException {\n RecoverableWriter writer;\n try {\n writer = fileSystem.createRecoverableWriter();\n } catch (UnsupportedOperationException ignore) {\n // Some writer not support RecoverableWriter, so fallback to per record moving.\n // For example, see the constructor of HadoopRecoverableWriter. Although it not support\n // RecoverableWriter, but HadoopPathBasedBulkFormatBuilder can support streaming\n // writing.\n return false;\n }\n\n RecoverableFsDataOutputStream out = writer.open(dst);\n try (FSDataInputStream in = fileSystem.open(src)) {\n IOUtils.copyBytes(in, out, false);\n } catch (Throwable t) {\n out.close();\n throw t;\n }\n out.closeForCommit().commit();\n return true;\n }",
"@Override\n public boolean transferFile (MultipartFile file, String tag, String resultFilename) {\n try {\n file.transferTo(new File(Constans.UPLOADPATH + \"/\" + tag + \"/\" + resultFilename));\n }catch (IOException e){\n e.printStackTrace();\n return false;\n }\n return true;\n }",
"@Override\n public String getFile(String fileName, String destDir) {\n if (Tracer.isActivated()) {\n Tracer.emitEvent(Tracer.Event.GET_FILE.getId(), Tracer.Event.GET_FILE.getType());\n }\n\n // Parse the destination path\n if (!destDir.endsWith(File.separator)) {\n destDir += File.separator;\n }\n\n // Parse the file name\n DataLocation sourceLocation;\n try {\n sourceLocation = createLocation(fileName);\n } catch (IOException ioe) {\n ErrorManager.fatal(ERROR_FILE_NAME, ioe);\n return null;\n }\n if (sourceLocation == null) {\n ErrorManager.fatal(ERROR_FILE_NAME);\n return null;\n }\n\n // Ask the AP to\n String finalPath = mainAccessToFile(fileName, sourceLocation, AccessMode.R, destDir);\n\n if (Tracer.isActivated()) {\n Tracer.emitEvent(Tracer.EVENT_END, Tracer.getRuntimeEventsType());\n }\n\n return finalPath;\n }",
"private synchronized void executeDownload(DownloadRequest request, String downloadUrl) {\n HttpURLConnection conn = null;\n URL url;\n InputStream inputStream = null;\n RandomAccessFile randomAccessFile;\n\n try {\n url = new URL(downloadUrl);\n long localFileLength = FileUtils.getLocalFileSize(getFullFileName());\n long remoteFileLength = fileTotalSize;\n\n // 远程文件不存在\n if (remoteFileLength == -1l) {\n // Log.log(\"下载文件不存在...\");\n updateDownloadFailed(request, DownloadManager.ERROR_UNHANDLED_HTTP_CODE, \"Remote file not found\");\n return;\n }\n\n request.setFileFullName(getFullFileName());\n randomAccessFile = new RandomAccessFile(getFullFileName(), \"rwd\");\n\n\n conn = (HttpURLConnection) url.openConnection();\n conn.setInstanceFollowRedirects(false);\n conn.setConnectTimeout(request.getRetryPolicy().getCurrentTimeout());\n conn.setReadTimeout(request.getRetryPolicy().getCurrentTimeout());\n conn.setRequestMethod(\"GET\");\n\n // 本地文件存在\n randomAccessFile.seek(localFileLength);\n conn.setRequestProperty(\"Range\", \"bytes=\"\n + localFileLength + \"-\" + remoteFileLength);\n\n inputStream = conn.getInputStream();\n\n\n HashMap<String, String> customHeaders = request.getCustomHeaders();\n if (customHeaders != null) {\n for (String headerName : customHeaders.keySet()) {\n conn.addRequestProperty(headerName, customHeaders.get(headerName));\n }\n }\n\n // Status Connecting is set here before\n // urlConnection is trying to connect to destination.\n updateDownloadState(request, DownloadManager.STATUS_CONNECTING);\n\n final int responseCode = conn.getResponseCode();\n\n DownLoadLog.v(\"Response code obtained for downloaded Id \"\n + request.getDownloadId()\n + \" : httpResponse Code \"\n + responseCode);\n\n switch (responseCode) {\n case HTTP_PARTIAL:\n case HTTP_OK:\n shouldAllowRedirects = false;\n if (fileTotalSize > 1) {\n transferData(request, inputStream, randomAccessFile);\n } else {\n updateDownloadFailed(request, DownloadManager.ERROR_DOWNLOAD_SIZE_UNKNOWN, \"Transfer-Encoding not found as well as can't know size of download, giving up\");\n }\n break;\n case HTTP_MOVED_PERM:\n case HTTP_MOVED_TEMP:\n case HTTP_SEE_OTHER:\n case HTTP_TEMP_REDIRECT:\n // Take redirect url and call executeDownload recursively until\n // MAX_REDIRECT is reached.\n while (mRedirectionCount < MAX_REDIRECTS && shouldAllowRedirects) {\n mRedirectionCount++;\n DownLoadLog.v(TAG, \"Redirect for downloaded Id \" + request.getDownloadId());\n final String location = conn.getHeaderField(\"Location\");\n executeDownload(request, location);\n }\n\n if (mRedirectionCount > MAX_REDIRECTS && shouldAllowRedirects) {\n updateDownloadFailed(request, DownloadManager.ERROR_TOO_MANY_REDIRECTS, \"Too many redirects, giving up\");\n return;\n }\n break;\n case HTTP_REQUESTED_RANGE_NOT_SATISFIABLE:\n updateDownloadFailed(request, HTTP_REQUESTED_RANGE_NOT_SATISFIABLE, conn.getResponseMessage());\n break;\n case HTTP_UNAVAILABLE:\n updateDownloadFailed(request, HTTP_UNAVAILABLE, conn.getResponseMessage());\n break;\n case HTTP_INTERNAL_ERROR:\n updateDownloadFailed(request, HTTP_INTERNAL_ERROR, conn.getResponseMessage());\n break;\n default:\n updateDownloadFailed(request, DownloadManager.ERROR_UNHANDLED_HTTP_CODE, \"Unhandled HTTP response:\" + responseCode + \" message:\" + conn.getResponseMessage());\n break;\n }\n } catch (SocketTimeoutException e) {\n e.printStackTrace();\n // Retry.\n attemptRetryOnTimeOutException(request);\n } catch (ConnectTimeoutException e) {\n e.printStackTrace();\n attemptRetryOnTimeOutException(request);\n } catch (IOException e) {\n e.printStackTrace();\n updateDownloadFailed(request, DownloadManager.ERROR_HTTP_DATA_ERROR, \"IOException \" + e.getMessage());\n } finally {\n if (conn != null) {\n conn.disconnect();\n }\n }\n }",
"public interface AdditionalDestination {\n\n public void copy(FileObject fo, String path);\n\n public void delete(FileObject fo, String path);\n\n}",
"public File get( String url, String suffix ) throws MojoExecutionException\n {\n if ( m_wagon == null )\n {\n m_log.error( \"must be connected first!\" );\n return null;\n }\n\n File file = null;\n try\n {\n file = File.createTempFile( String.valueOf( System.currentTimeMillis() ), suffix );\n }\n catch ( IOException e )\n {\n throw new MojoExecutionException( \"I/O problem\", e );\n }\n\n try\n {\n m_wagon.get( url, file );\n }\n catch ( TransferFailedException e )\n {\n file.delete(); // cleanup on failure\n throw new MojoExecutionException( \"Transfer failed\", e );\n }\n catch ( AuthorizationException e )\n {\n file.delete(); // cleanup on failure\n throw new MojoExecutionException( \"Authorization failed\", e );\n }\n catch ( ResourceDoesNotExistException e )\n {\n file.delete(); // return non-existent file\n }\n\n return file;\n }",
"@Override\n public void copyBlockdata(URI destination) throws IOException {\n getFileIoProvider().nativeCopyFileUnbuffered(\n getVolume(), getBlockFile(), new File(destination), true);\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n String myurl=taskSnapshot.getDownloadUrl().toString();\n\n String filepathuri=filePath.toString();\n\n String filename=filepathuri.substring(filepathuri.lastIndexOf(\"/\")+1);\n uploadreferance(myurl,filename);\n progressDialog.dismiss();\n\n //and displaying a success toast\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(Upload_files.this,navigation_bar.class);\n startActivity(intent);\n }",
"public static Uri getOutputMediaFileUri(Point point){\r\n return Uri.fromFile(getOutputMediaFile(point));\r\n }",
"public void testRemoteFileDescGetUrl() {\n\t\tSet urns = new HashSet();\n\t\turns.add(HugeTestUtils.URNS[0]);\n\t\tRemoteFileDesc rfd =\n\t\t\tnew RemoteFileDesc(\"www.test.org\", 3000, 10, \"test\", 10, TEST_GUID,\n\t\t\t\t\t\t\t 10, true, 3, true, null, urns, \n false, false,\"\",0, null, -1);\n\t\tURL rfdUrl = rfd.getUrl();\n\t\tString urlString = rfdUrl.toString();\n\t\tString host = rfd.getHost();\n\t\tString colonPort = \":\"+rfd.getPort();\n\t\tassertTrue(\"unexpected beginning of url\", \n\t\t\t\t urlString.startsWith(\"http://\"+host+colonPort));\n\t\tassertEquals(\"unexpected double slash\",\n\t\t urlString.indexOf(colonPort+\"//\"), -1);\n\t\tassertNotEquals(\"unexpected double slash\",\n\t\t -1, urlString.indexOf(\":3000/\"));\n\t}",
"private void configStorage(){\n try {\n final StorageReference storageReference = FirebaseStorage.getInstance()\n .getReference(\"motolost/\"+ String.valueOf(Math.random()) + getFileExtension(filePath));\n storageReference.putFile(filePath)\n .continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()) {\n throw task.getException();\n }\n return storageReference.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()) {\n Uri downloadUri = task.getResult();\n saveRegistry(downloadUri.toString());\n }\n }\n });\n } catch (Exception ex) {\n Constant.showMessage(\"Exception\", ex.getMessage(), this);\n }\n }",
"private Uri getOutputMediaFileUri(){\n\t\treturn Uri.fromFile( getOutputMediaFile() );\n\t}",
"private static Uri getOutputMediaFileUri(int type){\n return Uri.fromFile(getOutputMediaFile(type));\n }",
"private static Uri getOutputMediaFileUri(int type){\n return Uri.fromFile(getOutputMediaFile(type));\n }",
"void folderUploaded(String remoteFolder);",
"void sendToDestination(FileItem fileItem, String file_name){\n\n Resource res = new Resource();\n\n try {\n fileItem.write( new File(res.entry.getPathToDestination() + File.separator + file_name));\n logger.info(\"Successfully sent file to destination\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }",
"public interface FileService extends PublicService {\n\n /**\n * Retrieves reference to a file by fileName\n */\n FileReference getFile(String fileName);\n \n /**\n * Creates a reference for a new file.\n * Use FileReference.getOutputStream() to set content for the file.\n * Requires user to be a member of a contributer or full roles.\n * @param fileName\n * @param toolId - optional parameter\n * @return\n */\n FileReference createFile(String fileName, String toolId);\n \n /**\n * Deletes the file.\n * Requires user to be a member of a contributer or full roles.\n * @param fileReferece\n */\n void deleteFile(FileReference fileReferece);\n \n /**\n * Returns a url to the file\n * Property WebSecurityUtil.DBMASTER_URL (dbmaster.url) is used as a prefix\n */\n URL toURL(FileReference fileReferece);\n}",
"protected synchronized boolean copy2(String destStr)\n throws GATInvocationException {\n \t\n \tEndpointReferenceType credentialEndpoint = getCredentialEPR();\n TransferType[] transferArray = new TransferType[1];\n transferArray[0] = new TransferType();\n transferArray[0].setSourceUrl(rftgt42Location);\n transferArray[0].setDestinationUrl(destStr);\n RFTOptionsType rftOptions = new RFTOptionsType();\n rftOptions.setBinary(Boolean.TRUE);\n // rftOptions.setIgnoreFilePermErr(false);\n TransferRequestType request = new TransferRequestType();\n request.setRftOptions(rftOptions);\n request.setTransfer(transferArray);\n request.setTransferCredentialEndpoint(credentialEndpoint);\n setRequest(request);\n \n return status.equals(RequestStatusTypeEnumeration.Done.toString())\n || status.equals(TransferStatusTypeEnumeration.Finished\n .toString());\n }",
"@Override\n // Download file\n protected void onHandleIntent(@Nullable Intent intent) {\n String address = intent.getStringExtra(\"URL\");\n // Conecction with url\n HttpURLConnection connection = null;\n // Stream for save content\n OutputStream streamToFile = null;\n try {\n // Get filename from URL\n URL url = new URL(address);\n File file = new File(url.getFile());\n String fileName = file.getName();\n // Create new file\n DocumentFile directory = DocumentFile.fromTreeUri(this, uri);\n DocumentFile dFile = directory.createFile(\"\", fileName);\n // Make connection\n connection = (HttpURLConnection) url.openConnection();\n // Stream for fetching data\n DataInputStream dataInputStream = new DataInputStream(connection.getInputStream());\n // Initialize stream for writing\n streamToFile = getContentResolver().openOutputStream(dFile.getUri());\n\n //streamToFile = new FileOutputStream(f);\n // Buffor for data\n byte buffor[] = new byte[100];\n // Amount of readed data\n int gotBytes = dataInputStream.read(buffor, 0, 100);\n // Total readed data\n int totalBytes = 0;\n // Read untill end of file\n while (gotBytes != -1) {\n // Write read data to buffer\n streamToFile.write(buffor, 0, gotBytes);\n // How many bytes read\n gotBytes = dataInputStream.read(buffor, 0, 100);\n // Add readed bytes to total counter\n totalBytes += gotBytes;\n // Send message with readed bytes\n sendBroadcast(totalBytes);\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n // Close connetions\n if (connection != null)\n connection.disconnect();\n\n if (streamToFile != null) {\n try {\n streamToFile.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }",
"private static void copyFile(File scrFile, File file) {\n\t\r\n}",
"public String getFilePath() {\n return theRemoteFilePath;\n }",
"public File getRessourceFile() {\r\n\t\treturn local;\r\n\t}",
"private boolean restoreTransferFromFile(File f) {\n long fileSize = f.length();\n\n if (fileSize > org.dkf.jed2k.Constants.BLOCK_SIZE_INT) {\n log.warn(\"[ED2K service] resume data file {} has too large size {}, skip it\"\n , f.getName(), fileSize);\n return false;\n }\n\n TransferHandle handle = null;\n ByteBuffer buffer = ByteBuffer.allocate((int)fileSize);\n try(FileInputStream istream = openFileInput(f.getName())) {\n log.info(\"[ED2K service] load resume data {} size {}\"\n , f.getName()\n , fileSize);\n\n istream.read(buffer.array(), 0, buffer.capacity());\n // do not flip buffer!\n AddTransferParams atp = new AddTransferParams();\n atp.get(buffer);\n File file = new File(atp.getFilepath().asString());\n\n if (Platforms.get().saf()) {\n LollipopFileSystem fs = (LollipopFileSystem)Platforms.fileSystem();\n if (fs.exists(file)) {\n android.util.Pair<ParcelFileDescriptor, DocumentFile> resume = fs.openFD(file, \"rw\");\n\n if (resume != null && resume.second != null && resume.first != null && resume.second.exists()) {\n atp.setExternalFileHandler(new AndroidFileHandler(file, resume.second, resume.first));\n handle = session.addTransfer(atp);\n } else {\n log.error(\"[ED2K service] restore transfer {} failed document/parcel is null\", file);\n }\n } else {\n log.warn(\"[ED2K service] unable to restore transfer {}: file not exists\", file);\n }\n } else {\n if (file.exists()) {\n atp.setExternalFileHandler(new DesktopFileHandler(file));\n handle = session.addTransfer(atp);\n } else {\n log.warn(\"[ED2K service] unable to restore transfer {}: file not exists\", file);\n }\n }\n }\n catch(FileNotFoundException e) {\n log.error(\"[ED2K service] load resume data file not found {} error {}\", f.getName(), e);\n }\n catch(IOException e) {\n log.error(\"[ED2K service] load resume data {} i/o error {}\", f.getName(), e);\n }\n catch(JED2KException e) {\n log.error(\"[ED2K service] load resume data {} add transfer error {}\", f.getName(), e);\n }\n\n // log transfer handle if it has been added\n if (handle != null) {\n log.info(\"transfer {} is {}\"\n , handle.isValid() ? handle.getHash().toString() : \"\"\n , handle.isValid() ? \"valid\" : \"invalid\");\n }\n\n return handle != null;\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n StorageReference downloadUrl = taskSnapshot.getStorage();\n downloadImage(downloadUrl);\n Log.e(\"downloadUrl\", \" \" + downloadUrl);\n\n\n }",
"void sendFile(String fileName, String hostName, int port) throws IOException;",
"void getFile(String path, OutputStream stream) throws NotFoundException, IOException;",
"@Override\r\n\tpublic void putFile(InputStream is, String targetLocation) throws FileSystemUtilException {\r\n\t\tthrow new FileSystemUtilException(\"000000\",null,Level.ERROR,null);\t\r\n\r\n\t}",
"@Override\n\tprotected String getFileArress() {\n\t\treturn fileAddress;\n\t}",
"@Override\n protected File getTargetFile(String filename) throws IOException {\n return null;\n }",
"boolean upload(\n InputStream source, String remoteFileName);",
"@Override\n\tpublic byte[] fetchFile(String fileName) throws RemoteException {\n return null;\n\n\t}",
"public void findDestination() {\n\t\t\n\t}",
"private static URL toFileURL(URL resource) throws IOException {\n\t\t// Don't bother copying file urls\n\t\t//\n\t\tif (resource.getProtocol()\n\t\t\t.equalsIgnoreCase(\"file\"))\n\t\t\treturn resource;\n\n\t\t//\n\t\t// Need to make a copy to a temp file\n\t\t//\n\n\t\tFile f = File.createTempFile(\"resource\", \".jar\");\n\t\tFiles.createDirectories(f.getParentFile()\n\t\t\t.toPath());\n\t\ttry (InputStream in = resource.openStream(); OutputStream out = Files.newOutputStream(f.toPath())) {\n\t\t\tbyte[] buffer = new byte[BUFFER_SIZE];\n\t\t\tfor (int size; (size = in.read(buffer, 0, buffer.length)) > 0;) {\n\t\t\t\tout.write(buffer, 0, size);\n\t\t\t}\n\t\t}\n\t\tf.deleteOnExit();\n\t\treturn f.toURI()\n\t\t\t.toURL();\n\t}",
"public void getContentsIntoFile(String remotePath, String localFilePath) throws Exception\r\n {\r\n byte[] bytes = getBytes(remotePath);\r\n if (bytes == null) {\r\n bytes = new byte[0];\r\n }\r\n if (!ZkUtils.isHdfs(localFilePath))\r\n FileUtils.writeByteArrayToFile(new File(localFilePath), bytes);\r\n else {\r\n // write to Hdfs\r\n OutputStream os = ZkUtils.getOutPutStream(localFilePath);\r\n PrintStream file_stream = new PrintStream(os);\r\n file_stream.write(bytes);\r\n file_stream.flush();\r\n file_stream.close();\r\n }\r\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n }",
"public abstract String getFullPath();",
"@Override\n\t\t\t\t\t\tpublic boolean accept(File arg0, String arg1) {\n\t\t\t\t\t\t\tif(arg1.contains(\"jlink\") || arg1.contains(\"RECYCLE.BIN\")){\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tLogUtil.i(\"folder\",\"===\"+arg1+\".path==\"+arg0.getCanonicalPath());\n\t\t\t\t\t\t\t\t\tlocalStorePath = arg0.getCanonicalPath();\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}",
"@Override\n public void stageForCache_destination_exists() throws Exception {\n assumeTrue( !isWindows() );\n super.stageForCache_destination_exists();\n }",
"@SuppressLint(\"SimpleDateFormat\")\n public Uri getOutputImageFileUri(Context ctx) {\n\n String tstamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File file = new File(getTempDirectoryPath(ctx), \"IMG_\" + tstamp + \".jpg\");\n\n return Uri.fromFile(file);\n\n }",
"public void connect(File file, long position, long size) throws FileNotFoundException;",
"private String setFileDestinationPath(){\n String filePathEnvironment = Environment.getExternalStorageDirectory().getAbsolutePath();\n Log.d(TAG, \"Full path edited \" + filePathEnvironment + \"/earwormfix/\" + generatedFilename + EXTENSION_JPG);\n return filePathEnvironment+ \"/earwormfix/\" + generatedFilename + EXTENSION_JPG;\n }",
"public abstract String getFotoPath();",
"public String getSourceDownloadUrl();",
"@Override\n public MethodOutcome destinationFileExistsSrcIsFileOutcome() {\n return new MethodOutcome(MethodOutcome.Type.RETURNS_FALSE);\n }",
"public final File getLocalFile() throws IllegalArgumentException\n {\n if (hostOrNull != null)\n {\n throw new IllegalArgumentException(\"getLocalFile can only be called on local paths.\");\n }\n return new File(path);\n }",
"public void getFileData(int dLength,String charset) throws FileSystemUtilException\r\n\t{\r\n\t\tlogger.debug(\"Begin: \"+getClass().getName()+\":getFileData()\");\r\n\t\tFileOutputStream fOut=null;\r\n\t\tByteArrayOutputStream bOut = null;\r\n\t\tFileSystemUtilsPlugin zu = new FileSystemUtilPluginFactory().getFileUtils(FileSystemTypeConstants.ZIP);\r\n\t\tlong fileLen = 0;\r\n\t\tlong dataLength = dLength;\r\n\t\tif(isSample)\r\n\t\t{\r\n\t\t\tbOut = new ByteArrayOutputStream();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tlogger.debug(\"Opening output stream to file \"+localFilePath);\r\n\t\t\t\tlogger.debug(\"localFilePath:\"+localFilePath);\r\n\t\t\t\tfOut=new FileOutputStream(\"temp.txt\");\r\n\t\t\t\tlogger.debug(\"Output stream to file \"+localFilePath+\" is opened\");\r\n\t\t\t} \r\n\t\t\tcatch(FileNotFoundException fnfEx) \r\n\t\t\t{ fnfEx.printStackTrace();\r\n\t\t\t\t logger.info(new Date()+\":: File not found on connecting with parameters, \" +\r\n\t\t\t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n\t\t\t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\t\tthrow new FileSystemUtilException(\"ET0028\",null,Level.ERROR,fnfEx);\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\tString command = \"scp -f \"+remoteFilePath;\r\n\t\tObject[] ios= execCommand(command);\r\n\t\toutputstream=(OutputStream)ios[0];\r\n\t\tinputstream=(InputStream)ios[1];\r\n\t\tbyte[] buf = new byte[1024];\r\n\t\t// send '\\0'\r\n\t\tbuf[0] = 0;\r\n\t\ttry \r\n\t\t{\r\n\t\t\t//returning acknowledgement\r\n\t\t\toutputstream.write(buf, 0, 1);\t\t\r\n\t\t\toutputstream.flush();\r\n\t\t\tcheckAcknowledgement(inputstream);\r\n\t\t\t//getting filesize\r\n\t\t\t// read '0644 '\r\n\t\t\tinputstream.read(buf, 0, 5);\r\n\t\t\twhile (true) \r\n\t\t\t{\r\n\t\t\t\tinputstream.read(buf, 0, 1);\r\n\t\t\t\tif (buf[0] == ' ')\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tfileLen = fileLen * 10 + (buf[0] - '0');\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tString file = null;\r\n\t\t\tfor (int i = 0;; i++) \r\n\t\t\t{\r\n\t\t\t\tinputstream.read(buf, i, 1);\r\n\t\t\t\tif (buf[i] == (byte) 0x0a) \r\n\t\t\t\t{\r\n\t\t\t\t\tfile = new String(buf, 0, i);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"filesize=\"+fileLen+\", file=\"+file);\r\n\t\t\tif(dataLength == 0)\r\n\t\t\t{\r\n\t\t\t\tdataLength = fileLen;\r\n\t\t\t}\r\n\t\t\telse if(dataLength >= fileLen)\r\n\t\t\t{\r\n\t\t\t\tdataLength = fileLen;\r\n\t\t\t}else if(fileLen > dataLength * 10){\r\n\t\t\t\tdataLength = 1024 * 10;\r\n\t\t\t}\r\n\t\t\t// send '\\0'\r\n\t\t\tbuf[0] = 0;\r\n\t\t\toutputstream.write(buf, 0, 1);\r\n\t\t\toutputstream.flush();\r\n\t\t\tlong b=0;\r\n\t\t\tint l=0;\r\n\t\t\tint len=10240;\r\n\t\t\tif(len >= dataLength)\r\n\t\t\t{\r\n\t\t\t\tlen = (int)dataLength;\r\n\t\t\t}\r\n\t\t\tbyte[] barray = new byte[len];\r\n\t\t\tboolean noData = false;\r\n\t\t\tlong startTime = System.currentTimeMillis();\r\n\t\t\twhile( b < dataLength)\r\n\t\t\t{\r\n\t\t\t\tl=inputstream.read(barray,0,len);\r\n\t\t\t\tif(l != -1)\r\n\t\t\t\t{\r\n\t\t\t\t noData = false;\r\n\t\t\t\t\tb=b+l;\r\n\t\t\t\t\tif(isSample)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbOut.write(barray,0,l);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//check whether the data is crossed fileLength\r\n\t\t\t\t\t\tif(b > dataLength)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tl = l - (int)(b - dataLength);\t\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\tfOut.write(barray,0,l);\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t/* BUG-FIX thread hang due to network outage */\r\n\t\t\t\t //implementing readTImeout at client side.\r\n\t\t\t\t if(noData == false)\r\n\t\t\t\t {\r\n\t\t\t\t //this is first iteration with out data \r\n\t\t\t\t startTime = System.currentTimeMillis();\r\n\t\t\t\t noData = true;\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t //there is no data on prev iteration too\r\n\t\t\t\t if((System.currentTimeMillis()-startTime) >= this.readTimeOut)\r\n\t\t\t\t {\r\n\t\t\t\t throw new Exception(\"SCP fileDownload failed. readTimeout occured\");\r\n\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\t}\r\n //check stop flag, if true throw FileSystemUtilException with errorcode 999\r\n if(stop)\r\n {\r\n \tthrow new FileSystemUtilException(\"999\");\r\n }\r\n\t\t\t}\t\r\n\t\t\t// send '\\0'\r\n\t\t\tbuf[0] = 0;\r\n\t\t\toutputstream.write(buf, 0, 1);\r\n\t\t\toutputstream.flush();\r\n\t\t\tif(isSample)\r\n\t\t\t{\r\n\t\t\t\tString s=null;\r\n\t\t\t if(zu.isZip(remoteFilePath))\r\n\t\t\t {\r\n\t\t\t \tbyte [] stUnZip=bOut.toByteArray(); \r\n\t\t\t \tbyte [] sample = zu.streamUnZipper(stUnZip);\r\n\t\t\t \tbOut.reset();\r\n\t\t\t \tbOut.write(sample);\r\n\t\t\t //create a byte array stream with bOut\r\n\t\t\t //unzip the stream here and use that stream\r\n\t\t\t }\r\n\t\t\t if(true)/*if(!\"cp1252\".equalsIgnoreCase(charset))*/\r\n\t\t\t {\r\n\t\t\t \tsampleData = new String(bOut.toByteArray(),charset);\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t \tsampleData = new String(bOut.toByteArray());\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t\tlogger.debug(\"Sample data is : \"+sampleData);\r\n\t\t\t}else{\r\n\t\t\t\tsampleData = new String(barray,charset);\r\n\t\t\t}\r\n\t\t} \r\n\t\tcatch(UnsupportedEncodingException use)\r\n\t\t{\r\n\t\t\t logger.info(new Date()+\":: Unable to get data on connecting with parameters, \" +\r\n\t\t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n\t\t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\tthrow new FileSystemUtilException(\"ET0564\",null,Level.ERROR,use);\r\n\t\t}\t\r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\tlogger.info(new Date()+\":: Unable to get data on connecting with parameters, \" +\r\n\t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n\t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\tthrow new FileSystemUtilException(\"EL0004\",null,Level.ERROR,e);\r\n\t\t}\r\n\t\tcatch(FileSystemUtilException ebizEx)\r\n\t\t{\r\n //suppress if errorcode is 999\r\n\t\t\t\r\n if(!ebizEx.getErrorCode().equals(\"999\"))\r\n\t\t\t{\r\n \tlogger.info(new Date()+\":: Unable to get data on connecting with parameters, \" +\r\n \t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n \t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\t\tthrow ebizEx;\r\n }\r\n\t\t}\r\n\t\tcatch(Exception ex)\r\n\t\t{\r\n\t\t\tlogger.info(new Date()+\":: Unable to get data on connecting with parameters, \" +\r\n\t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n\t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\tthrow new FileSystemUtilException(\"EL0360\",null,Level.ERROR,ex);\t\t\t\t\r\n\t\t}\r\n\t\tfinally \r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tif(fOut != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tfOut.flush(); \r\n\t\t\t\t\tfOut.close();\r\n\t\t\t\t\tfOut = null;\r\n\t\t\t\t}\r\n\t\t\t\tif(bOut != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tbOut.flush(); \r\n\t\t\t\t\tbOut.close();\r\n\t\t\t\t\tbOut = null;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t} \r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\t//log warning\t\t\t\t\r\n\t\t\t}\t\t \r\n\t\t}\r\n\t\tlogger.debug(\"End: \"+getClass().getName()+\":getFileData()\");\r\n\t}",
"Path fileToUpload();",
"protected boolean sameFile(URL paramURL1, URL paramURL2) {\n/* 400 */ if (paramURL1.getProtocol() != paramURL2.getProtocol() && (paramURL1\n/* 401 */ .getProtocol() == null || \n/* 402 */ !paramURL1.getProtocol().equalsIgnoreCase(paramURL2.getProtocol()))) {\n/* 403 */ return false;\n/* */ }\n/* */ \n/* 406 */ if (paramURL1.getFile() != paramURL2.getFile() && (paramURL1\n/* 407 */ .getFile() == null || !paramURL1.getFile().equals(paramURL2.getFile()))) {\n/* 408 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 412 */ int i = (paramURL1.getPort() != -1) ? paramURL1.getPort() : paramURL1.handler.getDefaultPort();\n/* 413 */ int j = (paramURL2.getPort() != -1) ? paramURL2.getPort() : paramURL2.handler.getDefaultPort();\n/* 414 */ if (i != j) {\n/* 415 */ return false;\n/* */ }\n/* */ \n/* 418 */ if (!hostsEqual(paramURL1, paramURL2)) {\n/* 419 */ return false;\n/* */ }\n/* 421 */ return true;\n/* */ }",
"@Override\n\tpublic OutputStream writeResource(URI uri) throws StorageSecuirtyException,\n\t\t\tResourceAccessException {\n\t\treturn null;\n\t}",
"public boolean moveFile(final Uri source, final Uri target) throws IOException\n\t{\n\t\tif (FileUtil.isFileScheme(target) && FileUtil.isFileScheme(target))\n\t\t{\n\t\t\tFile from = new File(source.getPath());\n\t\t\tFile to = new File(target.getPath());\n\t\t\treturn moveFile(from, to);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tboolean success = copyFile(source, target);\n\t\t\tif (success) {\n\t\t\t\tsuccess = deleteFile(source);\n\t\t\t}\n\t\t\treturn success;\n\t\t}\n\t}"
]
| [
"0.59290475",
"0.5856111",
"0.57896036",
"0.56967664",
"0.5643194",
"0.5599683",
"0.55848694",
"0.5549758",
"0.5519098",
"0.55015653",
"0.54970074",
"0.54617286",
"0.54327697",
"0.53997177",
"0.539906",
"0.5394496",
"0.53751594",
"0.5370427",
"0.5363962",
"0.535455",
"0.5331998",
"0.5292946",
"0.5282339",
"0.52699107",
"0.52575654",
"0.52568376",
"0.52444607",
"0.522818",
"0.5218043",
"0.5214286",
"0.5202555",
"0.5192652",
"0.51794845",
"0.5171718",
"0.5164306",
"0.51567346",
"0.51415914",
"0.51360124",
"0.5132889",
"0.51323324",
"0.51257247",
"0.51119107",
"0.5109764",
"0.51027346",
"0.5089263",
"0.5085832",
"0.50798637",
"0.5078688",
"0.5078128",
"0.50734687",
"0.50722486",
"0.5071624",
"0.50699925",
"0.50564736",
"0.50450844",
"0.5040923",
"0.5040294",
"0.5036194",
"0.5036108",
"0.50337285",
"0.5029386",
"0.5026239",
"0.5020255",
"0.5020255",
"0.5020181",
"0.50101936",
"0.50049883",
"0.499708",
"0.499224",
"0.49900454",
"0.49637064",
"0.49599957",
"0.49569657",
"0.49495706",
"0.49440765",
"0.49415267",
"0.4932836",
"0.4913918",
"0.49130753",
"0.49108604",
"0.49103495",
"0.49102417",
"0.49055642",
"0.4893756",
"0.48924592",
"0.48918876",
"0.48823372",
"0.48777533",
"0.48677802",
"0.48650312",
"0.48642766",
"0.4863417",
"0.48627183",
"0.4862005",
"0.4860271",
"0.4859596",
"0.485553",
"0.4852616",
"0.48491442",
"0.48465624"
]
| 0.52718663 | 23 |
for local replicas, we assume the destination URI is file | @Override
public void copyBlockdata(URI destination) throws IOException {
getFileIoProvider().nativeCopyFileUnbuffered(
getVolume(), getBlockFile(), new File(destination), true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getFileTransferServer();",
"@Override\n\tpublic URI copy(URI uri, URI toURI) throws StorageSecuirtyException,\n\t\t\tResourceAccessException {\n\t\treturn null;\n\t}",
"private Step copyRemoteFiles() {\n return stepBuilderFactory.get(STEP_COPY_REMOTE_FILES)\n .tasklet(copyRemoteFilesTask)\n .build();\n }",
"private Path getTargetFile(Endpoint target) {\n Path targetFile;\n if (target.getUrl().startsWith(\"sftp:\")) {\n URI host = null;\n URI rawuri = null;\n String path = null;\n try {\n rawuri = new URI(target.getUrl());\n path = rawuri.getRawPath();\n if (rawuri.getPort() == -1) {\n host = new URI(rawuri.getScheme() + \"://\" + rawuri.getHost());\n } else {\n host = new URI(rawuri.getScheme() + \"://\" + rawuri.getHost() + \":\" + rawuri.getPort());\n }\n } catch (URISyntaxException e) {\n throw new IllegalArgumentException(e);\n }\n SFTPEnvironment environment = new SFTPEnvironment().withUsername(target.getUser())\n .withPassword(target.getPassword().toCharArray())\n .withKnownHosts(new File(System.getProperty(\"user.home\"), \".ssh/known_hosts\"));\n FileSystem fileSystem = null;\n try {\n fileSystem = FileSystems.newFileSystem(host, environment,\n SFTPFileSystemProvider.class.getClassLoader());\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n targetFile = fileSystem.getPath(path);\n } else {\n targetFile = getProject().file(target.getUrl()).toPath();\n }\n return targetFile;\n \n }",
"@Test(groups = \"Integration\")\n public void testCopyStreamTo() throws Exception {\n String contents = \"abc\";\n File dest = new File(Os.tmp(), \"sssMachineLocationTest_dest.tmp\");\n try {\n host.copyTo(Streams.newInputStreamWithContents(contents), dest.getAbsolutePath());\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n dest.delete();\n }\n }",
"public void saveLink() {\n\t\t\t// check to see if the file exists locally\n\t\t\tString localFile = localUrl + \"/\" + filePath;\n\n\t\t\tboolean finished = false;\n\t\t\twhile (!finished) {\n\t\t\t\ttry {\n\n\t\t\t\t\tFile file = new File(localFile);\n\t\t\t\t\t// build remote path\n\t\t\t\t\tString finalRemoteUrl = remoteUrl;\n\t\t\t\t\tif (filePath.startsWith(\"/\")) {\n\t\t\t\t\t\tURL url = new URL(finalRemoteUrl);\n\t\t\t\t\t\tfinalRemoteUrl = url.getProtocol() + \"://\" + url.getHost();\n\t\t\t\t\t}\n\n\t\t\t\t\tString remoteFile = finalRemoteUrl + filePath;\n\t\t\t\t\tif (file.canRead() && !file.isDirectory()) {\n\t\t\t\t\t\tLong fileLength = file.length();\n\t\t\t\t\t\t// if it does, check to see if it is complete based on\n\t\t\t\t\t\t// length of file\n\t\t\t\t\t\tlogger.trace(\"file/dir already exists: {}\", localFile);\n\t\t\t\t\t\tURLConnection connection = buildConnection(remoteFile);\n\t\t\t\t\t\tMap<String, List<String>> map = connection.getHeaderFields();\n\t\t\t\t\t\tif (map.get(\"Content-Length\") == null) {\n\t\t\t\t\t\t\tlogger.debug(\"no header fields were returned when attempting to access: {}\", remoteFile);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tLong remoteLength = Long.parseLong(map.get(\"Content-Length\").iterator().next());\n\n\t\t\t\t\t\t// if it is not complete, resume downloading\n\t\t\t\t\t\tif (remoteLength > fileLength || fileLength == 0) {\n\t\t\t\t\t\t\ttransferFromRemoteToLocal(remoteFile, localFile, fileLength, remoteLength);\n\t\t\t\t\t\t\tfinished = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlogger.trace(\"file is already complete, moving on\");\n\t\t\t\t\t\t\tfinished = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if it is does not exist, create the directory or file\n\t\t\t\t\t\tlogger.trace(\"file does not exist: {}\", localFile);\n\n\t\t\t\t\t\t// take care of the directory structure\n\t\t\t\t\t\tFiles.createParentDirs(new File(localFile));\n\n\t\t\t\t\t\t// save the file\n\t\t\t\t\t\tlogger.trace(\"preparing to write remote file {} to local file {}\", new Object[] { remoteFile,\n\t\t\t\t\t\t\t\tlocalFile });\n\n\t\t\t\t\t\ttransferFromRemoteToLocal(remoteFile, localFile);\n\t\t\t\t\t\tlogger.trace(\"file created: {}\", localFile);\n\t\t\t\t\t\tfinished = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t// timeout took place. pause, then let the loop execute\n\t\t\t\t\t// again\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\tlogger.error(\"exception while processing a link\", e);\n\t\t\t\t\tfinished = true;\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tlogger.error(\"exception while processing a link\", e);\n\t\t\t\t\tlogger.debug(\"will try again in {} milliseconds\", TIMEOUT_TIME);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(TIMEOUT_TIME);\n\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\tlogger.error(\"failed while trying to wait {} milliseconds\", TIMEOUT_TIME);\n\t\t\t\t\t}\n\t\t\t\t\tlogger.debug(\"just woke up, trying again\");\n\t\t\t\t\tfinished = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounter.incrementAndGet();\n\t\t\tlogger.debug(\"successfully downloaded the file {} from {} to {} - {}\", new Object[] { filePath, remoteUrl,\n\t\t\t\t\tlocalUrl, completionMessage() });\n\n\t\t\tLinesToFileWriter lineWriter = new LinesToFileWriter(localUrl, COMPLETED_PATH_LIST, true);\n\t\t\t// write line to completed file list\n\t\t\tlineWriter.writeLine(filePath);\n\t\t\tlineWriter.close();\n\t\t}",
"public void setFileTransferServer(String serverUrl);",
"private boolean isLocalFile(Uri uri) {\n String auth = uri.getHost();\n\n if (auth.equals(\"localhost\") || uri.getScheme().equals(\"file\")) {\n return true;\n }\n return false;\n }",
"public abstract String getFileLocation();",
"@Cold\n @Override\n public Single<Uri> getDownloadUrl(String remoteDestinationPath) {\n return RxTask.toSingle(() -> createReference(remoteDestinationPath).getDownloadUrl())\n .doOnError(e -> Timber.e(\"StorageException handled and can be ignored\"));\n }",
"abstract String getFileRoute() throws IOException;",
"protected void downloadTo(VFSTransfer transfer,VFile targetLocalFile)\n throws VlException\n {\n // copy contents into local file:\n vrsContext.getTransferManager().doStreamCopy(transfer,this,targetLocalFile); \n }",
"URL toURL(FileReference fileReferece);",
"@Override\n\tprotected RemoteOperationResult run(OwnCloudClient client) {\n\n \t/// check parameters\n if (!FileUtils.isValidPath(mTargetRemotePath)) {\n \treturn new RemoteOperationResult(ResultCode.INVALID_CHARACTER_IN_NAME);\n }\n\n if (mTargetRemotePath.equals(mSrcRemotePath)) {\n \t// nothing to do!\n return new RemoteOperationResult(ResultCode.OK);\n }\n\n if (mTargetRemotePath.startsWith(mSrcRemotePath)) {\n \treturn new RemoteOperationResult(ResultCode.INVALID_MOVE_INTO_DESCENDANT);\n }\n\n\n /// perform remote operation\n\t\t//LocalMoveMethod move = null;\n\t\tMoveMethod move = null;\n\t\tRemoteOperationResult result = null;\n try {\n move = new MoveMethod(\n \t\tclient.getWebdavUri() + WebdavUtils.encodePath(mSrcRemotePath),\n \t\tclient.getWebdavUri() + WebdavUtils.encodePath(mTargetRemotePath),\n \t\tmOverwrite\n \t\t);\n int status = client.executeMethod(move, MOVE_READ_TIMEOUT, MOVE_CONNECTION_TIMEOUT);\n\n /// process response\n \tif (status == HttpStatus.SC_MULTI_STATUS) {\n \t\tresult = processPartialError(move);\n\n \t} else if (status == HttpStatus.SC_PRECONDITION_FAILED && !mOverwrite) {\n\n \t\tresult = new RemoteOperationResult(ResultCode.INVALID_OVERWRITE);\n \t\tclient.exhaustResponse(move.getResponseBodyAsStream());\n\n\n \t\t/// for other errors that could be explicitly handled, check first:\n \t\t/// http://www.webdav.org/specs/rfc4918.html#rfc.section.9.9.4\n\n \t} else {\n\n\t result = new RemoteOperationResult(\n\t \t\tisSuccess(status), \t// move.succeeded()? trustful?\n\t \t\tstatus,\n\t \t\tmove.getResponseHeaders()\n \t\t);\n \t\tclient.exhaustResponse(move.getResponseBodyAsStream());\n }\n\n Log.i(TAG, \"Move \" + mSrcRemotePath + \" to \" + mTargetRemotePath + \": \" +\n \t\tresult.getLogMessage());\n\n } catch (Exception e) {\n result = new RemoteOperationResult(e);\n Log.e(TAG, \"Move \" + mSrcRemotePath + \" to \" + mTargetRemotePath + \": \" +\n \t\tresult.getLogMessage(), e);\n\n } finally {\n if (move != null)\n move.releaseConnection();\n }\n\n return result;\n\t}",
"@Override\n public void prepare() {\n //Caching as file resource.\n File file = this.getResource().file;\n logger.info(\"Preparing {} streams for file: {}\", this.getTransferType(), file.getName());\n\n if (this.getTransferType() == ResourceTransferType.OUTBOUND) {\n //Sending\n try {\n buffer = new byte[BUFFER_SIZE];\n sent = 0;\n inputChannel = new FileInputStream(file).getChannel();\n inputBuffer = inputChannel.map(FileChannel.MapMode.READ_ONLY, 0, inputChannel.size());\n } catch (FileNotFoundException e) { //File doesn't exist.\n //Calling a transfer error.\n callError(e);\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else {\n //Receiving\n //Checking if file already exists.\n written = 0;\n saved = 0;\n if (getResource().isLocal()) {\n getResource().calcNetworkId();\n if (getResource().getNetworkID().equals(getTunnel().getDestination())) {\n //The file is already stored locally.\n getTunnel().sendMessage(new ResourceTransferControlMessage(this.getTransferId(), -2));\n this.close();\n return;\n }\n }\n\n //Creating or replacing the file.\n buffer = new byte[BUFFER_SIZE * 16];\n if (file.exists()) {\n file.delete();\n }\n try { //Creating new file.\n file.createNewFile();\n outputStream = new FileOutputStream(file);\n } catch (IOException e) {\n //Calling a transfer error.\n callError(e);\n return;\n }\n\n //Requesting the first chunk.\n getTunnel().sendMessage(new ResourceTransferControlMessage(this.getTransferId(), 0));\n }\n }",
"private void downloadFile(URL source, File localDirectory, String localFileName, boolean griffin)\n throws SocketException {\n\n if (griffin) {\n try {\n downloadFileFromGriffin(source, localDirectory, localFileName);\n } catch (IOException ex) {\n downloadFileFromMentor(source, localDirectory, localFileName);\n }\n } else {\n downloadFileFromMentor(source, localDirectory, localFileName);\n }\n\n }",
"public File writeBackFileToDvn(RConnection c, String targetFilename,\n String tmpFilePrefix, String tmpFileExt, int fileSize){\n File tmprsltfl = null;\n \n String resultFilePrefix = tmpFilePrefix + PID + \".\";\n \n String rfsffx = \".\" + tmpFileExt;\n RFileInputStream ris = null;\n OutputStream outbr = null;\n try {\n tmprsltfl = File.createTempFile(resultFilePrefix, rfsffx);\n \n //outbr = new FileOutputStream(tmprsltfl);\n outbr = new BufferedOutputStream(new FileOutputStream(tmprsltfl));\n //File tmp = new File(targetFilename);\n //long tmpsize = tmp.length();\n // open the input stream\n ris = c.openFile(targetFilename);\n \n if (fileSize < 1024*1024*500){\n int bfsize = fileSize +1;\n byte[] obuf = new byte[bfsize];\n ris.read(obuf);\n //while ((obufsize =)) != -1) {\n outbr.write(obuf, 0, bfsize);\n //}\n }\n ris.close();\n outbr.close();\n return tmprsltfl;\n } catch (FileNotFoundException fe){\n fe.printStackTrace();\n dbgLog.fine(\"FileNotFound exception occurred\");\n return tmprsltfl;\n } catch (IOException ie){\n ie.printStackTrace();\n dbgLog.fine(\"IO exception occurred\");\n } finally {\n if (ris != null){\n try {\n ris.close();\n } catch (IOException e){\n \n }\n }\n \n if (outbr != null){\n try {\n outbr.close();\n } catch (IOException e){\n \n }\n }\n \n }\n return tmprsltfl;\n }",
"private String mainAccessToFile(String fileName, DataLocation loc, AccessMode am, String destDir) {\n FileAccessParams fap = new FileAccessParams(am, loc);\n DataLocation targetLocation = ap.mainAccessToFile(loc, fap, destDir);\n\n // Checks on target\n String path = (targetLocation == null) ? fileName : targetLocation.getPath();\n DataLocation finalLocation = (targetLocation == null) ? loc : targetLocation;\n if (finalLocation == null) {\n ErrorManager.fatal(ERROR_FILE_NAME);\n return null;\n }\n\n // Return the final target path\n String finalPath;\n MultiURI u = finalLocation.getURIInHost(Comm.getAppHost());\n if (u != null) {\n finalPath = u.getPath();\n } else {\n finalPath = path;\n }\n\n return finalPath;\n }",
"boolean download(\n String remoteFileName, OutputStream destination);",
"@Override\n\tpublic URI move(URI uri, URI toURI) throws StorageSecuirtyException,\n\t\t\tResourceAccessException {\n\t\treturn null;\n\t}",
"private String generateTargetFileUri(String fileUri) {\n return folderName.concat(fileUri);\n }",
"private boolean copyFile(FileInputStream srcStream, String filePath) {\n FileChannel srcChannel;\n FileOutputStream destStream;\n Throwable th;\n if (srcStream != null) {\n if (filePath != null) {\n FileOutputStream destStream2 = null;\n FileChannel dstChannel = null;\n FileChannel dstChannel2 = null;\n try {\n destStream2 = new FileOutputStream(createDestFile(filePath));\n FileChannel srcChannel2 = srcStream.getChannel();\n try {\n FileChannel dstChannel3 = destStream2.getChannel();\n try {\n srcChannel2.transferTo(0, srcChannel2.size(), dstChannel3);\n boolean isSuccess = true;\n try {\n srcChannel2.close();\n } catch (IOException e) {\n isSuccess = false;\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n try {\n destStream2.close();\n } catch (IOException e2) {\n isSuccess = false;\n Log.e(TAG, \"destStream close error, IOException:\");\n }\n if (dstChannel3 != null) {\n try {\n dstChannel3.close();\n } catch (IOException e3) {\n Log.e(TAG, \"dstChannel close error, IOException:\");\n return false;\n }\n }\n return isSuccess;\n } catch (FileNotFoundException e4) {\n dstChannel2 = dstChannel3;\n dstChannel = srcChannel2;\n boolean isSuccess2 = false;\n Log.e(TAG, \"copyFile FileNotFoundException.\");\n if (dstChannel != null) {\n try {\n dstChannel.close();\n } catch (IOException e5) {\n isSuccess2 = false;\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n }\n if (destStream2 != null) {\n try {\n destStream2.close();\n } catch (IOException e6) {\n Log.e(TAG, \"destStream close error, IOException:\");\n isSuccess2 = false;\n }\n }\n if (dstChannel2 == null) {\n return isSuccess2;\n }\n dstChannel2.close();\n return isSuccess2;\n } catch (IOException e7) {\n dstChannel2 = dstChannel3;\n dstChannel = srcChannel2;\n boolean isSuccess3 = false;\n try {\n Log.e(TAG, \"init IO error, IOException:\");\n if (dstChannel != null) {\n try {\n dstChannel.close();\n } catch (IOException e8) {\n isSuccess3 = false;\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n }\n if (destStream2 != null) {\n try {\n destStream2.close();\n } catch (IOException e9) {\n Log.e(TAG, \"destStream close error, IOException:\");\n isSuccess3 = false;\n }\n }\n if (dstChannel2 == null) {\n return isSuccess3;\n }\n try {\n dstChannel2.close();\n return isSuccess3;\n } catch (IOException e10) {\n Log.e(TAG, \"dstChannel close error, IOException:\");\n return false;\n }\n } catch (Throwable th2) {\n srcChannel = dstChannel2;\n destStream = destStream2;\n th = th2;\n }\n } catch (Throwable th3) {\n destStream = destStream2;\n th = th3;\n srcChannel = dstChannel3;\n dstChannel = srcChannel2;\n if (dstChannel != null) {\n try {\n dstChannel.close();\n } catch (IOException e11) {\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n }\n if (destStream != null) {\n try {\n destStream.close();\n } catch (IOException e12) {\n Log.e(TAG, \"destStream close error, IOException:\");\n }\n }\n if (srcChannel != null) {\n try {\n srcChannel.close();\n } catch (IOException e13) {\n Log.e(TAG, \"dstChannel close error, IOException:\");\n }\n }\n throw th;\n }\n } catch (FileNotFoundException e14) {\n dstChannel = srcChannel2;\n boolean isSuccess22 = false;\n Log.e(TAG, \"copyFile FileNotFoundException.\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n } catch (IOException e15) {\n dstChannel = srcChannel2;\n boolean isSuccess32 = false;\n Log.e(TAG, \"init IO error, IOException:\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n } catch (Throwable th4) {\n dstChannel = srcChannel2;\n srcChannel = null;\n destStream = destStream2;\n th = th4;\n if (dstChannel != null) {\n }\n if (destStream != null) {\n }\n if (srcChannel != null) {\n }\n throw th;\n }\n } catch (FileNotFoundException e16) {\n boolean isSuccess222 = false;\n Log.e(TAG, \"copyFile FileNotFoundException.\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n } catch (IOException e17) {\n boolean isSuccess322 = false;\n Log.e(TAG, \"init IO error, IOException:\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n }\n }\n }\n return false;\n }",
"@Test(groups = \"Integration\")\n public void testCopyFileTo() throws Exception {\n File dest = Os.newTempFile(getClass(), \".dest.tmp\");\n File src = Os.newTempFile(getClass(), \".src.tmp\");\n try {\n Files.write(\"abc\", src, Charsets.UTF_8);\n host.copyTo(src, dest);\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n src.delete();\n dest.delete();\n }\n }",
"@Override\n public void copyMetadata(URI destination) throws IOException {\n getFileIoProvider().nativeCopyFileUnbuffered(\n getVolume(), getMetaFile(), new File(destination), true);\n }",
"private static Uri getOutputMediaFileUri(){\n return Uri.fromFile(getOutputMediaFile());\n }",
"public void execute(Request request, Response response, boolean do_copy) throws IOException, HTTPException {\n\t\t\n\t\tURI uri = request.getUri();\n\t\tIDirectory source_parent = getParent(uri); // Get the parent directory of the source location.\n\t\tString source_base_name = UriUtil.baseName(uri); // Get the name of the location within that directory.\n\t\tString if_header = request.getHeader(HTTP.HEADER_IF); // Get the If header.\n\t\tString lock_token = getLockTokenFromIfHeader(if_header);\n\t\t\n\t\tDiagnostic.trace(\"Source name = \" + source_base_name, Diagnostic.RUN);\n\t\t\n\t\t// Deal with the destination location.\n\t\tString destination_header = request.getHeader(HTTP.HEADER_DESTINATION);\n\t\tif (destination_header == null) throw new HTTPException(\"No destination specified\");\n\t\t\n\t\ttry {\n\t\t\tURI destination_file_path = new URI(destination_header); // Get the file path of the destination location.\n\t\t\tIDirectory destination_parent = getParent(destination_file_path); // Get the parent directory of that location.\n\t\t\tString destination_base_name = UriUtil.baseName(destination_file_path); // Get the name of the location within that directory.\n\t\t\t\n\t\t\t// Should overwrite unless flag explicitly set to false in header.\n\t\t\t// See RFC 2518 8.8.6/7.\n\t\t\tboolean overwrite = shouldOverwrite(request);\n\t\t\t\n\t\t\t// Remember whether destination is non-null, for setting result code.\n\t\t\tboolean destination_not_null = destination_parent.contains(destination_base_name);\n\t\t\t\n\t\t\t// If a lock token was specified in an If header, the file must be currently locked with the given token.\n\t\t\tif (lock_token != null) lock_manager.checkWhetherLockedWithToken(uri, lock_token);\n\t\t\t\n\t\t\t// TODO check if the destination is locked, in which case must have lock token. Ditto for source in case of move.\n\t\t\t\n\t\t\t// Either copy the object or move it.\n\t\t\tif (do_copy) {\n\t\t\t\tfile_system.copyObject(source_parent, source_base_name, destination_parent, destination_base_name, overwrite);\n\t\t\t} else {\n\t\t\t\tfile_system.moveObject(source_parent, source_base_name, destination_parent, destination_base_name, overwrite);\n\t\t\t}\n\t\t\t\n\t\t\tif (destination_not_null) response.setStatusCode(HTTP.RESPONSE_NO_CONTENT);\n\t\t\telse response.setStatusCode(HTTP.RESPONSE_CREATED);\n\t\t\t\n\t\t\tresponse.close();\n\t\t}\n\t\tcatch (LockUseException e) {\n handleLockException(lock_token, e);\n\t\t}\n\t\tcatch (BindingAbsentException e) {\n\t\t\tthrow new HTTPException(\"Source object not found\", HTTP.RESPONSE_NOT_FOUND, true);\n\t\t}\n\t\tcatch (BindingPresentException e) {\n\t\t\tthrow new HTTPException(\"Destination non-null with no-overwrite\", HTTP.RESPONSE_PRECONDITION_FAILED, true);\n\t\t}\n\t\tcatch (PersistenceException e) {\n\t\t\tthrow new HTTPException(\"Couldn't create copy\", HTTP.RESPONSE_INTERNAL_SERVER_ERROR, true);\n\t\t}\n\t\tcatch (URISyntaxException e) {\n\t\t\tthrow new HTTPException(\"Invalid destination path\", HTTP.RESPONSE_BAD_REQUEST, true);\n\t\t}\n\t}",
"@Override\n\t\t\tprotected URI toUriImpl(String path) throws URISyntaxException {\n\t\t\t\treturn toFileToURI(path);\n\t\t\t}",
"@Override\n\tpublic void transferTo(File dest) throws IOException, IllegalStateException {\n\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tString sourcePathHdfs=args[0];\n\t\tString destinationPath=args[1];\n\t\tnew CopyToLocal().copyToLocal(sourcePathHdfs, destinationPath);\n\t\t\n\t}",
"@Override\r\n\tpublic boolean downloadFile() throws FileSystemUtilException {\r\n\t\tlogger.debug(\"Begin: \" + getClass().getName() + \":download()\");\r\n\t\ttry {\r\n\t\t\tconnect();\r\n\t\t\tgetFileData(0, \"\");\r\n\t\t\tdisconnect();\r\n\t\t\tif (stop) {\r\n\t\t\t\tthrow new FileSystemUtilException(\"999\");\r\n\t\t\t}\r\n\t\t\tFileSystemUtilsPlugin zu = new FileSystemUtilPluginFactory().getFileUtils(FileSystemTypeConstants.ZIP);\r\n\t\t\tif (zu.isZip(localFilePath)) {\r\n\r\n\t\t\t\t// unzip the localfilepath (a common method at import util level\r\n\t\t\t\t// can be used)\r\n\t\t\t\t// rename the extracted file to localfilepath+\".txt\r\n\t\t\t\t// delete the localfilepath\r\n\t\t\t}\r\n\t\t\tzu = null;\r\n\t\t\tlogger.debug(\"End: \" + getClass().getName() + \":download()\");\r\n\t\t\treturn true;\r\n\t\t} catch (FileSystemUtilException e) {\r\n\t\t\tdisconnect();\r\n\t\t\tlogger.info(new Date() + \":: Unable to download with parameters \" + \", username= \" + username\r\n\t\t\t\t\t+ \" , password = \" + password + \" , remotefilePath = \" + remoteFilePath + \", \" + \"localFilePath = \"\r\n\t\t\t\t\t+ localFilePath + \" , host= \" + hostname + \" and port =\" + port);\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}",
"public static void tranferFile() {\n\n FTPClient ftpClient = new FTPClient();\n try {\n ftpClient.connect(\"192.168.231.237\", 80);\n ftpClient.login(\"root\", \"xpsr@350\");\n ftpClient.enterLocalPassiveMode();\n\n ftpClient.setFileType(FTP.BINARY_FILE_TYPE);\n File sourceFile = new File(\"/home/sthiyagaraj/eclipse-workspace/KonnectAPI/target/APIURL.tar.gz\");\n InputStream inputStream = new FileInputStream(sourceFile);\n\n boolean done = ftpClient.storeFile(\"filename which receiver get\", inputStream);\n inputStream.close();\n if (done) {\n System.out.println(\"file is uploaded successfully..............\");\n }\n\n } catch (IOException e) {\n System.err.println(\"Exception occured while ftp : \"+e);\n } finally {\n try {\n if (ftpClient.isConnected()) {\n ftpClient.logout();\n ftpClient.disconnect();\n }\n } catch (IOException e) {\n System.err.println(\"Exception occured while ftp logout/disconnect : \"+e);\n }\n }\n\n }",
"public boolean copyFile(final Uri source, final Uri target)\n\t\t\tthrows IOException\n\t{\n\t\tInputStream inStream = null;\n\t\tOutputStream outStream = null;\n\n\t\tUsefulDocumentFile destinationDoc = getDocumentFile(target, false, true);\n\t\tUsefulDocumentFile.FileData destinationData = destinationDoc.getData();\n\t\tif (!destinationData.exists)\n\t\t{\n\t\t\tdestinationDoc.getParentFile().createFile(null, destinationData.name);\n\t\t\t// Note: destinationData is invalidated upon creation of the new file, so make a direct call following\n\t\t}\n\t\tif (!destinationDoc.exists())\n\t\t{\n\t\t\tthrow new WritePermissionException(\n\t\t\t\t\t\"Write permission not found. This indicates a SAF write permission was requested. \" +\n\t\t\t\t\t\"The app should store any parameters necessary to resume write here.\");\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tinStream = FileUtil.getInputStream(this, source);\n\t\t\toutStream = getContentResolver().openOutputStream(target);\n\n\t\t\tUtil.copy(inStream, outStream);\n\t\t}\n\t\tcatch(ArithmeticException e)\n\t\t{\n\t\t\tLog.d(TAG, \"File larger than 2GB copied.\");\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tthrow new IOException(\"Failed to copy \" + source.getPath() + \": \" + e.toString());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tUtil.closeSilently(inStream);\n\t\t\tUtil.closeSilently(outStream);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public void updateWithReplica(StorageLocation replicaLocation) {\n File diskFile = null;\n try {\n diskFile = new File(replicaLocation.getUri());\n } catch (IllegalArgumentException e) {\n diskFile = null;\n }\n\n if (null == diskFile) {\n setDirInternal(null);\n } else {\n setDirInternal(diskFile.getParentFile());\n }\n }",
"@Override\n public boolean createPhotoRefactored(File local, Album album, Url url) {\n AlbumSlice slice = WifiDirectProvider.this.getAlbumSlice(album, UserSessionDetails.user_id);\n //slice.photos.add(new CachedPhoto(slice, new Url(album.url+\"/\"+local.getName()), local));\n File output = new File(ctx.getFilesDir(), \"wifi-direct/\"+album.name + \"/\" + UserSessionDetails.user_id + \"/\" + local.getName());\n boolean result = Util.copyFile(local, output);\n if(result) {\n album.localPhotos.add(new CachedPhoto(slice, new Url(album.name + \"/\" + local.getName()), output));\n }\n\n //SocketManager.getInstance().sendPhoto(album.name, local.getName(), output);\n WifiDirectConnectionsManager.getInstance().broadcastPhoto(album.name,\n new File(ctx.getFilesDir(), \"wifi-direct/\"+album.name + \"/\" + UserSessionDetails.user_id + \"/\" + local.getName()));\n\n return result;\n }",
"private Uri getOutputMediaFileUri(int type){\n return Uri.fromFile(getOutputMediaFile(type));\n }",
"public Blob downloadFile(String inKey, File inDestFile);",
"public interface FileConnection {\r\n\r\n\t/**\r\n\t * Execute a SFTP get and write the file to the passed output stream.\r\n\t * \r\n\t * @param path\r\n\t * @param stream\r\n\t * @throws IOException \r\n\t */\r\n\tvoid getFile(String path, OutputStream stream) throws NotFoundException, IOException;\r\n\t\r\n\t/**\r\n\t * Request a range of bytes from the given file.\r\n\t * \r\n\t * @param path\r\n\t * @param stream\r\n\t * @param startByteIndex The index of the start of the byte range to be read.\r\n\t * @param endByteIndex The index of the end of the byte range to be read.\r\n\t * @return True if the end of the file was reached with this read.\r\n\t * \r\n\t * @throws NotFoundException\r\n\t * @throws IOException \r\n\t */\r\n\tboolean getFileRange(String path, OutputStream stream, long startByteIndex, long endByteIndex) throws NotFoundException, IOException;\r\n\r\n\t/**\r\n\t * Get the size of a given file.\r\n\t * @param path\r\n\t * @return\r\n\t */\r\n\tlong getFileSize(String path) throws NotFoundException;\r\n\t\r\n\t/**\r\n\t * Get the last modified date of the file in UTC.\r\n\t * @param path\r\n\t * @return\r\n\t * @throws NotFoundException\r\n\t */\r\n\tlong getLastModifiedDate(String path) throws NotFoundException;\r\n}",
"public File getFile()\r\n \t{\r\n \t\tFile result = null;\r\n \t\t\r\n \t\tString hostName = getAuthority();\r\n \t\t\r\n \t\tif((hostName == null) || hostName.equals(\"\") || hostName.equalsIgnoreCase(\"localhost\"))\r\n \t\t{\r\n \t\t\tString filePath = getPath();\r\n \t\t\tresult = new File(filePath);\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tthrow new RuntimeException(\"Can't resolve files on remote host machines\");\r\n \t\t}\r\n \t\t\r\n \t\treturn result;\r\n \t}",
"@Override\n public String getDestination() {\n return this.dest;\n }",
"@Test\n\tvoid testFileURI(@TempDir Path tempDir) {\n\t\tfinal File tempFile = tempDir.resolve(\"foo.bar\").toFile();\n\t\tfinal URI fileURI = Files.toURI(tempFile); //create a Java URI directly from a file\n\t\tassertThat(fileURI.getScheme(), is(FILE_SCHEME)); //file:\n\t\tassertTrue(fileURI.getRawPath().startsWith(ROOT_PATH)); //file:/\n\t\tassertFalse(fileURI.getRawPath().startsWith(ROOT_PATH + PATH_SEPARATOR + PATH_SEPARATOR)); //not file:/// (even though that is correct)\n\t}",
"protected File copyURLToFile(String filename) throws IOException {\r\n\t\tURL deltaFileUrl = getClass().getResource(filename);\t\t\r\n\t\tFile tempFile = File.createTempFile(\"test\", \".dlt\");\r\n\t\t_tempFiles.add(tempFile);\r\n\t\tFileUtils.copyURLToFile(deltaFileUrl, tempFile);\t\t\r\n\t\treturn tempFile;\t\r\n\t}",
"private static Uri getOutputMediaFileUri(int type){\n\t return Uri.fromFile(getOutputMediaFile(type));\n\t}",
"private boolean openLocalCopyFromUri(Uri dataUri) {\n String title = getContentUriName(dataUri);\n File contentFile = Utils.duplicateInDownload(this, dataUri, title);\n if (contentFile != null) {\n mQuitAppWhenDoneViewing = true;\n onFileSelected(contentFile, \"\");\n return true;\n }\n\n return false;\n }",
"protected void getTransfer( Resource resource, String url, File destination )\n throws TransferFailedException\n {\n fireTransferDebug( \"attempting to create parent directories for destination: \" + destination.getName() );\n createParentDirectories( destination );\n\n fireGetStarted( resource, destination );\n\n if ( null == EXTERNAL_LOADER || EXTERNAL_LOADER.length() <= 0 )\n {\n throw new RuntimeException( \"Invalid external format\" );\n }\n\n try\n {\n transfer ( resource, url, destination, TransferEvent.REQUEST_GET );\n }\n catch ( final IOException e )\n {\n if ( destination.exists() )\n {\n boolean deleted = destination.delete();\n\n if ( !deleted )\n {\n destination.deleteOnExit();\n }\n }\n\n fireTransferError( resource, e, TransferEvent.REQUEST_GET );\n\n String msg = \"GET request of: \" + resource.getName() + \" from \" + repository.getName() + \" failed\";\n\n throw new TransferFailedException( msg, e );\n }\n\n fireGetCompleted( resource, destination );\n }",
"private static Uri getOutputMediaFileUri(int type){\r\n\t return Uri.fromFile(getOutputMediaFile(type));\r\n\t}",
"@Override\n public boolean pullFile(String remoteFilePath, File localFile)\n throws DeviceNotAvailableException {\n boolean found = false;\n for (String[] item : dirs) {\n if (String.format(\"%s/%s\", item[0], item[1]).equals(remoteFilePath)) {\n found = true;\n break;\n }\n }\n assertTrue(\"trying to pull non-existent file: \" + remoteFilePath, found);\n try {\n return localFile.createNewFile();\n } catch (IOException ioe) {\n throw new RuntimeException(\"failed to create empty file\", ioe);\n }\n }",
"public void run() {\n if (latch != null)\n latch.countDown();\n\n System.out.println(\"transferring from \" + job.srcUrl + \" to \" + job.dstUrl);\n\n String srcScheme;\n String dstScheme;\n\n try {\n srcScheme = SchemeParser.getScheme(job.srcUrl);\n dstScheme = SchemeParser.getScheme(job.dstUrl);\n } catch (Exception e) {\n setError(e.getMessage());\n return;\n }\n\n Receiver probe = Receiver.getProbeForScheme(srcScheme);\n if (probe == null) {\n setError(String.format(\"unsupported scheme: %s\", srcScheme));\n return;\n }\n\n FileInfo info;\n try {\n System.out.println(\"query src file header information...\");\n info = probe.getFileInfo(job.srcUrl, new HashMap<>());\n System.out.println(\"file size: \" + info.size);\n } catch (Receiver.ReceiverOperationError e) {\n setError(e.getMessage());\n return;\n }\n\n Receiver receiver = Receiver.getReceiverForScheme(srcScheme, info.size);\n if (receiver == null) {\n setError(String.format(\"unsupported scheme: %s\", srcScheme));\n return;\n }\n\n Sender sender = Sender.getSenderForScheme(dstScheme, info.size);\n if (sender == null) {\n setError(String.format(\"unsupported scheme: %s\", dstScheme));\n return;\n }\n\n Downloader downloader = Downloader.getDownloader();\n Uploader uploader = Uploader.getUploader();\n\n File buffer = new File(\"buffer.file\");\n\n try {\n System.out.println(\"start downloading...\");\n FileOutputStream writer = new FileOutputStream(buffer);\n downloader.download(job.srcUrl, new HashMap<>(), receiver, writer);\n writer.close();\n System.out.println(\"download finished\");\n\n System.out.println(\"start uploading...\");\n FileInputStream reader = new FileInputStream(buffer);\n uploader.upload(job.dstUrl, new HashMap<>(), sender, reader);\n reader.close();\n System.out.println(\"upload finished\");\n\n } catch (FileNotFoundException e) {\n setError(\"can't crate buffer file for download\");\n return;\n } catch (Exception e) {\n setError(String.format(\"download error: %s\", e.getMessage()));\n return;\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n //\"/storage/emulated/0/IRON-HID/captures\" <== can open~!!\n //\"file:///mnt/sdcard/Download/20141025_170314.jpg\"\n if (requestCode == CHOOSE_FILE_TO_UPLOAD)\n {\n if (resultCode == RESULT_OK)\n {\n Uri uri = data.getData();\n if (uri != null)\n {\n // Send file\n String filePath = uri.getPath();\n filePath = filePath.replace(\"file://\", \"\");\n mPutCommand += \" \" + filePath;\n mCommandManager.SendCommand(mPutCommand);\n }\n }\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }",
"private boolean checkLocalFile() throws IOException {\n\t\tPath localfile = Paths.get(userdir, filename);\n\t\tif (Files.exists(localfile, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\tthis.downloadStatus = DownloadEnum.ERROR;\n\t\t\tthis.message = \"same name file on download directory, download has stopped\";\n\t\t\treturn false;\n\t\t} else {\n\t\t\tlocalfiletmp = Paths.get(localfile.toAbsolutePath().toString() + \".tmp\");\n\t\t\tif (Files.exists(localfiletmp, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\t\tlocalFileSize = localfiletmp.toFile().length();\n\t\t\t} else {\n\t\t\t\tFiles.createFile(localfiletmp);\n\t\t\t}\n\t\t\tcfgpath = Paths.get(localfile.toAbsolutePath().toString() + \".pcd.dl.cfg\");// local cache of download file\n\t\t\tif (!Files.exists(cfgpath, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\t\tFiles.createFile(cfgpath);\n\t\t\t}\n\t\t\tFileWriter fw = new FileWriter(cfgpath.toFile());\n\t\t\tfw.write(url);\n\t\t\tfw.flush();\n\t\t\tfw.close();\n\t\t\treturn true;\n\t\t}\n\t}",
"public interface TransferAgent\n extends Closeable\n{\n //-------------------------------------------------------------------------\n void throttle(long maxBytesPerSecond);\n void unThrottle();\n\n\n //-------------------------------------------------------------------------\n ShellFile file (String remoteFilePath);\n List<ShellFile> files(String inRemoteFilePath);\n\n\n //-------------------------------------------------------------------------\n // @returns true if the file already exists, or if it was created\n boolean makeDir (String remoteDirectoryPath);\n boolean makeDirs(String remoteDirectoryPath);\n\n\n //-------------------------------------------------------------------------\n boolean upload(\n String localFileName, String remoteFileName);\n\n boolean upload(\n File localFile, String remoteFile);\n\n /**\n * Does not automatically close the given source stream.\n * \n * Works only on the immediate host to which this agent logged into.\n * If you would like to transfer data that are one or more network\n * hops away (i.e. recursive ssh calls), then you will need to\n * upload to the immediate host, then scp to the destination host,\n * and then delete the immediate copy (to clean up).\n *\n * @param source data to be uploaded\n * @param remoteFileName destination file path/name\n * @return true if the entire uploaded was successful\n */\n boolean upload(\n InputStream source, String remoteFileName);\n \n \n //-------------------------------------------------------------------------\n boolean download(\n String remoteFileName, String localFileName);\n\n boolean download(\n String remoteFileName, File localFile);\n\n /**\n * Does not automatically close the given source stream.\n *\n * For downloading data from multiple network hops away,\n * use a similar method as described for uploading.\n * @see #upload(InputStream, String)\n * \n * @param remoteFileName file path/name to download\n * @param destination sink for remote file data\n * @return true if the entire download was successful\n */\n boolean download(\n String remoteFileName, OutputStream destination);\n\n\n //-------------------------------------------------------------------------\n boolean open();\n void openChecked() throws IOException;\n\n @Override\n void close();\n}",
"@Override\r\n\tpublic boolean uploadFile(String fileName) throws FileSystemUtilException {\r\n\t\tlogger.debug(\"Begin:\" + getClass().getName() + \".upload()\");\r\n\t\tFileInputStream fis = null;\r\n\t\tString tempLocalFilePath = null;\r\n\t\ttry {\r\n\t\t\tconnect(); \r\n\t\t\ttempLocalFilePath = localFilePath;\r\n\t\t\tString command = \"scp -C -p -t \" + remoteFilePath;\r\n\t\t\tObject[] ios = execCommand(command);\r\n\t\t\toutputstream = (OutputStream) ios[0];\r\n\t\t\tinputstream = (InputStream) ios[1];\r\n\t\t\ttempLocalFilePath = tempLocalFilePath + fileName;\r\n\t\t\tif (checkAck(inputstream) != 0) {\r\n\t\t\t\tlogger.info(\"10117 : checking if file exists\");\r\n\t\t\t\tthrow new FileSystemUtilException(\"File \" + tempLocalFilePath + \"already exists in the remoteSystem\");\r\n\t\t\t}\r\n\t\t\tlong filesize = (new File(tempLocalFilePath)).length();\r\n\t\t\tcommand = \"C0644 \" + filesize + \" \";\r\n\t\t\tif (tempLocalFilePath.lastIndexOf('/') > 0) {\r\n\t\t\t\tcommand += tempLocalFilePath.substring(tempLocalFilePath.lastIndexOf('/') + 1);\r\n\t\t\t\tlogger.info(\"uploadfile in scp tempLocalFilePath if:: \"+tempLocalFilePath);\r\n\t\t\t} else {\r\n\t\t\t\tlogger.info(\"uploadfile in scp tempLocalFilePath else:: \"+tempLocalFilePath);\r\n\t\t\t\tcommand += tempLocalFilePath;\r\n\t\t\t}\r\n\t\t\tcommand += \"\\n\";\r\n\t\t\toutputstream.write(command.getBytes());\r\n\t\t\toutputstream.flush();\r\n\t\t\t/*if (checkAck(inputstream) != 0) {\r\n\t\t\t\tlogger.info(\"10118 : writing failed\");\r\n\t\t\t\tthrow new FileSystemUtilException(\"Cannot write into outputstream\");\r\n\t\t\t}*/\r\n\t\t\tfis = new FileInputStream(tempLocalFilePath);\r\n\t\t\tbyte[] buf = new byte[1024];\r\n\t\t\twhile (true) {\r\n\t\t\t\tint len = fis.read(buf, 0, buf.length);\r\n\t\t\t\tif (len <= 0)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\toutputstream.write(buf, 0, len); // out.flush();\r\n\t\t\t}\r\n\t\t\tfis.close();\r\n\t\t\tfis = null;\r\n\t\t\t// send '\\0'\r\n\t\t\tbuf[0] = 0;\r\n\t\t\toutputstream.write(buf, 0, 1);\r\n\t\t\toutputstream.flush();\r\n\t\t\tif (checkAck(inputstream) != 0) {\r\n\t\t\t\tlogger.info(\"10119 : after flushing the stream \");\r\n\t\t\t\tthrow new FileSystemUtilException(\"files flushing failed\");\r\n\t\t\t}\r\n\t\t\t// outputstream.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"uploading of file failed :\",e);\r\n\t\t\tthrow new FileSystemUtilException(\"uploading of file failed :\",e);\r\n\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (fis != null)\r\n\t\t\t\t\tfis.close();\r\n\t\t\t} catch (Exception ee) {\r\n\t\t\t\tlogger.error(\"uploading of file failed :\",ee);\r\n\t\t\t\tthrow new FileSystemUtilException(\"input stream not closed :\",ee);\r\n\t\t\t}\r\n\t\t\tdisconnect();\r\n\t\t}\r\n\t\tlogger.debug(\"End:\" + getClass().getName() + \".upload()\");\r\n\t\treturn true;\r\n\t}",
"private boolean doSingleFileMove(Path src, Path dst) throws IOException {\n RecoverableWriter writer;\n try {\n writer = fileSystem.createRecoverableWriter();\n } catch (UnsupportedOperationException ignore) {\n // Some writer not support RecoverableWriter, so fallback to per record moving.\n // For example, see the constructor of HadoopRecoverableWriter. Although it not support\n // RecoverableWriter, but HadoopPathBasedBulkFormatBuilder can support streaming\n // writing.\n return false;\n }\n\n RecoverableFsDataOutputStream out = writer.open(dst);\n try (FSDataInputStream in = fileSystem.open(src)) {\n IOUtils.copyBytes(in, out, false);\n } catch (Throwable t) {\n out.close();\n throw t;\n }\n out.closeForCommit().commit();\n return true;\n }",
"@Override\n public boolean transferFile (MultipartFile file, String tag, String resultFilename) {\n try {\n file.transferTo(new File(Constans.UPLOADPATH + \"/\" + tag + \"/\" + resultFilename));\n }catch (IOException e){\n e.printStackTrace();\n return false;\n }\n return true;\n }",
"@Override\n public String getFile(String fileName, String destDir) {\n if (Tracer.isActivated()) {\n Tracer.emitEvent(Tracer.Event.GET_FILE.getId(), Tracer.Event.GET_FILE.getType());\n }\n\n // Parse the destination path\n if (!destDir.endsWith(File.separator)) {\n destDir += File.separator;\n }\n\n // Parse the file name\n DataLocation sourceLocation;\n try {\n sourceLocation = createLocation(fileName);\n } catch (IOException ioe) {\n ErrorManager.fatal(ERROR_FILE_NAME, ioe);\n return null;\n }\n if (sourceLocation == null) {\n ErrorManager.fatal(ERROR_FILE_NAME);\n return null;\n }\n\n // Ask the AP to\n String finalPath = mainAccessToFile(fileName, sourceLocation, AccessMode.R, destDir);\n\n if (Tracer.isActivated()) {\n Tracer.emitEvent(Tracer.EVENT_END, Tracer.getRuntimeEventsType());\n }\n\n return finalPath;\n }",
"private synchronized void executeDownload(DownloadRequest request, String downloadUrl) {\n HttpURLConnection conn = null;\n URL url;\n InputStream inputStream = null;\n RandomAccessFile randomAccessFile;\n\n try {\n url = new URL(downloadUrl);\n long localFileLength = FileUtils.getLocalFileSize(getFullFileName());\n long remoteFileLength = fileTotalSize;\n\n // 远程文件不存在\n if (remoteFileLength == -1l) {\n // Log.log(\"下载文件不存在...\");\n updateDownloadFailed(request, DownloadManager.ERROR_UNHANDLED_HTTP_CODE, \"Remote file not found\");\n return;\n }\n\n request.setFileFullName(getFullFileName());\n randomAccessFile = new RandomAccessFile(getFullFileName(), \"rwd\");\n\n\n conn = (HttpURLConnection) url.openConnection();\n conn.setInstanceFollowRedirects(false);\n conn.setConnectTimeout(request.getRetryPolicy().getCurrentTimeout());\n conn.setReadTimeout(request.getRetryPolicy().getCurrentTimeout());\n conn.setRequestMethod(\"GET\");\n\n // 本地文件存在\n randomAccessFile.seek(localFileLength);\n conn.setRequestProperty(\"Range\", \"bytes=\"\n + localFileLength + \"-\" + remoteFileLength);\n\n inputStream = conn.getInputStream();\n\n\n HashMap<String, String> customHeaders = request.getCustomHeaders();\n if (customHeaders != null) {\n for (String headerName : customHeaders.keySet()) {\n conn.addRequestProperty(headerName, customHeaders.get(headerName));\n }\n }\n\n // Status Connecting is set here before\n // urlConnection is trying to connect to destination.\n updateDownloadState(request, DownloadManager.STATUS_CONNECTING);\n\n final int responseCode = conn.getResponseCode();\n\n DownLoadLog.v(\"Response code obtained for downloaded Id \"\n + request.getDownloadId()\n + \" : httpResponse Code \"\n + responseCode);\n\n switch (responseCode) {\n case HTTP_PARTIAL:\n case HTTP_OK:\n shouldAllowRedirects = false;\n if (fileTotalSize > 1) {\n transferData(request, inputStream, randomAccessFile);\n } else {\n updateDownloadFailed(request, DownloadManager.ERROR_DOWNLOAD_SIZE_UNKNOWN, \"Transfer-Encoding not found as well as can't know size of download, giving up\");\n }\n break;\n case HTTP_MOVED_PERM:\n case HTTP_MOVED_TEMP:\n case HTTP_SEE_OTHER:\n case HTTP_TEMP_REDIRECT:\n // Take redirect url and call executeDownload recursively until\n // MAX_REDIRECT is reached.\n while (mRedirectionCount < MAX_REDIRECTS && shouldAllowRedirects) {\n mRedirectionCount++;\n DownLoadLog.v(TAG, \"Redirect for downloaded Id \" + request.getDownloadId());\n final String location = conn.getHeaderField(\"Location\");\n executeDownload(request, location);\n }\n\n if (mRedirectionCount > MAX_REDIRECTS && shouldAllowRedirects) {\n updateDownloadFailed(request, DownloadManager.ERROR_TOO_MANY_REDIRECTS, \"Too many redirects, giving up\");\n return;\n }\n break;\n case HTTP_REQUESTED_RANGE_NOT_SATISFIABLE:\n updateDownloadFailed(request, HTTP_REQUESTED_RANGE_NOT_SATISFIABLE, conn.getResponseMessage());\n break;\n case HTTP_UNAVAILABLE:\n updateDownloadFailed(request, HTTP_UNAVAILABLE, conn.getResponseMessage());\n break;\n case HTTP_INTERNAL_ERROR:\n updateDownloadFailed(request, HTTP_INTERNAL_ERROR, conn.getResponseMessage());\n break;\n default:\n updateDownloadFailed(request, DownloadManager.ERROR_UNHANDLED_HTTP_CODE, \"Unhandled HTTP response:\" + responseCode + \" message:\" + conn.getResponseMessage());\n break;\n }\n } catch (SocketTimeoutException e) {\n e.printStackTrace();\n // Retry.\n attemptRetryOnTimeOutException(request);\n } catch (ConnectTimeoutException e) {\n e.printStackTrace();\n attemptRetryOnTimeOutException(request);\n } catch (IOException e) {\n e.printStackTrace();\n updateDownloadFailed(request, DownloadManager.ERROR_HTTP_DATA_ERROR, \"IOException \" + e.getMessage());\n } finally {\n if (conn != null) {\n conn.disconnect();\n }\n }\n }",
"public interface AdditionalDestination {\n\n public void copy(FileObject fo, String path);\n\n public void delete(FileObject fo, String path);\n\n}",
"public File get( String url, String suffix ) throws MojoExecutionException\n {\n if ( m_wagon == null )\n {\n m_log.error( \"must be connected first!\" );\n return null;\n }\n\n File file = null;\n try\n {\n file = File.createTempFile( String.valueOf( System.currentTimeMillis() ), suffix );\n }\n catch ( IOException e )\n {\n throw new MojoExecutionException( \"I/O problem\", e );\n }\n\n try\n {\n m_wagon.get( url, file );\n }\n catch ( TransferFailedException e )\n {\n file.delete(); // cleanup on failure\n throw new MojoExecutionException( \"Transfer failed\", e );\n }\n catch ( AuthorizationException e )\n {\n file.delete(); // cleanup on failure\n throw new MojoExecutionException( \"Authorization failed\", e );\n }\n catch ( ResourceDoesNotExistException e )\n {\n file.delete(); // return non-existent file\n }\n\n return file;\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n String myurl=taskSnapshot.getDownloadUrl().toString();\n\n String filepathuri=filePath.toString();\n\n String filename=filepathuri.substring(filepathuri.lastIndexOf(\"/\")+1);\n uploadreferance(myurl,filename);\n progressDialog.dismiss();\n\n //and displaying a success toast\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(Upload_files.this,navigation_bar.class);\n startActivity(intent);\n }",
"public static Uri getOutputMediaFileUri(Point point){\r\n return Uri.fromFile(getOutputMediaFile(point));\r\n }",
"public void testRemoteFileDescGetUrl() {\n\t\tSet urns = new HashSet();\n\t\turns.add(HugeTestUtils.URNS[0]);\n\t\tRemoteFileDesc rfd =\n\t\t\tnew RemoteFileDesc(\"www.test.org\", 3000, 10, \"test\", 10, TEST_GUID,\n\t\t\t\t\t\t\t 10, true, 3, true, null, urns, \n false, false,\"\",0, null, -1);\n\t\tURL rfdUrl = rfd.getUrl();\n\t\tString urlString = rfdUrl.toString();\n\t\tString host = rfd.getHost();\n\t\tString colonPort = \":\"+rfd.getPort();\n\t\tassertTrue(\"unexpected beginning of url\", \n\t\t\t\t urlString.startsWith(\"http://\"+host+colonPort));\n\t\tassertEquals(\"unexpected double slash\",\n\t\t urlString.indexOf(colonPort+\"//\"), -1);\n\t\tassertNotEquals(\"unexpected double slash\",\n\t\t -1, urlString.indexOf(\":3000/\"));\n\t}",
"private void configStorage(){\n try {\n final StorageReference storageReference = FirebaseStorage.getInstance()\n .getReference(\"motolost/\"+ String.valueOf(Math.random()) + getFileExtension(filePath));\n storageReference.putFile(filePath)\n .continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()) {\n throw task.getException();\n }\n return storageReference.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()) {\n Uri downloadUri = task.getResult();\n saveRegistry(downloadUri.toString());\n }\n }\n });\n } catch (Exception ex) {\n Constant.showMessage(\"Exception\", ex.getMessage(), this);\n }\n }",
"private Uri getOutputMediaFileUri(){\n\t\treturn Uri.fromFile( getOutputMediaFile() );\n\t}",
"private static Uri getOutputMediaFileUri(int type){\n return Uri.fromFile(getOutputMediaFile(type));\n }",
"private static Uri getOutputMediaFileUri(int type){\n return Uri.fromFile(getOutputMediaFile(type));\n }",
"void folderUploaded(String remoteFolder);",
"void sendToDestination(FileItem fileItem, String file_name){\n\n Resource res = new Resource();\n\n try {\n fileItem.write( new File(res.entry.getPathToDestination() + File.separator + file_name));\n logger.info(\"Successfully sent file to destination\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }",
"public interface FileService extends PublicService {\n\n /**\n * Retrieves reference to a file by fileName\n */\n FileReference getFile(String fileName);\n \n /**\n * Creates a reference for a new file.\n * Use FileReference.getOutputStream() to set content for the file.\n * Requires user to be a member of a contributer or full roles.\n * @param fileName\n * @param toolId - optional parameter\n * @return\n */\n FileReference createFile(String fileName, String toolId);\n \n /**\n * Deletes the file.\n * Requires user to be a member of a contributer or full roles.\n * @param fileReferece\n */\n void deleteFile(FileReference fileReferece);\n \n /**\n * Returns a url to the file\n * Property WebSecurityUtil.DBMASTER_URL (dbmaster.url) is used as a prefix\n */\n URL toURL(FileReference fileReferece);\n}",
"protected synchronized boolean copy2(String destStr)\n throws GATInvocationException {\n \t\n \tEndpointReferenceType credentialEndpoint = getCredentialEPR();\n TransferType[] transferArray = new TransferType[1];\n transferArray[0] = new TransferType();\n transferArray[0].setSourceUrl(rftgt42Location);\n transferArray[0].setDestinationUrl(destStr);\n RFTOptionsType rftOptions = new RFTOptionsType();\n rftOptions.setBinary(Boolean.TRUE);\n // rftOptions.setIgnoreFilePermErr(false);\n TransferRequestType request = new TransferRequestType();\n request.setRftOptions(rftOptions);\n request.setTransfer(transferArray);\n request.setTransferCredentialEndpoint(credentialEndpoint);\n setRequest(request);\n \n return status.equals(RequestStatusTypeEnumeration.Done.toString())\n || status.equals(TransferStatusTypeEnumeration.Finished\n .toString());\n }",
"@Override\n // Download file\n protected void onHandleIntent(@Nullable Intent intent) {\n String address = intent.getStringExtra(\"URL\");\n // Conecction with url\n HttpURLConnection connection = null;\n // Stream for save content\n OutputStream streamToFile = null;\n try {\n // Get filename from URL\n URL url = new URL(address);\n File file = new File(url.getFile());\n String fileName = file.getName();\n // Create new file\n DocumentFile directory = DocumentFile.fromTreeUri(this, uri);\n DocumentFile dFile = directory.createFile(\"\", fileName);\n // Make connection\n connection = (HttpURLConnection) url.openConnection();\n // Stream for fetching data\n DataInputStream dataInputStream = new DataInputStream(connection.getInputStream());\n // Initialize stream for writing\n streamToFile = getContentResolver().openOutputStream(dFile.getUri());\n\n //streamToFile = new FileOutputStream(f);\n // Buffor for data\n byte buffor[] = new byte[100];\n // Amount of readed data\n int gotBytes = dataInputStream.read(buffor, 0, 100);\n // Total readed data\n int totalBytes = 0;\n // Read untill end of file\n while (gotBytes != -1) {\n // Write read data to buffer\n streamToFile.write(buffor, 0, gotBytes);\n // How many bytes read\n gotBytes = dataInputStream.read(buffor, 0, 100);\n // Add readed bytes to total counter\n totalBytes += gotBytes;\n // Send message with readed bytes\n sendBroadcast(totalBytes);\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n // Close connetions\n if (connection != null)\n connection.disconnect();\n\n if (streamToFile != null) {\n try {\n streamToFile.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }",
"private static void copyFile(File scrFile, File file) {\n\t\r\n}",
"public String getFilePath() {\n return theRemoteFilePath;\n }",
"public File getRessourceFile() {\r\n\t\treturn local;\r\n\t}",
"private boolean restoreTransferFromFile(File f) {\n long fileSize = f.length();\n\n if (fileSize > org.dkf.jed2k.Constants.BLOCK_SIZE_INT) {\n log.warn(\"[ED2K service] resume data file {} has too large size {}, skip it\"\n , f.getName(), fileSize);\n return false;\n }\n\n TransferHandle handle = null;\n ByteBuffer buffer = ByteBuffer.allocate((int)fileSize);\n try(FileInputStream istream = openFileInput(f.getName())) {\n log.info(\"[ED2K service] load resume data {} size {}\"\n , f.getName()\n , fileSize);\n\n istream.read(buffer.array(), 0, buffer.capacity());\n // do not flip buffer!\n AddTransferParams atp = new AddTransferParams();\n atp.get(buffer);\n File file = new File(atp.getFilepath().asString());\n\n if (Platforms.get().saf()) {\n LollipopFileSystem fs = (LollipopFileSystem)Platforms.fileSystem();\n if (fs.exists(file)) {\n android.util.Pair<ParcelFileDescriptor, DocumentFile> resume = fs.openFD(file, \"rw\");\n\n if (resume != null && resume.second != null && resume.first != null && resume.second.exists()) {\n atp.setExternalFileHandler(new AndroidFileHandler(file, resume.second, resume.first));\n handle = session.addTransfer(atp);\n } else {\n log.error(\"[ED2K service] restore transfer {} failed document/parcel is null\", file);\n }\n } else {\n log.warn(\"[ED2K service] unable to restore transfer {}: file not exists\", file);\n }\n } else {\n if (file.exists()) {\n atp.setExternalFileHandler(new DesktopFileHandler(file));\n handle = session.addTransfer(atp);\n } else {\n log.warn(\"[ED2K service] unable to restore transfer {}: file not exists\", file);\n }\n }\n }\n catch(FileNotFoundException e) {\n log.error(\"[ED2K service] load resume data file not found {} error {}\", f.getName(), e);\n }\n catch(IOException e) {\n log.error(\"[ED2K service] load resume data {} i/o error {}\", f.getName(), e);\n }\n catch(JED2KException e) {\n log.error(\"[ED2K service] load resume data {} add transfer error {}\", f.getName(), e);\n }\n\n // log transfer handle if it has been added\n if (handle != null) {\n log.info(\"transfer {} is {}\"\n , handle.isValid() ? handle.getHash().toString() : \"\"\n , handle.isValid() ? \"valid\" : \"invalid\");\n }\n\n return handle != null;\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n StorageReference downloadUrl = taskSnapshot.getStorage();\n downloadImage(downloadUrl);\n Log.e(\"downloadUrl\", \" \" + downloadUrl);\n\n\n }",
"void sendFile(String fileName, String hostName, int port) throws IOException;",
"void getFile(String path, OutputStream stream) throws NotFoundException, IOException;",
"@Override\r\n\tpublic void putFile(InputStream is, String targetLocation) throws FileSystemUtilException {\r\n\t\tthrow new FileSystemUtilException(\"000000\",null,Level.ERROR,null);\t\r\n\r\n\t}",
"@Override\n\tprotected String getFileArress() {\n\t\treturn fileAddress;\n\t}",
"@Override\n protected File getTargetFile(String filename) throws IOException {\n return null;\n }",
"boolean upload(\n InputStream source, String remoteFileName);",
"@Override\n\tpublic byte[] fetchFile(String fileName) throws RemoteException {\n return null;\n\n\t}",
"public void findDestination() {\n\t\t\n\t}",
"private static URL toFileURL(URL resource) throws IOException {\n\t\t// Don't bother copying file urls\n\t\t//\n\t\tif (resource.getProtocol()\n\t\t\t.equalsIgnoreCase(\"file\"))\n\t\t\treturn resource;\n\n\t\t//\n\t\t// Need to make a copy to a temp file\n\t\t//\n\n\t\tFile f = File.createTempFile(\"resource\", \".jar\");\n\t\tFiles.createDirectories(f.getParentFile()\n\t\t\t.toPath());\n\t\ttry (InputStream in = resource.openStream(); OutputStream out = Files.newOutputStream(f.toPath())) {\n\t\t\tbyte[] buffer = new byte[BUFFER_SIZE];\n\t\t\tfor (int size; (size = in.read(buffer, 0, buffer.length)) > 0;) {\n\t\t\t\tout.write(buffer, 0, size);\n\t\t\t}\n\t\t}\n\t\tf.deleteOnExit();\n\t\treturn f.toURI()\n\t\t\t.toURL();\n\t}",
"public void getContentsIntoFile(String remotePath, String localFilePath) throws Exception\r\n {\r\n byte[] bytes = getBytes(remotePath);\r\n if (bytes == null) {\r\n bytes = new byte[0];\r\n }\r\n if (!ZkUtils.isHdfs(localFilePath))\r\n FileUtils.writeByteArrayToFile(new File(localFilePath), bytes);\r\n else {\r\n // write to Hdfs\r\n OutputStream os = ZkUtils.getOutPutStream(localFilePath);\r\n PrintStream file_stream = new PrintStream(os);\r\n file_stream.write(bytes);\r\n file_stream.flush();\r\n file_stream.close();\r\n }\r\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n }",
"public abstract String getFullPath();",
"@Override\n\t\t\t\t\t\tpublic boolean accept(File arg0, String arg1) {\n\t\t\t\t\t\t\tif(arg1.contains(\"jlink\") || arg1.contains(\"RECYCLE.BIN\")){\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tLogUtil.i(\"folder\",\"===\"+arg1+\".path==\"+arg0.getCanonicalPath());\n\t\t\t\t\t\t\t\t\tlocalStorePath = arg0.getCanonicalPath();\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}",
"@Override\n public void stageForCache_destination_exists() throws Exception {\n assumeTrue( !isWindows() );\n super.stageForCache_destination_exists();\n }",
"@SuppressLint(\"SimpleDateFormat\")\n public Uri getOutputImageFileUri(Context ctx) {\n\n String tstamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File file = new File(getTempDirectoryPath(ctx), \"IMG_\" + tstamp + \".jpg\");\n\n return Uri.fromFile(file);\n\n }",
"public void connect(File file, long position, long size) throws FileNotFoundException;",
"private String setFileDestinationPath(){\n String filePathEnvironment = Environment.getExternalStorageDirectory().getAbsolutePath();\n Log.d(TAG, \"Full path edited \" + filePathEnvironment + \"/earwormfix/\" + generatedFilename + EXTENSION_JPG);\n return filePathEnvironment+ \"/earwormfix/\" + generatedFilename + EXTENSION_JPG;\n }",
"public abstract String getFotoPath();",
"public String getSourceDownloadUrl();",
"@Override\n public MethodOutcome destinationFileExistsSrcIsFileOutcome() {\n return new MethodOutcome(MethodOutcome.Type.RETURNS_FALSE);\n }",
"public final File getLocalFile() throws IllegalArgumentException\n {\n if (hostOrNull != null)\n {\n throw new IllegalArgumentException(\"getLocalFile can only be called on local paths.\");\n }\n return new File(path);\n }",
"public void getFileData(int dLength,String charset) throws FileSystemUtilException\r\n\t{\r\n\t\tlogger.debug(\"Begin: \"+getClass().getName()+\":getFileData()\");\r\n\t\tFileOutputStream fOut=null;\r\n\t\tByteArrayOutputStream bOut = null;\r\n\t\tFileSystemUtilsPlugin zu = new FileSystemUtilPluginFactory().getFileUtils(FileSystemTypeConstants.ZIP);\r\n\t\tlong fileLen = 0;\r\n\t\tlong dataLength = dLength;\r\n\t\tif(isSample)\r\n\t\t{\r\n\t\t\tbOut = new ByteArrayOutputStream();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tlogger.debug(\"Opening output stream to file \"+localFilePath);\r\n\t\t\t\tlogger.debug(\"localFilePath:\"+localFilePath);\r\n\t\t\t\tfOut=new FileOutputStream(\"temp.txt\");\r\n\t\t\t\tlogger.debug(\"Output stream to file \"+localFilePath+\" is opened\");\r\n\t\t\t} \r\n\t\t\tcatch(FileNotFoundException fnfEx) \r\n\t\t\t{ fnfEx.printStackTrace();\r\n\t\t\t\t logger.info(new Date()+\":: File not found on connecting with parameters, \" +\r\n\t\t\t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n\t\t\t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\t\tthrow new FileSystemUtilException(\"ET0028\",null,Level.ERROR,fnfEx);\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\tString command = \"scp -f \"+remoteFilePath;\r\n\t\tObject[] ios= execCommand(command);\r\n\t\toutputstream=(OutputStream)ios[0];\r\n\t\tinputstream=(InputStream)ios[1];\r\n\t\tbyte[] buf = new byte[1024];\r\n\t\t// send '\\0'\r\n\t\tbuf[0] = 0;\r\n\t\ttry \r\n\t\t{\r\n\t\t\t//returning acknowledgement\r\n\t\t\toutputstream.write(buf, 0, 1);\t\t\r\n\t\t\toutputstream.flush();\r\n\t\t\tcheckAcknowledgement(inputstream);\r\n\t\t\t//getting filesize\r\n\t\t\t// read '0644 '\r\n\t\t\tinputstream.read(buf, 0, 5);\r\n\t\t\twhile (true) \r\n\t\t\t{\r\n\t\t\t\tinputstream.read(buf, 0, 1);\r\n\t\t\t\tif (buf[0] == ' ')\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tfileLen = fileLen * 10 + (buf[0] - '0');\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tString file = null;\r\n\t\t\tfor (int i = 0;; i++) \r\n\t\t\t{\r\n\t\t\t\tinputstream.read(buf, i, 1);\r\n\t\t\t\tif (buf[i] == (byte) 0x0a) \r\n\t\t\t\t{\r\n\t\t\t\t\tfile = new String(buf, 0, i);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"filesize=\"+fileLen+\", file=\"+file);\r\n\t\t\tif(dataLength == 0)\r\n\t\t\t{\r\n\t\t\t\tdataLength = fileLen;\r\n\t\t\t}\r\n\t\t\telse if(dataLength >= fileLen)\r\n\t\t\t{\r\n\t\t\t\tdataLength = fileLen;\r\n\t\t\t}else if(fileLen > dataLength * 10){\r\n\t\t\t\tdataLength = 1024 * 10;\r\n\t\t\t}\r\n\t\t\t// send '\\0'\r\n\t\t\tbuf[0] = 0;\r\n\t\t\toutputstream.write(buf, 0, 1);\r\n\t\t\toutputstream.flush();\r\n\t\t\tlong b=0;\r\n\t\t\tint l=0;\r\n\t\t\tint len=10240;\r\n\t\t\tif(len >= dataLength)\r\n\t\t\t{\r\n\t\t\t\tlen = (int)dataLength;\r\n\t\t\t}\r\n\t\t\tbyte[] barray = new byte[len];\r\n\t\t\tboolean noData = false;\r\n\t\t\tlong startTime = System.currentTimeMillis();\r\n\t\t\twhile( b < dataLength)\r\n\t\t\t{\r\n\t\t\t\tl=inputstream.read(barray,0,len);\r\n\t\t\t\tif(l != -1)\r\n\t\t\t\t{\r\n\t\t\t\t noData = false;\r\n\t\t\t\t\tb=b+l;\r\n\t\t\t\t\tif(isSample)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbOut.write(barray,0,l);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//check whether the data is crossed fileLength\r\n\t\t\t\t\t\tif(b > dataLength)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tl = l - (int)(b - dataLength);\t\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\tfOut.write(barray,0,l);\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t/* BUG-FIX thread hang due to network outage */\r\n\t\t\t\t //implementing readTImeout at client side.\r\n\t\t\t\t if(noData == false)\r\n\t\t\t\t {\r\n\t\t\t\t //this is first iteration with out data \r\n\t\t\t\t startTime = System.currentTimeMillis();\r\n\t\t\t\t noData = true;\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t //there is no data on prev iteration too\r\n\t\t\t\t if((System.currentTimeMillis()-startTime) >= this.readTimeOut)\r\n\t\t\t\t {\r\n\t\t\t\t throw new Exception(\"SCP fileDownload failed. readTimeout occured\");\r\n\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\t}\r\n //check stop flag, if true throw FileSystemUtilException with errorcode 999\r\n if(stop)\r\n {\r\n \tthrow new FileSystemUtilException(\"999\");\r\n }\r\n\t\t\t}\t\r\n\t\t\t// send '\\0'\r\n\t\t\tbuf[0] = 0;\r\n\t\t\toutputstream.write(buf, 0, 1);\r\n\t\t\toutputstream.flush();\r\n\t\t\tif(isSample)\r\n\t\t\t{\r\n\t\t\t\tString s=null;\r\n\t\t\t if(zu.isZip(remoteFilePath))\r\n\t\t\t {\r\n\t\t\t \tbyte [] stUnZip=bOut.toByteArray(); \r\n\t\t\t \tbyte [] sample = zu.streamUnZipper(stUnZip);\r\n\t\t\t \tbOut.reset();\r\n\t\t\t \tbOut.write(sample);\r\n\t\t\t //create a byte array stream with bOut\r\n\t\t\t //unzip the stream here and use that stream\r\n\t\t\t }\r\n\t\t\t if(true)/*if(!\"cp1252\".equalsIgnoreCase(charset))*/\r\n\t\t\t {\r\n\t\t\t \tsampleData = new String(bOut.toByteArray(),charset);\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t \tsampleData = new String(bOut.toByteArray());\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t\tlogger.debug(\"Sample data is : \"+sampleData);\r\n\t\t\t}else{\r\n\t\t\t\tsampleData = new String(barray,charset);\r\n\t\t\t}\r\n\t\t} \r\n\t\tcatch(UnsupportedEncodingException use)\r\n\t\t{\r\n\t\t\t logger.info(new Date()+\":: Unable to get data on connecting with parameters, \" +\r\n\t\t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n\t\t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\tthrow new FileSystemUtilException(\"ET0564\",null,Level.ERROR,use);\r\n\t\t}\t\r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\tlogger.info(new Date()+\":: Unable to get data on connecting with parameters, \" +\r\n\t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n\t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\tthrow new FileSystemUtilException(\"EL0004\",null,Level.ERROR,e);\r\n\t\t}\r\n\t\tcatch(FileSystemUtilException ebizEx)\r\n\t\t{\r\n //suppress if errorcode is 999\r\n\t\t\t\r\n if(!ebizEx.getErrorCode().equals(\"999\"))\r\n\t\t\t{\r\n \tlogger.info(new Date()+\":: Unable to get data on connecting with parameters, \" +\r\n \t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n \t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\t\tthrow ebizEx;\r\n }\r\n\t\t}\r\n\t\tcatch(Exception ex)\r\n\t\t{\r\n\t\t\tlogger.info(new Date()+\":: Unable to get data on connecting with parameters, \" +\r\n\t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n\t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\tthrow new FileSystemUtilException(\"EL0360\",null,Level.ERROR,ex);\t\t\t\t\r\n\t\t}\r\n\t\tfinally \r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tif(fOut != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tfOut.flush(); \r\n\t\t\t\t\tfOut.close();\r\n\t\t\t\t\tfOut = null;\r\n\t\t\t\t}\r\n\t\t\t\tif(bOut != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tbOut.flush(); \r\n\t\t\t\t\tbOut.close();\r\n\t\t\t\t\tbOut = null;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t} \r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\t//log warning\t\t\t\t\r\n\t\t\t}\t\t \r\n\t\t}\r\n\t\tlogger.debug(\"End: \"+getClass().getName()+\":getFileData()\");\r\n\t}",
"Path fileToUpload();",
"protected boolean sameFile(URL paramURL1, URL paramURL2) {\n/* 400 */ if (paramURL1.getProtocol() != paramURL2.getProtocol() && (paramURL1\n/* 401 */ .getProtocol() == null || \n/* 402 */ !paramURL1.getProtocol().equalsIgnoreCase(paramURL2.getProtocol()))) {\n/* 403 */ return false;\n/* */ }\n/* */ \n/* 406 */ if (paramURL1.getFile() != paramURL2.getFile() && (paramURL1\n/* 407 */ .getFile() == null || !paramURL1.getFile().equals(paramURL2.getFile()))) {\n/* 408 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 412 */ int i = (paramURL1.getPort() != -1) ? paramURL1.getPort() : paramURL1.handler.getDefaultPort();\n/* 413 */ int j = (paramURL2.getPort() != -1) ? paramURL2.getPort() : paramURL2.handler.getDefaultPort();\n/* 414 */ if (i != j) {\n/* 415 */ return false;\n/* */ }\n/* */ \n/* 418 */ if (!hostsEqual(paramURL1, paramURL2)) {\n/* 419 */ return false;\n/* */ }\n/* 421 */ return true;\n/* */ }",
"@Override\n\tpublic OutputStream writeResource(URI uri) throws StorageSecuirtyException,\n\t\t\tResourceAccessException {\n\t\treturn null;\n\t}",
"public boolean moveFile(final Uri source, final Uri target) throws IOException\n\t{\n\t\tif (FileUtil.isFileScheme(target) && FileUtil.isFileScheme(target))\n\t\t{\n\t\t\tFile from = new File(source.getPath());\n\t\t\tFile to = new File(target.getPath());\n\t\t\treturn moveFile(from, to);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tboolean success = copyFile(source, target);\n\t\t\tif (success) {\n\t\t\t\tsuccess = deleteFile(source);\n\t\t\t}\n\t\t\treturn success;\n\t\t}\n\t}"
]
| [
"0.59290475",
"0.5856111",
"0.57896036",
"0.56967664",
"0.5643194",
"0.5599683",
"0.55848694",
"0.5549758",
"0.5519098",
"0.55015653",
"0.54970074",
"0.54617286",
"0.54327697",
"0.53997177",
"0.539906",
"0.5394496",
"0.53751594",
"0.5370427",
"0.5363962",
"0.535455",
"0.5331998",
"0.5292946",
"0.5282339",
"0.52718663",
"0.52699107",
"0.52575654",
"0.52568376",
"0.52444607",
"0.522818",
"0.5218043",
"0.5214286",
"0.5202555",
"0.5192652",
"0.51794845",
"0.5171718",
"0.5164306",
"0.51567346",
"0.51415914",
"0.51360124",
"0.5132889",
"0.51323324",
"0.51257247",
"0.51119107",
"0.5109764",
"0.51027346",
"0.5089263",
"0.5085832",
"0.50798637",
"0.5078688",
"0.5078128",
"0.50734687",
"0.50722486",
"0.5071624",
"0.50699925",
"0.50564736",
"0.50450844",
"0.5040923",
"0.5036194",
"0.5036108",
"0.50337285",
"0.5029386",
"0.5026239",
"0.5020255",
"0.5020255",
"0.5020181",
"0.50101936",
"0.50049883",
"0.499708",
"0.499224",
"0.49900454",
"0.49637064",
"0.49599957",
"0.49569657",
"0.49495706",
"0.49440765",
"0.49415267",
"0.4932836",
"0.4913918",
"0.49130753",
"0.49108604",
"0.49103495",
"0.49102417",
"0.49055642",
"0.4893756",
"0.48924592",
"0.48918876",
"0.48823372",
"0.48777533",
"0.48677802",
"0.48650312",
"0.48642766",
"0.4863417",
"0.48627183",
"0.4862005",
"0.4860271",
"0.4859596",
"0.485553",
"0.4852616",
"0.48491442",
"0.48465624"
]
| 0.5040294 | 57 |
Get input stream for a local file and optionally seek to the offset. | private FileInputStream getDataInputStream(File f, long seekOffset)
throws IOException {
FileInputStream fis;
final FileIoProvider fileIoProvider = getFileIoProvider();
if (NativeIO.isAvailable()) {
fis = fileIoProvider.getShareDeleteFileInputStream(
getVolume(), f, seekOffset);
} else {
try {
fis = fileIoProvider.openAndSeek(getVolume(), f, seekOffset);
} catch (FileNotFoundException fnfe) {
throw new IOException("Expected block file at " + f +
" does not exist.");
}
}
return fis;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public InputStream getInputStream(long position);",
"protected abstract InputStream getInStreamImpl(String filename) throws IOException;",
"@Override\n public InputStream openInternalInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }",
"public InputStream getInputStream() throws IOException {\n return new FileInputStream(_file);\n }",
"InputStream getInputStream() throws FileSystemException;",
"@Override\n public InputStream openInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }",
"public abstract SeekInputStream getRawInput();",
"@Override\n public InputStream openStream() throws IOException\n {\n return new FileInputStream(temp);\n }",
"Stream<In> getInputStream();",
"@NotNull InputStream openInputStream() throws IOException;",
"private static void readToFile(InputStream in, File localFile) throws IOException, FileNotFoundException {\n\t\tOutputStream output = null;\n\t\ttry {\n\t\t\toutput = new FileOutputStream(localFile);\n\t\t\t// download the file\n\t\t\tin = new BufferedInputStream(in);\n\t\t\tbyte data[] = new byte[1024];\n\t\t\tint count;\n\t\t\twhile ((count = in.read(data)) != -1) {\n\t\t\t\toutput.write(data, 0, count);\n\t\t\t}\n\t\t\toutput.flush();\n\t\t\toutput.close();\n\t\t}\n\t\tfinally {\n\t\t\tif(output != null) {\n\t\t\t\toutput.flush(); // close the local file in any case\n\t\t\t\toutput.close();\n\t\t\t}\n\t\t}\n\t}",
"protected InputStream getInputStream() throws IOException\n\t {\n\t FileInputStream fin = new FileInputStream(fFilename);\n\t BufferedInputStream bin = new BufferedInputStream(fin);\n\t return bin;\n\t }",
"InputStream openStream() throws IOException;",
"protected abstract InputStream getFile(final String path);",
"public InputStream getInputStream() throws IOException;",
"public InputStream getInputStream() throws IOException;",
"InputStream getInputStream() throws IOException;",
"InputStream getInputStream() throws IOException;",
"InputStream getInputStream() throws IOException;",
"private static Optional<InputStream> openFile(Path name) {\n try {\n return Optional.of(Files.newInputStream(name, StandardOpenOption.READ));\n } catch (IOException e) {\n System.err.printf(\"Unable to open file %s for reading: %s\\n\", name, e.toString());\n }\n\n return Optional.empty();\n }",
"public synchronized InputStream getInputStream(String hash) throws IOException {\n\t\tif (null == hash) {\n\t\t\treturn null;\n\t\t}\n\t\t// RkLog.i(\"getInputStream\",\n\t\t// \"target file exist-->\"+getFile(hash).exists());\n\n\t\tInputStream is = new FileInputStream(getFile(hash));\n\n\t\treturn is;\n\t}",
"public FileInputStream openFileInput(final String path)\n throws java.io.FileNotFoundException {\n return GDFileSystem.openFileInput(path);\n }",
"public InputStream getInputStream(Path path) throws IOException {\n Objects.requireNonNull(path);\n\n FileSystem fs = hdfsConfig.getFileSystem();\n if (fs.isFile(path)) {\n return fs.open(path);\n } else if(fs.isDirectory(path)) {\n FileStatus[] files = fs.listStatus(path);\n List<InputStream> paths = Arrays.stream(files)\n .map(f -> {\n try {\n return fs.open(f.getPath());\n } catch (IOException e) {\n LOGGER.log(Level.SEVERE, \"Cannot read file \" + f.getPath().toString(), e);\n return null;\n }\n })\n .filter(f -> f != null)\n .collect(Collectors.toList());\n return new SequenceInputStream(Collections.enumeration(paths));\n } else {\n throw new IllegalArgumentException(\"Given path \" + path.toString()\n + \" is neither file nor directory\");\n }\n }",
"public InputStream getInputStream() throws IOException {\r\n if (!connected)\r\n connect();\r\n\r\n return zipFile.getInputStream(zipEntry);\r\n }",
"public InputStream newInputStream(int index) throws IOException {\n\t\t\tsynchronized (DiskLruCache.this) {\n\t\t\t\tif (entry.currentEditor != this) {\n\t\t\t\t\tthrow new IllegalStateException();\n\t\t\t\t}\n\t\t\t\tif (!entry.readable) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn new FileInputStream(entry.getCleanFile(index));\n\t\t\t}\n\t\t}",
"public InputStream openInputStream(String path) throws SystemException;",
"public interface InputStreamProvider {\n\n InputStream open() throws IOException;\n\n String getPath();\n}",
"public static InputStream getInputStream(String file) throws IOException\n {\n InputStream in = null;\n if(Files.isReadable(Paths.get(file)))\n in = new FileInputStream(file);\n else\n {\n URL url = Thread.currentThread().getContextClassLoader().getResource(file);\n if(url != null)\n in = url.openStream();\n }\n if(in == null)\n throw new IOException();\n\n return in;\n }",
"public static InputStream getInputStream(Path path, SourceType sourceType) throws IOException {\n try {\n return getCompressInputStream(getFileSystemBySourceType(sourceType).open(path), path);\n } catch (IOException e) {\n // To manual fix a issue that FileSystem is closed exceptionally. Here we renew a FileSystem object to make\n // sure all go through such issues.\n if(e.getMessage() != null) {\n if(e.getMessage().toLowerCase().indexOf(\"filesystem closed\") >= 0) {\n if(sourceType == SourceType.HDFS) {\n return HDFSUtils.renewFS().open(path);\n }\n }\n }\n throw e;\n }\n }",
"public InputStream get(Bitstream bitstream) throws IOException {\n try {\n return new FileInputStream(getFile(bitstream));\n } catch (Exception e) {\n log.error(\"get(\" + bitstream.getInternalId() + \")\", e);\n throw new IOException(e);\n }\n }",
"public InputStream getInputStream() throws IOException {\r\n return mFile.getInputStream();\r\n }",
"public InputStream openInputStream() throws IOException {\n\n\tthrow new IllegalArgumentException(\"Not supported\");\n }",
"public InputStream readFile( String fileName, FileType type );",
"@Override\n public InputStream getInputStream() throws IOException\n {\n/**/\n/**/\n/**/\n if (Files.isDirectory(path))\n throw new IOException(path + \" is a directory\");\n\n return Files.newInputStream(path,StandardOpenOption.READ);\n }",
"public abstract InputStream getInputStream();",
"public abstract InputStream getInputStream();",
"SparseStream openFile(String path, FileMode mode, FileAccess access) throws IOException;",
"public ConnectionAwareInputStream sftpFileInputStream(URI uri) {\n log.info(\"Getting InputStream for '{}'\", uri);\n String absolutePath = uri.toString();\n\n return retryAction(() ->\n doInConnection(connection -> {\n try {\n ChannelSftp channel = connection.getChannel();\n InputStream inputStream = channel.get(absolutePath);\n return new ConnectionAwareInputStream(connection, absolutePath, inputStream);\n } catch (SftpException e) {\n log.error(\"Cannot open sftp InputStream for \" + absolutePath, e);\n throw new ConnectFilePulseException(e);\n }\n }));\n }",
"public static InputStream openFileInputStream(final String fileName) throws IOException {\n\n return FileSystem.getInstance(fileName).openFileInputStream(fileName);\n }",
"public InputStream getInputStream();",
"public InputStream getInputStream();",
"public InputStream open(File file) {\n return new FileInputStream(file);\n }",
"public final InputStream getInStream(String filename) throws IOException {\n\t\tint pos = filename.indexOf(\".bin\");\n\t\tsendMessage((pos > -1) ? filename.substring(0, pos) : filename);\n\t\treturn getInStreamImpl(filename);\n\t}",
"public InputStream openInputStream() throws IOException {\n // TODO: this mode is not set yet.\n // if ((parent.mode & Connector.READ) == 0)\n // throw new IOException(\"write-only connection\");\n\n ensureOpen();\n\n if (inputStreamOpened)\n throw new IOException(\"no more input streams available\");\n if (isGet) {\n // send the GET request here\n validateConnection();\n isValidateConnected = true;\n } else {\n if (privateInput == null) {\n privateInput = new PrivateInputStream(this);\n }\n }\n\n inputStreamOpened = true;\n\n return privateInput;\n }",
"SparseStream openFile(String path, FileMode mode) throws IOException;",
"public static\n InputStream inputStream() {\n return Input.wrappedInputStream;\n }",
"public static BufferedInputStream getInput(Path path) throws IOException {\n return get(Files.newInputStream(path));\n }",
"private InputStream getInstream() {\r\n\t\tif (instream == null) try {\r\n\t\t\tinstream = new FileInputStream(file);\r\n\t\t} catch(IOException ioe) {\r\n\t\t\tthrow new RuntimeException(\"Couldn't create instream for test\", ioe);\r\n\t\t}\r\n\t\treturn instream;\r\n\t}",
"private FileInputStream getStreamFromPath(Context context, String fileName) {\n ParcelFileDescriptor parcelFileDesc = null;\n FileInputStream inputStream = null;\n try {\n inputStream = new FileInputStream(new File(fileName));\n if (0 != 0) {\n try {\n parcelFileDesc.close();\n } catch (IOException e) {\n Log.e(TAG, \"parcelFileDesc error!\");\n }\n }\n } catch (FileNotFoundException e2) {\n Log.e(TAG, \"getStreamFromPath FileNotFoundException.\");\n if (0 != 0) {\n parcelFileDesc.close();\n }\n } catch (Throwable th) {\n if (0 != 0) {\n try {\n parcelFileDesc.close();\n } catch (IOException e3) {\n Log.e(TAG, \"parcelFileDesc error!\");\n }\n }\n throw th;\n }\n return inputStream;\n }",
"@Override\n public StorageInputStream open(File file) throws FileNotFoundException {\n\treturn null;\n }",
"public static InputStream getInputStream(String[] args) throws FileNotFoundException {\r\n if (args.length > 0 && args[0].equals(\"-f\")) {\r\n return new FileInputStream(new File(args[1]));\r\n } else {\r\n return System.in;\r\n }\r\n }",
"@Override\n public InputStream getInputStream(String templateName) throws IOException {\n if (templateName.contains(\"..\")) {\n throw new RuntimeException(\"templateName must not contain '..' characters\");\n }\n String templateFile = WELL_KNOWN_CONTAINER + \"/\" + templateName.replaceAll(\"^/+\", \"\"); // remove heading separator\n log.trace(\"locating template file: \" + templateFile + \"; requested template name: \" + templateName);\n try {\n Resource res = StaticResourceServlet.StaticResourceProvider.getInstance().getResource(getServletContext(), templateFile);\n if (res.notFound()) {\n throw new IOException(\"Template file not found: \" + templateName);\n }\n return new ByteArrayInputStream(res.getData());\n } catch (Exception e) {\n throw new IOException(\"Failed open template: \" + templateName, e);\n }\n }",
"public InputStream getRemoteFileStream(String remoteFilePath, URLConnection connection) throws IOException, NoDataReceivedException\n {\n URL url = new URL(remoteFilePath);\n connection = url.openConnection();\n InputStream is = connection.getInputStream();\n connection.getContentLength();\n return is;\n }",
"public static BufferedInputStream getInput(String fileName) throws IOException {\n return getInput(getPath(fileName));\n }",
"InputStream getInputStreamForMockFile(String fileName)\n\t\t\tthrows FileNotFoundException {\n\t\tif (!hasFile(fileName)) {\n\t\t\tthrow new FileNotFoundException(\"Could not find file \\\"\" + fileName\n\t\t\t\t\t+ \"\\\" in current directory \\\"\" + this.directory.toString()\n\t\t\t\t\t+ \"\\\"\");\n\t\t}\n\n\t\tif (this.returnFailingReaders) {\n\t\t\treturn MockStringContentFactory.getFailingInputStream();\n\t\t} else {\n\t\t\tPath filePath = this.directory.resolve(fileName);\n\t\t\treturn MockStringContentFactory.newMockInputStream(files\n\t\t\t\t\t.get(filePath));\n\t\t}\n\t}",
"public static InputStream getInputStreamFromFile(File file)\n\t\t\tthrows IOException {\n\t\treturn new FileInputStream(file);\n\t}",
"public InputStream getRemoteFileStream(String remoteFilePath) throws IOException, NoDataReceivedException\n {\n URL url = new URL(remoteFilePath);\n URLConnection connection = url.openConnection();\n InputStream is = connection.getInputStream();\n connection.getContentLength();\n return is;\n }",
"protected InputStream _optimizedStreamFromURL(URL url)\n/* */ throws IOException\n/* */ {\n/* 1529 */ if (\"file\".equals(url.getProtocol()))\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1536 */ String host = url.getHost();\n/* 1537 */ if ((host == null) || (host.length() == 0))\n/* */ {\n/* 1539 */ String path = url.getPath();\n/* 1540 */ if (path.indexOf('%') < 0) {\n/* 1541 */ return new FileInputStream(url.getPath());\n/* */ }\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1547 */ return url.openStream();\n/* */ }",
"public InputStream readDocumentAsStream(String path) ;",
"public final SMBInputStream asInputStream()\n\t\tthrows SMBException {\n\n\t\t// Check if the file is a directory\n\n\t\tif ( isDirectory())\n\t\t\tthrow new SMBException(SMBStatus.DOSInvalidFunc, SMBStatus.ErrDos);\n\n\t\t// Create the input stream\n\n\t\treturn new SMBInputStream(this);\n\t}",
"public InputStream getStream();",
"public InputStream openStream(String str) {\n try {\n return new FileInputStream(str);\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }",
"public static InputStream asStream(String name) throws IOException {\n ClassLoader classLoader = Reflection.getCallerClass(3).getClassLoader();\n return asStream(name, classLoader);\n }",
"public final File getLocalFile() throws IllegalArgumentException\n {\n if (hostOrNull != null)\n {\n throw new IllegalArgumentException(\"getLocalFile can only be called on local paths.\");\n }\n return new File(path);\n }",
"StreamReader underlyingReader();",
"public InputStream getStream() {\n final CircularByteBuffer cbb = new CircularByteBuffer(1024);\n new Thread(\n new Runnable(){\n public void run(){\n ZipOutputStream zos = new ZipOutputStream(cbb.getOutputStream());\n Utils.zipDir(getVolume(), requestedDirectory.getPath(), zos);\n\n try {\n if (zos != null) {\n zos.flush();\n zos.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n ).start();\n\n return cbb.getInputStream();\n }",
"public static BufferedInputStream getBufferedInput(File source)\n throws IOException {\n boolean isGzipped = source.getName().toLowerCase().\n endsWith(GZIP_SUFFIX);\n FileInputStream fis = new FileInputStream(source);\n return isGzipped ? new BufferedInputStream(new GZIPInputStream(fis))\n : new BufferedInputStream(fis);\n }",
"public InputStream getInputStream()\n throws ProcessingException, IOException {\n try {\n return this.source.getInputStream();\n } catch (SourceException e) {\n throw SourceUtil.handle(e);\n }\n }",
"public static InputStream getStream(String fileOrResourceName) {\n\t\t/*\n\t\t * in production, it is a resource, and hence we try that first\n\t\t */\n\t\tInputStream stream = IoUtil.class.getClassLoader().getResourceAsStream(fileOrResourceName);\n\t\tif (stream != null) {\n\t\t\treturn stream;\n\t\t}\n\t\tFile file = new File(fileOrResourceName);\n\t\tif (file.exists()) {\n\t\t\ttry {\n\t\t\t\treturn new FileInputStream(file);\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.error(\n\t\t\t\t\t\t\"Resource {} is intepreted as a file that was located on the file system, but error while creating stream from that file. Error: {}\",\n\t\t\t\t\t\tfileOrResourceName, e.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public abstract InputStream getInputStream() throws AccessException;",
"public abstract InputStream openStream(String str);",
"private StreamSource getFileSource(final File requestedFile) {\n StreamSource fileSource = new StreamSource() {\n private static final long serialVersionUID = 3275933556191707490L;\n public InputStream getStream() {\n try {\n return new org.xtreemfs.portlet.util.BufferedFileInputStream(requestedFile);\n } catch (IOException e) {\n showNotification(\"Error\", e.getMessage(), Notification.TYPE_ERROR_MESSAGE, e);\n }\n return null;\n }\n };\n return fileSource;\n }",
"public InputStream inputStream(final String uri, final Map<String, String> creds) throws Exception {\n\t\ttry {\n\t\t\tClient c = getHttpClient();\n\t\t\tWebResource r = c.resource(url + \"/file\");\n\t\t\tcom.sun.jersey.api.client.WebResource.Builder b = r.header(HTTP_HEADER_KEY, key).header(HTTP_HEADER_URI, uri).accept(MediaType.APPLICATION_OCTET_STREAM);\n\t\t\tif (allowRedirects) b.header(HTTP_HEADER_REDIRECT, \"yes\");\n\t\t\taddMapAsHttpHeader(b, creds);\n\t\t\treturn b.get(InputStream.class);\n\t\t} catch (UniformInterfaceException e) {\n\t\t\tthrow new Exception(e.getMessage() + \" (\" + e.getResponse().getEntity(String.class) + \")\");\n\t\t} catch (Throwable e) {\n\t\t\tthrow new Exception(e);\n\t\t}\n\t}",
"public InputStream getInputStream() throws IOException {\n/* 521 */ return Minecraft.getMinecraft().getResourceManager().getResource(p_148612_0_).getInputStream();\n/* */ }",
"public static BufferedInputStream getInput(File file) throws IOException {\n return getInput(file.toPath());\n }",
"public InputStream getInputStream() throws IOException {\n return this.mContext.getAssets().open(this.mAssetName);\n }",
"public FileInputStream getFileInputStream(){\n\t\t//String filePath=System.getProperty((\"user.dir\")+\"\\\\src\\\\test\\\\java\\\\data\\\\userData.xlsx\");\n\t\tString filePath=System.getProperty(\"user.dir\")+\"/src/test/java/data/userData.xlsx\";\n\t\t//String filePath=System.getProperty((\"user.dir\")+\"src/test/java/data/userData.xlsx\");\n\t\tFile srcFile=new File(filePath);\n\t\ttry {\n\t\t\tfis=new FileInputStream(srcFile);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Test Data file not found.terminating process!! :Check file path of test data file\");\n\t\t}\n\n\t\treturn fis;\n\t}",
"FileObject getFile();",
"FileObject getFile();",
"@Override\n public InputStream readFileInternal(String _fileName) throws IOException\n { // Reads a file from the devices internal storage. Takes a filename as a parameter and throws an IOException if failed.\n return context.openFileInput(_fileName);\n }",
"public InputStream getInputStream()\n/* */ {\n/* 105 */ InputStream in = ResourceUtils.getResourceAsStream(this, this);\n/* */ \n/* 107 */ return in;\n/* */ }",
"@Override\n public InputStream getContentInputStream()\n {\n final class LockingFileInputStream extends FileInputStream\n {\n /** The lock to lock while reading the file. */\n private Lock lock;\n\n /**\n * The Constructor.\n *\n * @param toRead the file for this stream to read.\n * @param lock the lock to lock on creation of the stream and unlock when it is closed.\n * @throws IOException if the extended FileInputStream throws one.\n */\n public LockingFileInputStream(final File toRead, final Lock lock) throws IOException\n {\n super(toRead);\n this.lock = lock;\n lock.lock();\n }\n\n /** {@inheritDoc} */\n public void close() throws IOException\n {\n // Make sure this only happens once.\n if (this.lock != null) {\n super.close();\n this.lock.unlock();\n this.lock = null;\n }\n }\n }\n\n try {\n return new AutoCloseInputStream(\n new LockingFileInputStream(this.storageFile, this.lock.readLock()));\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to get InputStream\", e);\n }\n }",
"protected InputStream openFileStream(ResourceType type, String path) {\n // Create full path\n String fullPath = type.makePath(path);\n\n // Check overrided\n if (!ResourceOverrides.isResourceOverrided(fullPath)) {\n // =null: failed to load resource pack file\n this.handleLoad(true, false);\n if (this.archive != null) {\n try {\n InputStream stream = this.archive.openFileStream(fullPath);\n if (stream == null) {\n stream = this.archive.openFileStream(fullPath.toLowerCase(Locale.ENGLISH));\n }\n if (stream != null) {\n return stream;\n }\n } catch (IOException ex) {\n }\n }\n\n // Fallback: try the underlying resource pack (usually Vanilla)\n if (this.baseResourcePack != null) {\n InputStream stream = this.baseResourcePack.openFileStream(type, path);\n if (stream != null) {\n return stream;\n }\n }\n\n // Fallback: ask provider (if available)\n if (this.currProvider != null) {\n try {\n return this.currProvider.openResource(type, path);\n } catch (IOException ex) {\n }\n }\n }\n\n // Fallback: load from BKCommonLib built-in resources\n // This handles many block models such as signs\n InputStream bkc_stream = Common.class.getResourceAsStream(type.makeBKCPath(path));\n if (bkc_stream != null) {\n return bkc_stream;\n }\n\n // FAILED\n return null;\n }",
"public static InputStream createInputStream(String filename) throws FileReadingException {\n File file = new File(filename);\n if (!file.exists()) {\n throw new FileReadingException(\"File Not Found: \" + filename + \"\\n\");\n }\n if (!file.isFile()) {\n throw new FileReadingException(filename + \" is not a file.\\n\");\n }\n if (!file.canRead()) {\n throw new FileReadingException(\"Reading file \" + filename + \" is not permitted.\\n\");\n }\n\n try {\n return new FileInputStream(file);\n } catch (FileNotFoundException e) {\n throw new FileReadingException(\"File Not Found: \" + filename + \"\\n\");\n }\n }",
"protected InputStream getURLInputStream() throws Exception\n\t {\n\n\t URL url = new URL(file, fFilename);\n\t InputStream fin = url.openStream();\n\t BufferedInputStream bin = new BufferedInputStream(fin);\n\t return bin;\n\t }",
"private static InputStream createStream(final TachyonFile file, final ReadType readType)\n throws IOException {\n return RemoteBlockInStreams.create(file, readType, 0);\n }",
"protected abstract InputStream getStream(String resource);",
"public static InputStream inputStreamFromString(String location) throws IOException {\n switch (getStringLocationType(location)) {\n case LOCATION_URL:\n return new URL(location).openStream();\n\n case LOCATION_FILE:\n default:\n return new FileInputStream(location);\n }\n }",
"public ECFileCacheInputStream(FileCacheKey cacheKey, Map<Long, Integer> chunkPosAndSize, RedisAccessBase redisAccess,\n List<Integer> redisIds, InputStream stream) {\n this.key = cacheKey.getUuid();\n this.fileSize = (int) cacheKey.getFileSize();\n this.chunkPosAndSize = chunkPosAndSize;\n this.redisAccess = redisAccess;\n this.redisIds = redisIds;\n this.endChunkStream = stream;\n }",
"public InputStream getStream(URL url) throws IOException {\n return engine.getStream(url);\n }",
"public static InputStream nullInput() {\n if(nullIn == null) {\n nullIn = new NullInputStream();\n }\n return nullIn;\n }",
"@Override\n public InputStream readFileExternal(String _fileName) throws IOException \n { // Reads a file saved to external storage. Takes the filename as a parameter and throws an IOException if failed.\n return new FileInputStream(externalStoragePath + _fileName);\n }",
"RandomAccessFile openInputFile(String fileName) {\n if (dbg) System.out.println(\"<br>\" + thisClass + \".openInputFile: \" +\n \"fileName = \" + fileName);\n RandomAccessFile file = null;\n try {\n file = new RandomAccessFile(fileName, \"r\");\n if (dbg) System.out.println(\"<br>\" + thisClass + \".openInputFile: \" +\n \"success: file opened for read\");\n } catch (Exception e) {\n ec.processError(e, thisClass, \"openInputFile\", \"\");\n if (dbg) System.out.println(\"<br>\" + thisClass + \".openInputFile: \" +\n \"error: file opened for read\");\n } // try-catch\n return file;\n }",
"public GridFSInputFile createFile(InputStream in) {\n\treturn createFile(in, null);\n }",
"public void start(InputStream in, String path);",
"public static InputStream download(FileSystem fs, String remotePath) throws IOException {\n return fs.open(new Path(remotePath));\n }",
"@Override\r\n\tpublic InputStream getInputStream() throws IOException {\n\t\treturn this.s.getInputStream();\r\n\t}",
"public InputStream mo21856f(String str) {\n if (str == null || str.length() == 0) {\n return null;\n }\n if (str.indexOf(\":\") != -1) {\n try {\n HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(str).openConnection();\n httpURLConnection.setRequestMethod(\"GET\");\n httpURLConnection.setDoInput(true);\n httpURLConnection.connect();\n return httpURLConnection.getInputStream();\n } catch (FileNotFoundException | MalformedURLException unused) {\n } catch (IOException e) {\n mo21818a((Throwable) e);\n return null;\n }\n }\n try {\n InputStream open = this.f24530b.mo22068i().open(str);\n if (open != null) {\n return open;\n }\n } catch (IOException unused2) {\n }\n File file = new File(str);\n if (file.exists()) {\n try {\n return new FileInputStream(file);\n } catch (FileNotFoundException unused3) {\n }\n }\n File file2 = new File(mo21862h(str));\n if (file2.exists()) {\n try {\n return new FileInputStream(file2);\n } catch (FileNotFoundException unused4) {\n }\n }\n return this.f24530b.mo22061b(str);\n }",
"public InputStream getInputStream( DirectoryEntry directoryEntry) {\n\n\t// If the file has a 0 size, just return null for now.\n\tif( directoryEntry.getFileSizeAsBytes() == 0) {\n\t return null;\n\t}\n\n\t// A pointer to the current sector.\n\tD64Sector sectorBuffer;\n\n\t// Create a byte buffer for the file content.\n\tbyte [] fileContent = new byte[ directoryEntry.getFileSizeAsBytes()];\n\n\t// Get the first sector of the file and add it to the result.\n\tSystem.arraycopy( ( sectorBuffer = (D64Sector)getSector( ((D64DirectoryEntry)directoryEntry).getStartTrack()\n\t\t\t\t\t\t , ((D64DirectoryEntry)directoryEntry).getStartSector())).getDataBytes()\n\t\t\t , 2\n\t\t\t , fileContent\n\t\t\t , 0\n\t\t\t , getUnitSize());\n\n\t// Loop over the sectors of the file and add them to the buffer.\n\tint currentFileContentIndex = getUnitSize();\n\tfor( int currentSectorIndex = 1; currentSectorIndex < directoryEntry.getFileSizeAsUnits(); ++currentSectorIndex) {\n\t \n\t // Get the next track and sector from the current sector.\n\t int nextTrack = sectorBuffer.getNextTrack();\n\t int nextSector = sectorBuffer.getNextSector();\n\n\t // Add the next sector to the result.\n\t System.arraycopy( ( sectorBuffer = (D64Sector)getSector( nextTrack, nextSector)).getDataBytes()\n\t\t\t , 2\n\t\t\t , fileContent\n\t\t\t , currentFileContentIndex\n\t\t\t , getUnitSize());\n\n\t // Point to the next block in the result buffer.\n\t currentFileContentIndex += getUnitSize();\n\t}\n\n\t// Now create an input stream from the file content.\n\treturn new ByteArrayInputStream( fileContent);\n }",
"void openInput(String file)\r\n\t{\n\t\ttry{\r\n\t\t\tfstream = new FileInputStream(file);\r\n\t\t\tin = new DataInputStream(fstream);\r\n\t\t\tis = new BufferedReader(new InputStreamReader(in));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\r\n\t}"
]
| [
"0.67780626",
"0.637108",
"0.6324546",
"0.6180201",
"0.617452",
"0.6134188",
"0.6123156",
"0.6082035",
"0.58940357",
"0.5829503",
"0.5806769",
"0.5800266",
"0.5797691",
"0.5788617",
"0.57878727",
"0.57878727",
"0.57741773",
"0.57741773",
"0.57741773",
"0.5742133",
"0.57414675",
"0.57089466",
"0.56946474",
"0.5691324",
"0.5680186",
"0.56631345",
"0.5641998",
"0.5640126",
"0.563017",
"0.5612317",
"0.5588893",
"0.55517673",
"0.5549233",
"0.5533845",
"0.5487303",
"0.5487303",
"0.5483724",
"0.54823214",
"0.5480477",
"0.54776865",
"0.54776865",
"0.54767776",
"0.5475146",
"0.54714894",
"0.54710597",
"0.54444593",
"0.54399717",
"0.54127395",
"0.54124254",
"0.53771603",
"0.53687805",
"0.5336446",
"0.5333579",
"0.53285563",
"0.5317843",
"0.5312271",
"0.52977836",
"0.52588236",
"0.52561575",
"0.5247871",
"0.5233008",
"0.5204348",
"0.51975447",
"0.5185571",
"0.51802504",
"0.51673037",
"0.51649374",
"0.51607805",
"0.5157825",
"0.51571774",
"0.51498806",
"0.5136512",
"0.5132155",
"0.5129714",
"0.51122075",
"0.51111007",
"0.51049876",
"0.50925434",
"0.50925434",
"0.509173",
"0.509023",
"0.5082387",
"0.5079395",
"0.5072557",
"0.50390244",
"0.5031316",
"0.50095147",
"0.49729788",
"0.49722144",
"0.49708098",
"0.49683818",
"0.49662048",
"0.49525744",
"0.49434042",
"0.49401286",
"0.4936916",
"0.49335697",
"0.49278933",
"0.49186084",
"0.4918238"
]
| 0.6224357 | 3 |
Get pin status of a file by checking the sticky bit. | public boolean getPinning(LocalFileSystem localFS, Path path) throws
IOException {
boolean stickyBit =
localFS.getFileStatus(path).getPermission().getStickyBit();
return stickyBit;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean canRead() {\n\t\treturn fileStatus;\n\t}",
"public ZipStatus getStatus(String token) {\n synchronized (statusMap) {\n return statusMap.get(token);\n }\n }",
"public int getRawFlag() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"0811c831-ddd9-4df1-b31c-c5d631e39389\");\n return rawFlag;\n }",
"public boolean isActive() \r\n\t //@ requires [?f]File(?fid, ?state, ?info);\r\n\t //@ ensures [f]File(fid, state, info) &*& result == state;\r\n\t{\r\n\t\t////@ open [f]File(fid, state, info); // auto\r\n\t\t////@ open [f]MasterFile(fid, ?d0, state, ?d1, ?info2); // auto\r\n\t\t////@ open [f]this.DedicatedFile(DedicatedFile.class)(fid, null, state, d1, ?info3); // auto\r\n\t\t////@ open [f]this.File(File.class)(fid, state, ?info4); // auto\r\n\t\treturn active;\r\n\t\t////@ close [f]this.File(File.class)(fid, state, info4); // auto\r\n\t\t////@ close [f]this.DedicatedFile(DedicatedFile.class)(fid, null, state, d1, info3); // auto\r\n\t\t////@ close [f]MasterFile(fid, null, state, d1, info2); // auto\r\n\t\t////@ close [f]File(fid, state, info); // auto\r\n\t}",
"public boolean isActive() \r\n\t //@ requires [?f]File(?fid, ?state, ?info);\r\n\t //@ ensures [f]File(fid, state, info) &*& result == state;\r\n\t{\r\n\t\t////@ open [f]File(fid, state, info); // auto\r\n\t\treturn active;\r\n\t\t////@ close [f]File(fid, state, info); // auto\r\n\t}",
"boolean hasInodeFile();",
"private boolean needPIN() {\n return datafacade.getInt(\"pin\")!=-1;\n }",
"public int getFlag() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readInt(__io__address + 20);\n\t\t} else {\n\t\t\treturn __io__block.readInt(__io__address + 12);\n\t\t}\n\t}",
"public final int getFileStatus() {\n\t return m_fileStatus;\n\t}",
"boolean hasUpdateInodeFile();",
"public int getFlag() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readInt(__io__address + 4);\n\t\t} else {\n\t\t\treturn __io__block.readInt(__io__address + 4);\n\t\t}\n\t}",
"@XmlElement\n public boolean isIsFileLocked() {\n return this.isFileLocked;\n }",
"public boolean isPinned();",
"public boolean isActive() \r\n\t //@ requires [?f]File(?fid, ?state, ?info);\r\n\t //@ ensures [f]File(fid, state, info) &*& result == state;\r\n\t{\r\n\t\t////@ open [f]File(fid, state, info); // auto\r\n\t\t////@ open [f]DedicatedFile(fid, ?d1, state, ?siblist, ?info2); // auto\r\n\t\t////@ open this.File(File.class)(fid, state, ?info3); // auto\r\n\t\treturn active;\r\n\t\t////@ close [f]this.File(File.class)(fid, state, info3); // auto\r\n\t\t////@ close [f]DedicatedFile(fid, d1, state, siblist, info2); // auto\r\n\t\t////@ close [f]File(fid, state, info); // auto\r\n\t}",
"FileState checkFileState(FsPath path);",
"@Override\n public FileStatus getFileStatus(File file) {\n\treturn null;\n }",
"public short getFlag() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readShort(__io__address + 6);\n\t\t} else {\n\t\t\treturn __io__block.readShort(__io__address + 6);\n\t\t}\n\t}",
"public static native int isPinSupported(int pin) throws RuntimeException;",
"public boolean lockForPing() {\r\n\t\treturn beingPinged.compareAndSet(false, true);\r\n\t}",
"private void getPrefStatus() {\n Log.i(TAG, \"getPrefStatus()\");\n mPref = getSharedPreferences(PREF_NAME, Context.MODE_WORLD_READABLE\n | Context.MODE_WORLD_WRITEABLE);\n mHasGotPref = true;\n for (int i = SPEED_DIAL_MIN; i < SPEED_DIAL_MAX + 1; ++i) {\n mPrefNumState[i] = mPref.getString(String.valueOf(i), \"\");\n mPrefMarkState[i] = mPref.getInt(String.valueOf(offset(i)), -1);\n }\n }",
"private void checkSingleInstance() {\r\n\t\t//Erzeugt ein RandomAccessFile \"flag\"\r\n\t\tfinal File file = new File(\"flag\");\r\n\t\tRandomAccessFile randomAccessFile;\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\t//Ist es der Applikation nicht möglich, das erstellte File zu sperren, zeigt es an, dass bereits eines vorhanden ist.\r\n\t\t\t//Dementsprechend wird die Applikation beendet, da bereits eine Instanz geöffnet wurde.\r\n\t\t\trandomAccessFile = new RandomAccessFile(file, \"rw\");\r\n\t\t\tfinal FileLock fileLock = randomAccessFile.getChannel().tryLock();\r\n\r\n\t\t\tif (fileLock == null) {\r\n\t\t\t\tPlatform.exit();\r\n\t\t\t}\r\n\t\t} catch (Exception e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t}",
"boolean isPendingToRead();",
"boolean hasRead();",
"public synchronized boolean isOpen() {\n return randomAccessFile != null;\n }",
"public static native FileStatus stat(String path) throws IOException;",
"Object getUptodatefile();",
"public int getReadStatus() {\n return (readStatus.getUnsignedInt());\n }",
"boolean hasGetLatestReading();",
"boolean isSeekable();",
"@Test\n public void newFilesInheritPinness() throws Exception {\n TachyonFile root = mTfs.open(new TachyonURI(\"/\"));\n mTfs.setPin(root, true);\n\n // Child file should be pinned\n TachyonFile file0 = createEmptyFile(new TachyonURI(\"/file0\"));\n Assert.assertTrue(mTfs.getInfo(file0).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId()));\n\n // Child folder should be pinned\n mTfs.mkdirs(new TachyonURI(\"/folder\"));\n TachyonFile folder = mTfs.open(new TachyonURI(\"/folder\"));\n Assert.assertTrue(mTfs.getInfo(folder).isPinned);\n\n // Grandchild file also pinned\n TachyonFile file1 = createEmptyFile(new TachyonURI(\"/folder/file1\"));\n Assert.assertTrue(mTfs.getInfo(file1).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId(), file1.getFileId()));\n\n // Unpinning child folder should cause its children to be unpinned as well\n mTfs.setPin(folder, false);\n Assert.assertFalse(mTfs.getInfo(folder).isPinned);\n Assert.assertFalse(mTfs.getInfo(file1).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId()));\n\n // And new grandchildren should be unpinned too.\n TachyonFile file2 = createEmptyFile(new TachyonURI(\"/folder/file2\"));\n Assert.assertFalse(mTfs.getInfo(file2).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId()));\n\n // But toplevel children still should be pinned!\n TachyonFile file3 = createEmptyFile(new TachyonURI(\"/file3\"));\n Assert.assertTrue(mTfs.getInfo(file3).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId(), file3.getFileId()));\n }",
"int getPinNumber();",
"public static native FileStatus lstat(String path) throws IOException;",
"private boolean checkTimeStamp(File file) {\n // uses sharedpreferences\n return (lastUpdate < file.getModifiedDate().getValue());\n }",
"public boolean isActive() \r\n\t //@ requires [?f]File(?fid, ?state, ?info);\r\n\t //@ ensures [f]File(fid, state, info) &*& result == state;\r\n\t{\r\n\t\t////@ open [f]File(fid, _, info); // auto\r\n\t\t////@ open [f]ElementaryFile(fid, _, _, _, _, ?info2); // auto\r\n\t\tboolean b = super.isActive();\r\n\t\t////@ close [f]ElementaryFile(fid, _, _, _, _, info2); // auto\r\n\t\t////@ close [f]File(fid, _, info); // auto\r\n\t\treturn b;\r\n\t}",
"public static native boolean isExported(int pin) throws RuntimeException;",
"private static boolean readReadWriteFile() {\n File mountFile = new File(\"/proc/mounts\");\n StringBuilder procData = new StringBuilder();\n if (mountFile.exists()) {\n try {\n FileInputStream fis = new FileInputStream(mountFile.toString());\n DataInputStream dis = new DataInputStream(fis);\n BufferedReader br = new BufferedReader(new InputStreamReader(\n dis));\n String data;\n while ((data = br.readLine()) != null) {\n procData.append(data).append(\"\\n\");\n }\n\n br.close();\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n\n String[] tmp = procData.toString().split(\"\\n\");\n for (String aTmp : tmp) {\n // Kept simple here on purpose different devices have\n // different blocks\n if (aTmp.contains(\"/dev/block\")\n && aTmp.contains(\"/system\")) {\n if (aTmp.contains(\"rw\")) {\n // system is rw\n return true;\n } else if (aTmp.contains(\"ro\")) {\n // system is ro\n return false;\n } else {\n return false;\n }\n }\n }\n }\n return false;\n }",
"boolean hasFileLoc();",
"int getFlag();",
"boolean hasDriveFile();",
"@Override\n public int ReadStatusByte()\n throws IOException {\n\n int StatusByte;\n ShortByReference pShort = new ShortByReference();\n ByteByReference pByte = new ByteByReference();\n\n\n // read the status byte\n if (USE_4882 == true) {\n m_gpib32.ReadStatusByte(BOARD_NR, (short)m_UnitDescriptor, pShort);\n StatusByte = (int)pShort.getValue();\n } else {\n m_gpib32.ibrsp(m_UnitDescriptor, pByte);\n StatusByte = (int)pShort.getValue();\n }\n\n // error check\n String str = \"Could not read the Status Byte from the Instrument.\\n\";\n checkErrorGPIB(str, false);\n\n // return\n return StatusByte;\n }",
"boolean hasUpdateInode();",
"boolean getWorkfileExists();",
"boolean getRead();",
"boolean isUsedForReading();",
"public boolean hasFileLoc() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public int getSyncStatus();",
"public boolean hasFileLoc() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public int getFileFlags() { return fileFlags; }",
"@Override\n\tpublic int getFileStatus() {\n\t\treturn 0;\n\t}",
"boolean hasForRead();",
"public boolean isFlagged();",
"@Override\n public int getPinState(){\n return 0;\n }",
"public long getFilePointer() throws IOException {\n return raos.getFilePointer();\n }",
"boolean getForRead();",
"public Integer getLockFlag() {\n return lockFlag;\n }",
"public Integer getLockFlag() {\n return lockFlag;\n }",
"public Integer getLockFlag() {\n return lockFlag;\n }",
"@Override\n\tpublic boolean getPinged() {\n\t\treturn true;\n\t}",
"long getFileOffset();",
"boolean hasRetrieveFile();",
"public int pinCheck(long mobileNumber,int pinNumber) throws Exception {\n\t\tConnection conn = Connect.connect();\n\t\tString passwordSql=\"select upi_passwd from login where mobile_no=?\";\n\t\tPreparedStatement stmt=conn.prepareStatement(passwordSql);\n\t\tstmt.setLong(1,mobileNumber);\n\t\tResultSet rs1=stmt.executeQuery();\n\t\tint pin=0,flag=0;\n\t\twhile(rs1.next()) {\n\t\t\tpin=rs1.getInt(\"upi_passwd\");\n\t\t}conn.close();\n\t\tif(pin==pinNumber) {\n\t\t\tflag=1;\n\t\t\t}\n\t\telse {\n\t\t\tflag=0;\n\t\t}\n\t\treturn flag;\n\t}",
"public boolean getMappedFile();",
"public abstract boolean sjekkPIN(int pin);",
"public java.lang.Boolean getIsPinExpired() {\r\n return isPinExpired;\r\n }",
"private void checkFstab() {\n\t\tFile f = new File(getBasePath(), ETC_FSTAB_LOCATION);\n\t\tif (f.exists()) {\n\t\t\tString line = null;\n\t\t\tstatus = RsyncStatus.ETC_FSTAB_INVALID;\n\t\t\ttry (BufferedReader reader = new BufferedReader(new FileReader(f))) {\n\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\tif (!line.startsWith(COMMENT_PREFIX) && line.contains(CYGDRIVE) && line.contains(NOACL_FLAG)) {\n\t\t\t\t\t\tstatus = RsyncStatus.OK;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tstatus = RsyncStatus.ETC_FSTAB_INVALID;\n\t\t\t}\n\n\t\t} else {\n\t\t\tstatus = RsyncStatus.ETC_FSTAB_NOT_FOUND;\n\t\t}\n\t}",
"void unlockRead(long stamp);",
"public FileHandleStatus getFileStatus(String fileId) throws IOException {\n final String targetUrl = getTargetUrl(fileId);\n HeaderResponse headerResponse = volumeWrapper.getFileStatusHeader(targetUrl, fileId);\n Header contentTypeHeader = headerResponse.getLastHeader(\"Content-Type\");\n try {\n return new FileHandleStatus(fileId,\n headerDateFormat.parse(headerResponse.getLastHeader(\"Last-Modified\").getValue()).getTime(),\n headerResponse.getLastHeader(\"Content-Disposition\").getValue()\n .substring(10, headerResponse.getLastHeader(\"Content-Disposition\").getValue().length() - 1),\n // newer versions of weed server won't return Content-Type in HTTP headers\n contentTypeHeader == null ? null : contentTypeHeader.getValue(),\n Long.parseLong(headerResponse.getLastHeader(\"Content-Length\").getValue()));\n } catch (ParseException e) {\n throw new SeaweedfsException(\"Could not parse last modified time [\" +\n headerResponse.getLastHeader(\"Last-Modified\").getValue() + \"] to long value\");\n }\n }",
"public static boolean readBooleanNormal(Context context, String fileName, String key) {\n if (context == null) return false;\n SharedPreferences sharedPreferences = context.getSharedPreferences(fileName, Context.MODE_PRIVATE);\n return sharedPreferences.getBoolean(key, false);\n }",
"int canon_has_lowbits()\n{\n BytePtr test = new BytePtr(0x4000);\n int ret=1, i;\n\n CTOJ.fseek (ifp, 0, CTOJ.SEEK_SET);\n CTOJ.fread (test, 1, /*sizeof test*/0x4000, ifp);\n for (i=540; i < /*sizeof test*/0x4000 - 1; i++)\n if ( CTOJ.toUnsigned(test.at(i)) == 0xff) {\n if (test.at(i+1) != 0) return 1;\n ret=0;\n }\n return ret;\n}",
"boolean getStatus();",
"boolean getStatus();",
"boolean getStatus();",
"public int digitalRead(int pin) { // (unsupported in HardAta.ino)\r\n int info = digitalInputData[(pin >> 3) & MDB_msk], aBit = (info >> (pin & 7)) & 1;\r\n if (SpeakEasy){\r\n System.out.println(\"F%%F/digiRead #\" + pin + \" = \" + aBit + \"/\" + info);\r\n }\r\n return aBit;\r\n }",
"Integer getStatus();",
"private boolean open(final int status) {\n return Objects.equals(status, 0);\n }",
"boolean hasGetLatestSensorReadingForUser();",
"public int haveALock() {\n\t\tString status = getField(NMEASentence.STATUS);\n\t\tif (status==null) return NO_INFO_RE_A_LOCK;\n\t\tif ( StringUtil.equalsIgnoreCase(status,\"V\") ) {\n\t\t\treturn DONT_HAVE_A_LOCK;\n\t\t}\n\t\telse if ( StringUtil.equalsIgnoreCase(status,\"A\") ) {\n\t\t\treturn HAVE_A_LOCK;\n\t\t}\n\t\treturn NO_INFO_RE_A_LOCK;\n\t}",
"public boolean checkTamper()\n\t{\n\t\tboolean isDone = false;\n\t\tVector<Resource> allResources = new Vector<Resource>();\n\t\tResource resourceJournal = new Resource(DEFAULT_JOURANAL_LOG_FILE, JOURNAL_LOG_FILE_TYPE, JOURNAL_LOG_FILE_ID, FileDownload.DEFAULT_LOG_FOLDER, DEFAULT_JOURANAL_LOG_FILE_EXT);\n\t\tResource resourcePinpad = new Resource(DEFAULT_PINPAD_LOG_FILE, PINPAD_LOG_FILE_TYPE, PINPAD_LOG_FILE_ID, FileDownload.DEFAULT_LOG_FOLDER, DEFAULT_PINPAD_LOG_FILE_EXT);\n\t\tallResources.add(resourceJournal);\n\t\tallResources.add(resourcePinpad);\n\t\tif(FileDownload.getInstance().startDownload(allResources, false))\n\t\t{\n\t\t\tFile journal = new File(FileDownload.DEFAULT_LOG_FOLDER + \"//JOURNAL.log\");\n\t\t\tFile pinpad = new File (FileDownload.DEFAULT_LOG_FOLDER + \"//PINPAD_HIST\");\n\t\t\tDate firstDate=null;\n\t\t\tif(journal.exists())\n\t\t\t{\n\t\t\t\t/*First read the JOURNAl file and find the >>>>>> START DATE*/\t\t\t\n\t\t\t\tfirstDate = ParsePinPadLogsFile.getInstance().deviceLastStartDate(resourceJournal.getLogFilePath());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfirstDate = downloadJournalHist();\n\t\t\t}\n\t\t\tif(pinpad.exists())\n\t\t\t{\n\t\t\t\t/*Get the current date which is as last date here*/\n\t\t\t\tDate lastDate = currentDateofSystem();\n\t\t\t\tFile currFile = new File(resourcePinpad.getLogFilePath() );\n\t\t\t\tFile DestDirFolder = new File(FileDownload.DEFAULT_LOG_FOLDER);\n\t\t\t\tFileCompression.getInstance().uncompress(currFile, DestDirFolder);\n\t\t\t\tFile uncompressFilesDirectory = new File(FileDownload.DEFAULT_LOG_FOLDER +\"//gilbarco//logs\");\n\t\t\t\tParsePinPadLogsFile.getInstance().logByDateAction(uncompressFilesDirectory.toString(),firstDate,lastDate);\n\t\t\t\tif(uncompressFilesDirectory.length()!=0)\n\t\t\t\t{\n\t\t\t\t\tParsePinPadLogsFile.getInstance().unZipExtractedTarFiles(uncompressFilesDirectory, \".txt\");\n\t\t\t\t\tisTampered = ParsePinPadLogsFile.getInstance().searchKeyWord(uncompressFilesDirectory,DEFAULT_KEYWORD_TAMPER);\n\t\t\t\t}\n\t\t\t\tif(isTampered)\n\t\t\t\t{\n\t\t\t\t\tstatusMsg = \"tampered\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstatusMsg = \"not tampered\";\n\t\t\t\t}\n\t\t\t\tisDone = true;\n\t\t\t\tEdtFileUtil.delete(DestDirFolder, true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlogger.info(\"Pinpad and journal logs download failed\");\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlogger.info(\"Pinpad and journal logs download failed\");\n\t\t}\n\t\tlogger.info(\"Parsing pinpad logs process completed\");\n\t\treturn isDone;\n\t\t\n\t}",
"public String getStatus(final Long fileIdentifier) {\n Optional<FileEntity> result = fileStatusRepository.findById(fileIdentifier);\n\n if (result.isPresent()) {\n return ProcessingStatus.forStorageValue(result.get().getStatus()).getDisplayValue();\n }\n\n return null;\n }",
"public float getSyncStatus() {\n Object o = gemFileState.get(STATE_SYNC_PROGRESS);\n if (o == null) {\n return 1;\n }\n float process = 1;\n try {\n process = Float.parseFloat((String) o);\n } catch (Exception e) {\n\n }\n return process;\n }",
"boolean isSetRawOffset();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"boolean isLocked();",
"boolean isLocked();",
"public boolean isActiveValue() {\n\n\t\tint tmp = getValue();\n\t\tif (tmp == 25)\n\t\t\tdetectStatus = true;\n\t\telse // Getting 24 here\n\t\t\tdetectStatus = false;\n\n\t\treturn detectStatus;\n\t}",
"public Boolean getActiveflag() {\n return activeflag;\n }",
"public boolean hasInodeFile() {\n return ((bitField0_ & 0x00010000) == 0x00010000);\n }",
"public long getFileOffset();",
"public boolean hasFileInfo() {\n return fieldSetFlags()[15];\n }",
"public boolean hasUpdateInodeFile() {\n return ((bitField0_ & 0x80000000) == 0x80000000);\n }"
]
| [
"0.5379971",
"0.5351397",
"0.53447014",
"0.5343717",
"0.5288044",
"0.52091426",
"0.5208509",
"0.5202015",
"0.5192077",
"0.518255",
"0.5151856",
"0.51243234",
"0.5102955",
"0.5100699",
"0.5090609",
"0.50893986",
"0.5077895",
"0.50379026",
"0.49882445",
"0.4956503",
"0.4943857",
"0.49395835",
"0.49212086",
"0.49168622",
"0.49124023",
"0.4912056",
"0.4843712",
"0.4829596",
"0.4819097",
"0.48184034",
"0.48106766",
"0.4801706",
"0.4795904",
"0.47935742",
"0.47876126",
"0.47759312",
"0.47656876",
"0.47417545",
"0.47373927",
"0.47021294",
"0.46979448",
"0.46918157",
"0.46889624",
"0.46862128",
"0.4673835",
"0.4667186",
"0.46664426",
"0.46580926",
"0.46535978",
"0.4648276",
"0.4635551",
"0.4631394",
"0.4630742",
"0.46299693",
"0.4628047",
"0.4628047",
"0.4628047",
"0.46232563",
"0.46230865",
"0.46166226",
"0.46099523",
"0.4598298",
"0.4559721",
"0.45490086",
"0.4535451",
"0.45203632",
"0.45169494",
"0.451553",
"0.45153046",
"0.45131195",
"0.45131195",
"0.45131195",
"0.4504143",
"0.44863772",
"0.4466102",
"0.44586685",
"0.44530928",
"0.44466835",
"0.4443926",
"0.44409332",
"0.44297057",
"0.44244683",
"0.44244683",
"0.44244683",
"0.44244683",
"0.44244683",
"0.44244683",
"0.44244683",
"0.44244683",
"0.44244683",
"0.44244683",
"0.44244683",
"0.442391",
"0.442391",
"0.4420603",
"0.44095868",
"0.44060948",
"0.44052607",
"0.4401907",
"0.43991432"
]
| 0.6777464 | 0 |
Set sticky bit on path to pin file. | public void setPinning(LocalFileSystem localFS, Path path) throws
IOException {
FsPermission oldPermission = localFS.getFileStatus(path).getPermission();
FsPermission permission = new FsPermission(oldPermission.getUserAction(),
oldPermission.getGroupAction(), oldPermission.getOtherAction(), true);
localFS.setPermission(path, permission);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPin(int pin);",
"private void setStickyFlag(final PinTask task, final String pool)\n {\n Date pinExpiration = task.freezeExpirationTime();\n \n /* To allow for some drift in clocks we add a safety margin to\n * the lifetime of the sticky bit.\n */\n long poolExpiration =\n (pinExpiration == null) ? -1 : pinExpiration.getTime() + CLOCK_DRIFT_MARGIN;\n \n PoolSetStickyMessage msg =\n new PoolSetStickyMessage(pool,\n task.getPnfsId(),\n true,\n task.getSticky(),\n poolExpiration);\n _poolStub.send(new CellPath(pool), msg,\n PoolSetStickyMessage.class,\n new AbstractMessageCallback<PoolSetStickyMessage>() {\n @Override\n public void success(PoolSetStickyMessage msg) {\n try {\n setToPinned(task);\n task.success();\n } catch (CacheException e) {\n fail(task, e.getRc(), e.getMessage());\n } catch (RuntimeException e) {\n fail(task, CacheException.UNEXPECTED_SYSTEM_EXCEPTION, e.toString());\n }\n }\n \n @Override\n public void failure(int rc, Object error) {\n switch (rc) {\n case CacheException.POOL_DISABLED:\n /* Pool manager had outdated\n * information about the pool. Give\n * it a chance to be updated and\n * then retry.\n */\n retry(task, RETRY_DELAY);\n break;\n case CacheException.FILE_NOT_IN_REPOSITORY:\n /* Pnfs manager had stale location\n * information. The pool clears\n * this information as a result of\n * this error, so we retry in a\n * moment.\n */\n retry(task, SMALL_DELAY);\n break;\n default:\n fail(task, rc, error.toString());\n break;\n }\n }\n \n @Override\n public void noroute(CellPath path) {\n /* The pool must have gone down. Give\n * pool manager a moment to notice this\n * and then retry.\n */\n retry(task, RETRY_DELAY);\n }\n \n @Override\n public void timeout(CellPath path) {\n /* No response from pool. Typically this is\n * because the pool is overloaded.\n */\n fail(task, CacheException.TIMEOUT,\n \"No reply from \" + path);\n }\n });\n }",
"public void setRingback(String path);",
"private void setGpioPin(int pin) \n\t{\n\t\tGpioUtil.setEdgeDetection(pin, GpioUtil.EDGE_RISING);\n\t\tGpio.pinMode(pin, Gpio.INPUT);\n\t\tGpio.pullUpDnControl(pin, Gpio.PUD_DOWN); \n\t\tGpioInterrupt.enablePinStateChangeCallback(pin);\n\t}",
"public void setRing(String path);",
"@Test\n public void newFilesInheritPinness() throws Exception {\n TachyonFile root = mTfs.open(new TachyonURI(\"/\"));\n mTfs.setPin(root, true);\n\n // Child file should be pinned\n TachyonFile file0 = createEmptyFile(new TachyonURI(\"/file0\"));\n Assert.assertTrue(mTfs.getInfo(file0).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId()));\n\n // Child folder should be pinned\n mTfs.mkdirs(new TachyonURI(\"/folder\"));\n TachyonFile folder = mTfs.open(new TachyonURI(\"/folder\"));\n Assert.assertTrue(mTfs.getInfo(folder).isPinned);\n\n // Grandchild file also pinned\n TachyonFile file1 = createEmptyFile(new TachyonURI(\"/folder/file1\"));\n Assert.assertTrue(mTfs.getInfo(file1).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId(), file1.getFileId()));\n\n // Unpinning child folder should cause its children to be unpinned as well\n mTfs.setPin(folder, false);\n Assert.assertFalse(mTfs.getInfo(folder).isPinned);\n Assert.assertFalse(mTfs.getInfo(file1).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId()));\n\n // And new grandchildren should be unpinned too.\n TachyonFile file2 = createEmptyFile(new TachyonURI(\"/folder/file2\"));\n Assert.assertFalse(mTfs.getInfo(file2).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId()));\n\n // But toplevel children still should be pinned!\n TachyonFile file3 = createEmptyFile(new TachyonURI(\"/file3\"));\n Assert.assertTrue(mTfs.getInfo(file3).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId(), file3.getFileId()));\n }",
"public void pin();",
"public void pin();",
"public void setFlag(int flag) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeInt(__io__address + 20, flag);\n\t\t} else {\n\t\t\t__io__block.writeInt(__io__address + 12, flag);\n\t\t}\n\t}",
"public void setFlag(int flag) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeInt(__io__address + 4, flag);\n\t\t} else {\n\t\t\t__io__block.writeInt(__io__address + 4, flag);\n\t\t}\n\t}",
"public void setPIN (String PIN);",
"public boolean getPinning(LocalFileSystem localFS, Path path) throws\n IOException {\n boolean stickyBit =\n localFS.getFileStatus(path).getPermission().getStickyBit();\n return stickyBit;\n }",
"public boolean setRememberMe()\n {\n try \n {\n File file = new File(System.getProperty(\"user.home\")+\"\\\\remember.ser\");\n FileOutputStream fout = new FileOutputStream(file);\n fout.write(1);\n fout.close();\n }\n catch (IOException ex) {ex.printStackTrace(); return false; }\n return true;\n }",
"public void pin() {\n this.pin = new Vec(this.pos);\n }",
"public void setFlag(int which) {\n setFlag(which, true);\n }",
"public void rewritingHashedFile(File path) throws IOException {\n\t\tFileInputStream fis = new FileInputStream(path);\n\t\tbyte[] inputBytes = new byte[fis.available() - 64];\n\t\tfis.read(inputBytes);\n\t\tfis.close();\n\t\t\n\t\tFileOutputStream fos = new FileOutputStream(path);\n\t\tfos.write(inputBytes);\n\t\tfos.close();\n\t}",
"private void resetPattenIfNeeded() {\n if (KeyguardCfg.isBackupPinEnabled() && getSecurityMode() == SecurityMode.PIN && this.mLockPatternUtils.isLockPatternEnabled(KeyguardUpdateMonitor.getCurrentUser())) {\n Intent ai = new Intent(\"com.android.settings.action.HW_RESET_NEW_PASSWORD\");\n ai.setFlags(268435456);\n OsUtils.startUserActivity(this.mContext, ai);\n }\n }",
"public void setFlag(short flag) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeShort(__io__address + 6, flag);\n\t\t} else {\n\t\t\t__io__block.writeShort(__io__address + 6, flag);\n\t\t}\n\t}",
"public void changeSetting(Material setting) {\n File file = new File(fileName);\n YamlConfiguration fileConfig = YamlConfiguration.loadConfiguration(file);\n for (ProtectionFlag pflag : flags) {\n if (pflag.getMaterialIcon() == setting) {\n pflag.toggleFlagValue();\n fileConfig.set(pflag.getFlagName(), pflag.getFlagValue());\n }\n }\n\n try {\n fileConfig.save(file);\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"public void setTap(String pathname) throws IOException {\n if (null != _tapStreamOut) {\n FileOutputStream closingStream = _tapStreamOut;\n _tapStreamOut = null;\n closingStream.close();\n }\n if (null != _tapStreamIn) {\n FileOutputStream closingStream = _tapStreamIn;\n _tapStreamIn = null;\n closingStream.close();\n }\n if (pathname != null && pathname.length() > 0) {\n _tapStreamOut = new FileOutputStream(new File(pathname + \"_out\"));\n _tapStreamIn = new FileOutputStream(new File(pathname + \"_in\"));\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.INFO)) Log.info(Log.FAC_NETMANAGER, formatMessage(\"Tap writing to {0}\"), pathname);\n }\n }",
"public void setActive(boolean b)\r\n\t //@ requires File(?fid, _, ?info);\r\n\t //@ ensures File(fid, b, info);\r\n\t{\r\n\t\t////@ open File(fid, _, info); // auto\r\n\t\t////@ open MasterFile(fid, ?d0, _, ?d1, ?info2); // auto\r\n\t\t////@ open this.DedicatedFile(DedicatedFile.class)(fid, null, _, d1, ?info3); // auto\r\n\t\t////@ open this.File(File.class)(fid, _, ?info4); // auto\r\n\t\tactive = b;\r\n\t\t////@ close this.File(File.class)(fid, b, info4); // auto\r\n\t\t////@ close this.DedicatedFile(DedicatedFile.class)(fid, null, b, d1, info3); // auto\r\n\t\t////@ close MasterFile(fid, null, b, d1, info2); // auto\r\n\t\t////@ close File(fid, b, info); // auto\r\n\t}",
"public void setIsFileLocked(boolean isFileLocked) {\n this.isFileLocked = isFileLocked;\n }",
"public void setPin(java.lang.String pin) {\r\n this.pin = pin;\r\n }",
"protected void setFlag(int x, int y) {\r\n \r\n if (!flag[x][y]) {\r\n \t//System.out.println(\"Auto flag set at (\" + x + \",\" + y + \")\");\r\n \tflag[x][y] = true;\r\n flagsPlaced++;\r\n }\r\n\r\n }",
"synchronized ExerciseBuffer pinNew(String filename, PageFormatter fmtr) {\n\t ExerciseBuffer buff = chooseUnpinnedBuffer();\n if (buff == null)\n return null;\n Block blk=buff.assignToNew(filename, fmtr); // return the newly created block\n numAvailable--;\n buff.pin();\n \n if(bufferHashTable.containsValue(buff)){ //if value (buffer) is already exist then remove that key (blk) \n bufferHashTable.remove(blk); \n \n }\n bufferHashTable.put(blk, buff); // adding new key (blk) to HashTable\n \n return buff;\n }",
"void lockInode(Inode inode, LockMode mode);",
"public native int cGPIOWrite(int pin, boolean value);",
"public void set(String path) throws FileNotFoundException {\n counterSeveralLines = linesAfter;\n arrayPreviousLines = new String[prevSize];\n currentPath = path;\n fileReader = new FileReader(currentPath);\n bufferReader = new BufferedReader(fileReader);\n resetDateBefore();\n }",
"public void initPin(PIN_DIRECTION direction, ARTIK_PINS pin) throws IOException {\n System.out.println(\"init pin:\" + pin);\n assertPinNotExported(pin);\n echoToPath(BASE_PIN_EXPORT_PATH, getPinNumber(pin));\n changePinDirection(pin, direction);\n //setting direction by writing to /sys/class/gpio/PIN_NUMBER/direction {in,out}\n\n }",
"public void setSystemPath(String path) {\r\n\t\ttry {\r\n\t\t\tPaths.get(path);\r\n\t\t} catch (InvalidPathException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\tthis.settings.setProperty(\"systemPath\", path);\r\n\t\tthis.saveChanges();\r\n\t}",
"public void setFlag(int which, boolean value) {\n if (value) {\n flags |= (1 << which); // set flag\n } else {\n flags &= ~(1 << which); // clear flag\n }\n }",
"@Override\n\tpublic void setValue(String path, boolean value) {\n\t\tsetValue(path, new Boolean(value));\n\t}",
"synchronized void setOneshot( boolean value )\n {\n _cyclicTimer = ! value;\n }",
"public static void randomAccessWrite() {\n try {\n RandomAccessFile f = new RandomAccessFile(FILES_TEST_PATH, \"rw\");\n f.writeInt(10);\n f.writeChars(\"test line\");\n f.close();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }",
"public void setActive(boolean b)\r\n\t //@ requires File(?fid, _, ?info);\r\n\t //@ ensures File(fid, b, info);\r\n\t{\r\n\t\t////@ open File(fid, _, info); // auto\r\n\t\t////@ open DedicatedFile(fid, ?d1, _, ?siblist, ?info2); // auto\r\n\t\tFile thiz = this;\r\n\t\t////@ open thiz.File(fid, _, ?info3); // auto\r\n\t\tactive = b;\r\n\t\t////@ close thiz.File(fid, b, info3); // auto\r\n\t\t////@ close DedicatedFile(fid, d1, b, siblist, info2); // auto\r\n\t\t////@ close File(fid, b, info); // auto\r\n\t}",
"public void testSetNewPINWithPUK() {\r\n byte old = pinCode[0];\r\n byte[] modifiedPin = pinCode;\r\n\r\n /*\r\n * Change Pin\r\n */\r\n modifiedPin[0] ^= 0xFF;\r\n try {\r\n tokenHandler.loginPUK(pukCode);\r\n tokenHandler.setPIN(modifiedPin);\r\n tokenHandler.logoutPUK();\r\n } catch (Exception e) {\r\n fail(e.toString());\r\n }\r\n\r\n /*\r\n * Test new Pin\r\n */\r\n try {\r\n tokenHandler.loginPIN(modifiedPin);\r\n tokenHandler.logoutPIN();\r\n } catch (Exception e) {\r\n fail(e.toString());\r\n }\r\n\r\n /*\r\n * Restore old PIN and restore login status\r\n */\r\n pinCode[0] = old;\r\n try {\r\n\r\n tokenHandler.loginPUK(pukCode);\r\n tokenHandler.setPIN(modifiedPin);\r\n tokenHandler.logoutPUK();\r\n } catch (Exception e) {\r\n fail(e.toString());\r\n }\r\n\r\n /*\r\n * Test Old Pin\r\n */\r\n try {\r\n tokenHandler.loginPIN(modifiedPin);\r\n tokenHandler.logoutPIN();\r\n } catch (Exception e) {\r\n fail(e.toString());\r\n }\r\n }",
"void setBinaryFileAttribute(boolean flag);",
"public void setReadWriteOnMyLatestView()\n {\n \t m_acl = \tm_acl | (1<<2);\n }",
"void unlockWrite(long stamp);",
"void setUserLocked(boolean b);",
"public void setStickySessionPath(String stickySessionPath) {\n if (stickySessionPath != null && stickySessionPath.length() > 30) {\n this.stickySessionPath = stickySessionPath.substring(0, 30);\n } else {\n this.stickySessionPath = stickySessionPath;\n }\n }",
"public void setSystem(byte system) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 4, system);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 4, system);\n\t\t}\n\t}",
"public void setBit(int pos, int bit) {\r\n\t\tflagBits[pos] = bit;\r\n\t}",
"public void setActive(boolean b)\r\n\t //@ requires File(?fid, _, ?info);\r\n\t //@ ensures File(fid, b, info);\r\n\t{\r\n\t\t////@ open File(fid, _, info); // auto\r\n\t\t////@ open ElementaryFile(fid, _, _, _, _, ?info2); // auto\r\n\t\tsuper.setActive(b);\r\n\t\t////@ close ElementaryFile(fid, _, _, _, _, info2); // auto\r\n\t\t////@ close File(fid, _, info); // auto\r\n\t}",
"@Override\n public int getPinState(){\n return 0;\n }",
"public static void noOverwrite() {\n\t\tdefaultOverwriteMode = NO_OVERWRITE;\n\t}",
"@Override\n\tpublic void setNodeInfo(String path, Object obj) {\n\t\treentrantReadWriteLock.readLock().lock();\n\t\ttry {\n\t\t\tzookeeper.setData(path, SomeUtil.getByte(obj),\n\t\t\t\t\t-1);\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"更新跟节点数据异常!\", e);\n\t\t} finally {\n\t\t\treentrantReadWriteLock.readLock().unlock();\n\t\t}\n\t}",
"private static void j_lock() {\r\n\t\tdo {\r\n\t\t\tLOCK_FILES_DIR.mkdirs();\r\n\t\t\ttry {\r\n\t\t\t\tRandomAccessFile raf = new RandomAccessFile(GLOBAL_LOCK_FILE,\r\n\t\t\t\t\t\t\"rw\");\r\n\t\t\t\tFileChannel channel = raf.getChannel();\r\n\t\t\t\tFileLock lock = channel.lock();\r\n\t\t\t\tglobalFileChannel = channel;\r\n\t\t\t\tglobalFileLock = lock;\r\n\t\t\t\tbreak;\r\n\t\t\t} catch (Throwable t) {\r\n\t\t\t\t;\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t}",
"public void SetRingbackFile(String filename){\n FunctionLogger logger=new FunctionLogger(\"SetRingbackFile\",this,myLogger);\n logger.args(filename);\n \n RingbackFile = filename;\n }",
"public void setOffset(int offset) {\r\n currOffset = offset;\r\n try {\r\n file.seek(offset);\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"void setNode(String path, Node node)\n throws ProcessingException;",
"void setFilePath(Path filePath);",
"private void switchOnFlag(int flag) {\r\n\t\tsim40.memory[Simulator.STATUS_ADDRESS]|= (1<<flag);\r\n\t}",
"public synchronized static void setInsideSecureLocation(boolean flag){\n editor.putBoolean(IN_REGION, flag);\n editor.commit();\n }",
"public static boolean setSparseZeros(final File file, final long position, final long length) throws IOException {\r\n\t\tcom.sun.jna.platform.win32.Kernel32 k32 = com.sun.jna.platform.win32.Kernel32.INSTANCE;\r\n\r\n\t\tHANDLE hFile = null;\r\n\t\thFile = k32.CreateFile(file.getCanonicalPath(), WinNT.GENERIC_ALL, WinNT.FILE_SHARE_WRITE\r\n\t\t\t\t| WinNT.FILE_SHARE_READ,\r\n\t\t\t\tnew WinBase.SECURITY_ATTRIBUTES(), WinNT.OPEN_EXISTING, WinNT.FILE_ATTRIBUTE_NORMAL,\r\n\t\t\t\tnew HANDLEByReference().getValue());\r\n\r\n\t\tif (WinBase.INVALID_HANDLE_VALUE.equals(hFile)) {\r\n\t\t\tthrow Warden.spot(new IOException(\"failed to open \" + file, new Win32Exception(\r\n\t\t\t\t\tcom.sun.jna.platform.win32.Kernel32.INSTANCE.GetLastError())));\r\n\t\t}\r\n\t\tThrowable excep = null;\r\n\t\ttry {\r\n\t\t\t// Buffer buffer = ByteBuffer.wrap(new byte[100]);\r\n\t\t\t// IntByReference bytesRead = new IntByReference();\r\n\t\t\t// boolean r = k32.ReadFile(hFile, buffer, 10, bytesRead, null);\r\n\t\t\t// System.out.println(r + \": \" + Elements.toString(buffer.array()));\r\n\r\n\t\t\tIntByReference dwTemp = new IntByReference();\r\n\t\t\t// ::DeviceIoControl(hFile, FSCTL_SET_SPARSE, NULL, 0, NULL, 0, &dwTemp, NULL);\r\n\t\t\tboolean res = k32.DeviceIoControl(hFile, FSCTL_SET_SPARSE, null, 0, null, 0, dwTemp, null);\r\n\t\t\tif (!res) {\r\n\t\t\t\tthrow new Win32Exception(com.sun.jna.platform.win32.Kernel32.INSTANCE.GetLastError());\r\n\t\t\t}\r\n\r\n\t\t\tFILE_ZERO_DATA_INFORMATION fzdi = new FILE_ZERO_DATA_INFORMATION();\r\n\t\t\tfzdi.FileOffset = position;\r\n\t\t\tfzdi.BeyondFinalZero = position + length;\r\n\t\t\tfzdi.write();\r\n\t\t\t// ::DeviceIoControl(hFile, FSCTL_SET_ZERO_DATA, &fzdi, sizeof(fzdi), NULL, 0, &dwTemp, NULL);\r\n\t\t\tres = k32\r\n\t\t\t\t\t.DeviceIoControl(hFile, FSCTL_SET_ZERO_DATA, fzdi.getPointer(), fzdi.size(), null, 0, dwTemp, null);\r\n\t\t\tif (!res) {\r\n\t\t\t\tthrow new Win32Exception(com.sun.jna.platform.win32.Kernel32.INSTANCE.GetLastError());\r\n\t\t\t}\r\n\r\n\t\t\t// buffer.clear();\r\n\t\t\t// r = k32.ReadFile(hFile, buffer, 10, bytesRead, null);\r\n\t\t\t// System.out.println(r + \": \" + Elements.toString(buffer.array()));\r\n\r\n\t\t\treturn true;\r\n\t\t} catch (Win32Exception e) {\r\n\t\t\texcep = e;\r\n\t\t\tthrow e;\r\n\t\t} finally {\r\n\t\t\tif (hFile != null) {\r\n\t\t\t\tif (!com.sun.jna.platform.win32.Kernel32.INSTANCE.CloseHandle(hFile)) {\r\n\t\t\t\t\tif (excep != null) {\r\n\t\t\t\t\t\tthrow (Win32Exception) new Win32Exception(\r\n\t\t\t\t\t\t\t\tcom.sun.jna.platform.win32.Kernel32.INSTANCE.GetLastError()).initCause(excep);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthrow new Win32Exception(com.sun.jna.platform.win32.Kernel32.INSTANCE.GetLastError());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setShared(CPointer<Object> shared) throws IOException\n\t{\n\t\tlong __address = ((shared == null) ? 0 : shared.getAddress());\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeLong(__io__address + 80, __address);\n\t\t} else {\n\t\t\t__io__block.writeLong(__io__address + 80, __address);\n\t\t}\n\t}",
"public void setPIN(String PIN) {\n this.PIN = PIN;\n }",
"void setValueLocked(boolean valueLocked);",
"public void setPath(String newPath) {\n String id = PREF_DEFAULTDIR + getId();\n idv.getStateManager().writePreference(id, newPath);\n }",
"public static void overwrite() {\n\t\tdefaultOverwriteMode = OVERWRITE;\n\t}",
"protected void setFlag() {\n flag = flagVal;\n }",
"protected void setFlag() {\n flag = flagVal;\n }",
"public void setSoft(boolean soft);",
"private void allowWalletFileAccess() {\n if (Constants.TEST) {\n Io.chmod(walletFile, 0777);\n }\n\n }",
"public void setStick(Boolean stick) {\n this.stick = stick;\n }",
"public void SetInputPins(int pins) throws IOException {\n byte value = mDevice.readRegByte( IODIR );\n mDevice.writeRegByte( IODIR, (byte)(value | pins));\n }",
"@SuppressWarnings(\"deprecation\")\n\tprivate void setEnablePipFlagIndex(int enablePipFlagIndex) {\n\t\tSharedPreferences.Editor editor = getSharedPreferences(\"temp_sms\",\n\t\t\t\tMODE_WORLD_WRITEABLE).edit();\n\t\teditor.putString(\"sms_content\", String.valueOf(enablePipFlagIndex));\n\t\teditor.commit();\n\t}",
"Pin createPin();",
"void setModBookFilePath(Path modBookFilePath);",
"public void setSAVETRIP(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"TRIP\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"SAVETRIP\", value);\n\t\teditor.commit();\n\t}",
"public void setShifterLocked(boolean isLocked) {\n isShifterLocked = isLocked;\n }",
"private void setSeen(boolean value)\n\t{\n\t\tfor (int x = 0; x < width; x++)\n\t\t{\n\t\t\tfor (int y = 0; y < height; y++)\n\t\t\t{\n\t\t\t\ttiles[x][y].setSeen(value);\n\t\t\t}\n\t\t}\t\t\t\t\n\t}",
"synchronized ExerciseBuffer pin(Block blk) {\n\t ExerciseBuffer buff = findExistingBuffer(blk);\n if (buff == null) {\n buff = chooseUnpinnedBuffer();\n if (buff == null)\n return null;\n buff.assignToBlock(blk);\n \n \n }\n if (!buff.isPinned()) numAvailable--;\n \n buff.pin(); // \n \n if(bufferHashTable.containsValue(buff)){ //if value (buffer) is already exist then remove that old key (blk) \n bufferHashTable.remove(blk); \n \n }\n bufferHashTable.put(blk, buff); // adding new key (blk) to HashTable\n \n \n return buff;\n }",
"void setManageMeFilePath(Path manageMeFilePath);",
"public void setDefaultLocked(boolean systemLocked)\n\t{\n\t\tthis.defaultLocked = systemLocked;\n\t}",
"public void set()\n\t{\n\t\tbitHolder.setValue(1);\n\t}",
"private void markBitmap(int frameNo){\n int bit = frameNo/32;\n int mask = frameNo%32;\n bitMap[bit] = bitMap[bit]|MASK[mask];\n }",
"void setBit(int index, int value);",
"void setPath(DrivePath path);",
"void setRawOffset(int rawOffset);",
"void setPath(String path);",
"public void setFilebase(final Address address) throws CouldntSaveDataException {\n try {\n m_module.getConfiguration().setFileBase(new CAddress(address.toLong()));\n } catch (final com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException e) {\n throw new CouldntSaveDataException(e);\n }\n }",
"void setLastWriteTime(String path, long newTime) throws IOException;",
"void setBit(int index, boolean value);",
"public void setCriticalPath(){\n this.criticalPath = true;\n }",
"private void setDirty(boolean flag) {\n\tdirty = flag;\n\tmain.bSave.setEnabled(dirty);\n }",
"private void setPrefAddress( String addr ) {\n\t\tmPreferences.edit().putString( PREF_ADDR, addr ).commit();\n\t}",
"private static void setPermission(Path path) throws JulongChainException {\n if(System.getProperty(SYSTEM_PROP_OS).contains(SYSTEM_PROP_VALUE_WINDOWS)) {\n return;\n }\n\n Set<PosixFilePermission> filePermissions = new HashSet<>();\n filePermissions.add(PosixFilePermission.OWNER_READ);\n filePermissions.add(PosixFilePermission.OWNER_WRITE);\n filePermissions.add(PosixFilePermission.OWNER_EXECUTE);\n filePermissions.add(PosixFilePermission.GROUP_READ);\n filePermissions.add(PosixFilePermission.GROUP_EXECUTE);\n filePermissions.add(PosixFilePermission.OTHERS_READ);\n filePermissions.add(PosixFilePermission.OTHERS_EXECUTE);\n try {\n Files.setPosixFilePermissions(path, filePermissions);\n } catch (IOException e) {\n throw new JulongChainException(\"set directory\" + path + \" permission failed \" + e.getMessage());\n }\n }",
"public abstract boolean sjekkPIN(int pin);",
"public void pinPage(FrameDesc fdesc) {\n fdesc.state = PINNED;\n }",
"@Override\r\n public void storePin() {\n DataStoreGP1 data = (DataStoreGP1) ds;\r\n data.pin = data.temp_p;\r\n System.out.println(\"Pin has been saved successfully..\");\r\n }",
"void setLastAccessTime(String path, long newTime) throws IOException;",
"public void mountObb(String rawPath, String canonicalPath, String key,\n IObbActionListener token, int nonce) throws RemoteException;",
"void setCreationTime(String path, long newTime) throws IOException;",
"public static void writeBoolean(Context context, String fileName, String key, boolean value) {\n if (context == null)\n return;\n SharedPreferences sharedPreferences = context.getSharedPreferences(fileName, Context.MODE_PRIVATE);\n Editor editor = sharedPreferences.edit();\n editor.putBoolean(key, value);\n editor.apply();\n }",
"public void setGPIO(String name, Boolean value) {\n\n Gpio_Set_Request request = Gpio_Set_Request.newBuilder().setName(name).setRequestedState(value).build();\n\n Gpio_Set_Reply response;\n \n try {\n \tresponse = blockingStub.gpioSet(request);\n } catch (StatusRuntimeException e) {\n logger.log(Level.WARNING, \"RPC failed \" + e.getStatus().getDescription() + \" \" + e.getMessage());\n\n // Get the description\n JsonParser parser = new JsonParser();\n JsonObject jsonDescription = parser.parse(e.getStatus().getDescription()).getAsJsonObject();\n \n //Convert to int and string\n int errorCode = jsonDescription.get(\"errorCode\").getAsInt();\n String errorMessage = jsonDescription.get(\"errorMessage\").getAsString();\n \n System.out.println(Integer.toString(errorCode) + \" : \" + errorMessage);\n return;\n }\n }",
"public void setTripStrated(boolean value) {\n\t\tLog.i(TAG, \"*************************************\");\n\t\tLog.i(TAG, \"Setting trip status to \" + value);\n\t\tLog.i(TAG, \"*************************************\");\n\n\t\tsharedPreferences = context.getSharedPreferences(\"TRIP\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"isTripStarted\", value);\n\t\teditor.commit();\n\t}",
"private void setPatch(long value) {\n bitField0_ |= 0x00000008;\n patch_ = value;\n }",
"public void setisTripSaving(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"TRIP\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"isTripSaving\", value);\n\t\teditor.commit();\n\t}",
"public void setFlag( KerberosFlag flag )\n {\n int pos = MAX_SIZE - 1 - flag.getOrdinal();\n value |= 1 << pos;\n }"
]
| [
"0.61370087",
"0.58878374",
"0.57707787",
"0.5641576",
"0.56354415",
"0.5520435",
"0.5505602",
"0.5505602",
"0.5402066",
"0.5354317",
"0.5246318",
"0.5237789",
"0.51975054",
"0.5118124",
"0.51145416",
"0.50937974",
"0.50880826",
"0.50876975",
"0.50757074",
"0.50673276",
"0.50625396",
"0.50500005",
"0.5046508",
"0.5039924",
"0.5028065",
"0.49860847",
"0.49856603",
"0.49812496",
"0.49592248",
"0.49371198",
"0.49191272",
"0.49009603",
"0.48939273",
"0.48899975",
"0.48812371",
"0.48812228",
"0.4819097",
"0.48176017",
"0.48136953",
"0.4783001",
"0.47815922",
"0.47694263",
"0.4767102",
"0.4749705",
"0.47356692",
"0.4731201",
"0.47259367",
"0.47232136",
"0.4716793",
"0.47146058",
"0.47020516",
"0.46998885",
"0.4685586",
"0.46817043",
"0.4681586",
"0.46741673",
"0.46678504",
"0.46653515",
"0.46583542",
"0.46526122",
"0.4650285",
"0.4650285",
"0.46472847",
"0.46460173",
"0.46344244",
"0.4633862",
"0.46271086",
"0.46268287",
"0.46259767",
"0.46243045",
"0.46108812",
"0.46063307",
"0.46050006",
"0.4604077",
"0.4603523",
"0.4602037",
"0.45967084",
"0.45956632",
"0.4591805",
"0.45913574",
"0.45887843",
"0.45865995",
"0.45861247",
"0.45830542",
"0.4582377",
"0.4573434",
"0.45731023",
"0.4567416",
"0.4563732",
"0.45625576",
"0.45621824",
"0.45610684",
"0.45590186",
"0.4557919",
"0.4549434",
"0.45450902",
"0.45438582",
"0.4542337",
"0.45319012",
"0.4524046"
]
| 0.58282095 | 2 |
Sync the parent directory changes to durable device. | public void fsyncDirectory() throws IOException {
File dir = getDir();
try {
getFileIoProvider().dirSync(getVolume(), getDir());
} catch (IOException e) {
throw new IOException("Failed to sync " + dir, e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void sync() \n\t{\n\t\tFileTableEntry ftEntry = open(\"/\", \"w\");\t\t//read directory from disk\n\t\tbyte[] buffer = directory.directory2bytes();\n\t\twrite(ftEntry, buffer);\n\t\tclose(ftEntry);\n\t\tsuperblock.sync();\t\t\t\t\t//write superblock back to disk\n\t}",
"@Test\r\n public void moveToDirWithSameName() {\r\n Dir sameName = new Dir(\"child\", \"/\");\r\n currentDirectory.addNewDirectory(sameName);\r\n command.executeCommand(\"/parent/child/\", \"/\", root, currentDirectory);\r\n currentDirectory = currentDirectory.getSubDirectoryByName(\"child\");\r\n // check child directory with file is in root\r\n assertTrue(currentDirectory.getFileByName(\"file\") != null);\r\n }",
"@Test\r\n public void moveChildToParent() {\r\n command.executeCommand(\"/parent/child/\", \"/\", root, currentDirectory);\r\n assertTrue(root.getDirectoryByAbsolutePath(\"/child\") != null);\r\n }",
"public void sync() throws KeeperException, InterruptedException {\n members = zk.getChildren(thisPrefix, groupWatcher, null); // also reset the watcher\n }",
"@Test\n public void parent() throws Throwable {\n client.setStream(\"//Ace/subDev\");\n client.update();\n client.sync(makeFileSpecList(\"//...\"), null);\n\n MergeFilesOptions opts = new MergeFilesOptions();\n opts.setStream(\"//Ace/subDev\");\n opts.setReverseMapping(true);\n opts.setParentStream(\"//Ace/main\");\n\n List<IFileSpec> merged = client.mergeFiles(null, null, opts);\n assertEquals(\"wrong number of files\", 2, merged.size());\n\n List<IFileSpec> opened = client.openedFiles(null, null);\n assertEquals(\"files should not have been opened\", 2, opened.size());\n }",
"@Test\n public void overlappingSync() throws RepositoryException, PersistenceException {\n ResourceBuilder builder = context.build().withIntermediatePrimaryType(TYPE_UNSTRUCTURED);\n ResourceBuilder fromBuilder = builder.resource(\"/s/from\", PROP_PRIMARY_TYPE, TYPE_UNSTRUCTURED, \"attrroot\", \"rootval\");\n Resource toResource = fromBuilder.resource(\"a\", PROP_PRIMARY_TYPE, TYPE_UNSTRUCTURED).getCurrentParent();\n fromBuilder.resource(\"b\", PROP_PRIMARY_TYPE, TYPE_UNSTRUCTURED, \"attrb\", \"valb\");\n builder.commit();\n\n // JcrTestUtils.printResourceRecursivelyAsJson(context.resourceResolver().getResource(\"/s\"));\n syncronizer.update(fromBuilder.getCurrentParent(), toResource);\n toResource.getResourceResolver().adaptTo(Session.class).save();\n // JcrTestUtils.printResourceRecursivelyAsJson(context.resourceResolver().getResource(\"/s\"));\n\n assertEquals(\"rootval\", ResourceHandle.use(toResource).getProperty(\"attrroot\"));\n assertEquals(\"valb\", ResourceHandle.use(toResource).getProperty(\"b/attrb\"));\n // no infinite recursion:\n assertNull(ResourceHandle.use(toResource).getChild(\"a/a\"));\n // from/a/a exists, but that's a bit hard to prevent and\n }",
"public void sync() {\n\t\tif (!validState) {\n\t\t\tthrow new InvalidStateException();\n\t\t}\n\t\tif (useMmap) {\n\t\t\tsyncAllMmaps();\n\t\t}\n\t\tif (fileChannel != null) {\n\t\t\ttry {\n\t\t\t\tfileChannel.force(false);\n\t\t\t} catch (Exception ign) {\n\t\t\t}\n\t\t}\n\t\tif (callback != null) {\n\t\t\tcallback.synched();\n\t\t}\n\t}",
"public void updateDatabaseRefBackwards() {\n // we want to do this twice, since we go from children attribute to folder\n // and then folder to actual parent dir\n myRef = myRef.getParent().getParent();\n }",
"public void syncDevice() {\n JCuda.cudaDeviceSynchronize();\n }",
"public void sync()\n {\n setAutoSync(false);\n // simply send sync command\n super.executionSync(Option.SYNC);\n }",
"private void invokeSync()\n \t{\n if (iDeviceList.size() == 0)\n {\n System.out.println(\"No devices found, so nothing to test\");\n return;\n }\n CpDevice device = iDeviceList.get(0);\n System.out.println(\"\\n\\nSync call to device \" + device.getUdn());\n \n CpProxyUpnpOrgConnectionManager1 connMgr = new CpProxyUpnpOrgConnectionManager1(device);\n try {\n GetProtocolInfo points = connMgr.syncGetProtocolInfo();\n System.out.println(\"source is \" + points.getSource() + \"\\nsink is \" + points.getSink());\n } catch (ProxyError pe) { }\n connMgr.dispose();\n \t}",
"public void sync()\n {\n byte[] blockData = new byte[Disk.blockSize];\n SysLib.int2bytes(totalBlocks, blockData, 0);\n SysLib.int2bytes(inodeBlocks, blockData, 4);\n SysLib.int2bytes(freeList, blockData, 8);\n SysLib.rawwrite(0, blockData);\n }",
"public void sync () throws java.io.SyncFailedException, ObjectStoreException\n {\n }",
"public void synced() {\n Preconditions.checkNotNull(state);\n state.setState(ENodeState.Synced);\n }",
"@Test(timeout = SWIFT_TEST_TIMEOUT)\n public void testRenameDirToSelf() throws Throwable {\n assumeRenameSupported();\n Path parentdir = path(\"/test/parentdir\");\n fs.mkdirs(parentdir);\n Path child = new Path(parentdir, \"child\");\n createFile(child);\n\n rename(parentdir, parentdir, false, true, true);\n //verify the child is still there\n assertIsFile(child);\n }",
"private TransferTaskParent doParentStepOne(TransferTaskParent parentTask) throws ServiceException, ForbiddenException\n {\n log.debug(\"***** Starting ParentStepOne ****\");\n log.debug(parentTask.toString());\n\n // Extract some values for convenience and clarity\n String taskTenant = parentTask.getTenantId();\n String taskUser = parentTask.getUsername();\n // Keep these Integer and not int. When type int the logger puts in commas which makes it harder to search the log.\n Integer parentId = parentTask.getId();\n Integer topTaskId = parentTask.getTaskId();\n UUID parentUuid = parentTask.getUuid();\n String tag = parentTask.getTag();\n\n // Update the top level task and then the parent task\n try\n {\n // Update top level task.\n TransferTask topTask = dao.getTransferTaskByID(topTaskId);\n if (topTask.getStartTime() == null)\n {\n log.trace(LibUtils.getMsg(\"FILES_TXFR_TASK_START\", taskTenant, taskUser, \"doParentStepOneA04\", topTask.getId(), parentId, parentUuid, tag));\n topTask.setStartTime(Instant.now());\n // Update status unless already in a terminal state (such as cancelled)\n if (!topTask.isTerminal()) topTask.setStatus(TransferTaskStatus.IN_PROGRESS);\n dao.updateTransferTask(topTask);\n }\n\n // If top task in terminal state then return\n if (topTask.isTerminal())\n {\n log.trace(LibUtils.getMsg(\"FILES_TXFR_TOP_TASK_TERM\", taskTenant, taskUser, \"doParentStepOneA03\", topTaskId, topTask.getStatus(), parentId, parentTask.getStatus(), parentUuid, tag));\n topTask.setEndTime(Instant.now());\n dao.updateTransferTask(topTask);\n return parentTask;\n }\n\n // Update parent task\n log.trace(LibUtils.getMsg(\"FILES_TXFR_PARENT_START\", taskTenant, taskUser, \"doParentStepOneA05\", parentId, parentUuid, tag));\n parentTask.setStartTime(Instant.now());\n // Update status unless already in a terminal state (such as cancelled)\n if (!parentTask.isTerminal()) parentTask.setStatus(TransferTaskStatus.IN_PROGRESS);\n parentTask = dao.updateTransferTaskParent(parentTask);\n\n // If already in a terminal state then set end time and return\n if (parentTask.isTerminal())\n {\n log.warn(LibUtils.getMsg(\"FILES_TXFR_PARENT_TERM\", taskTenant, taskUser, \"doParentStepOneA01\", topTaskId, parentId, parentTask.getStatus(), parentUuid, tag));\n parentTask.setEndTime(Instant.now());\n parentTask.setFinalMessage(LibUtils.getMsg(\"FILES_TXFR_PARENT_END_TERM\", tag, parentTask.getStatus()));\n parentTask = dao.updateTransferTaskParent(parentTask);\n return parentTask;\n }\n }\n catch (DAOException ex)\n {\n String msg = LibUtils.getMsg(\"FILES_TXFR_SVC_ERR1\", taskTenant, taskUser, \"doParentStepOneA06\",\n parentId, tag, parentUuid, ex.getMessage());\n log.error(msg, ex);\n throw new ServiceException(msg, ex);\n }\n\n // =======================================================================\n // Now for the main work of creating the child tasks and publishing them\n // =======================================================================\n // Create a ResourceRequestUser. Some library calls use this, mainly as convenient wrapper for logging identity info\n AuthenticatedUser aUser = new AuthenticatedUser(taskUser, taskTenant, TapisThreadContext.AccountType.user.name(),\n null, taskUser, taskTenant, null, null, null);\n ResourceRequestUser rUser = new ResourceRequestUser(aUser);\n\n // Process the source URI\n TransferURI srcUri = parentTask.getSourceURI();\n TransferURI dstUri = parentTask.getDestinationURI();\n TapisSystem srcSystem, dstSystem;\n IRemoteDataClient srcClient;\n String srcId = srcUri.getSystemId();\n String srcPath = srcUri.getPath();\n String dstId = dstUri.getSystemId();\n String srcSharedCtxGrantor = parentTask.getSrcSharedCtxGrantor();\n String dstSharedCtxGrantor = parentTask.getDestSharedCtxGrantor();\n String impersonationIdNull = null;\n\n try\n {\n // Handle tapis: and http/s: protocols separately\n if (srcUri.isTapisProtocol())\n {\n // Handle protocol tapis://\n // Destination must also be tapis protocol. Checked early on, but check again in case it slipped through.\n if (!dstUri.isTapisProtocol())\n {\n String msg = LibUtils.getMsg(\"FILES_TXFR_DST_NOTSUPPORTED\", srcUri, dstUri, tag);\n log.error(msg);\n throw new ServiceException(msg);\n }\n // Fetch systems, they are needed during child task creation. Also, this ensures they exist and are available\n srcSystem = LibUtils.getSystemIfEnabled(rUser, systemsCache, srcId, impersonationIdNull, srcSharedCtxGrantor);\n dstSystem = LibUtils.getSystemIfEnabled(rUser, systemsCache, dstId, impersonationIdNull, dstSharedCtxGrantor);\n boolean srcIsS3 = SystemTypeEnum.S3.equals(srcSystem.getSystemType());\n boolean srcIsGlobus = SystemTypeEnum.GLOBUS.equals(srcSystem.getSystemType());\n boolean dstIsS3 = SystemTypeEnum.S3.equals(dstSystem.getSystemType());\n\n // Establish client\n srcClient = remoteDataClientFactory.getRemoteDataClient(taskTenant, taskUser, srcSystem);\n\n // Check that src path exists. If not found it is an error.\n FileInfo fileInfo = srcClient.getFileInfo(srcPath, true);\n if (fileInfo == null)\n {\n String msg = LibUtils.getMsg(\"FILES_TXFR_SVC_SRCPATH_NOTFOUND\", taskTenant, taskUser, parentId, parentUuid, srcPath, tag);\n log.error(msg);\n throw new ServiceException(msg);\n }\n\n // Get a listing of all files to be transferred\n //TODO: Retries will break this, should delete anything in the DB if it is a retry?\n List<FileInfo> fileListing;\n // NOTE Treat all source system types the same. For S3 it will be all objects matching the srcPath as a prefix.\n log.trace(LibUtils.getMsg(\"FILES_TXFR_LSR1\", taskTenant, taskUser, \"doParentStepOneA07\", parentId, parentUuid, srcId, srcPath, tag));\n fileListing = fileOpsService.lsRecursive(srcClient, srcPath, false, FileOpsService.MAX_RECURSION);\n if (fileListing == null) fileListing = Collections.emptyList();\n log.trace(LibUtils.getMsg(\"FILES_TXFR_LSR2\", taskTenant, taskUser, \"doParentStepOneA08\", parentId, parentUuid, srcId, srcPath, fileListing.size(), tag));\n\n // If no items to transfer then no child tasks, so we are done.\n // In theory this should be very unlikely since we just checked that source path exists.\n // In practice, it could happen if source path is deleted around the same time.\n // Also, in practice it has happened due to listing improperly returning an empty list.\n // If we do not handle it here we can end up with tasks stuck in the IN_PROGRESS state.\n if (fileListing.isEmpty())\n {\n parentTask.setEndTime(Instant.now());\n parentTask.setStatus(TransferTaskStatus.COMPLETED);\n parentTask.setFinalMessage(LibUtils.getMsg(\"FILES_TXFR_PARENT_COMPLETE_NO_ITEMS\", srcId, srcPath, tag));\n parentTask = dao.updateTransferTaskParent(parentTask);\n return parentTask;\n }\n\n // Create child tasks for each file or object to be transferred.\n List<TransferTaskChild> children = new ArrayList<>();\n long totalBytes = 0;\n for (FileInfo f : fileListing)\n {\n log.trace(LibUtils.getMsg(\"FILES_TXFR_ADD_CHILD1\", taskTenant, taskUser, \"doParentStepOneA09\", parentId, parentUuid, f, tag));\n // If destination is of type S3 we skip directories\n if (dstIsS3 && f.isDir())\n {\n log.trace(LibUtils.getMsg(\"FILES_TXFR_SKIP_DIR\", taskTenant, taskUser, \"doParentStepOneA10\", parentId, parentUuid, srcId, srcPath, dstId, f.getPath(), tag));\n continue;\n }\n // Only include the bytes from entries that are not directories. Posix folders are --usually-- 4bytes but not always, so\n // it can make some weird totals that don't really make sense.\n if (!f.isDir()) totalBytes += f.getSize();\n TransferTaskChild child = new TransferTaskChild(parentTask, f, srcSystem);\n children.add(child);\n log.trace(LibUtils.getMsg(\"FILES_TXFR_ADD_CHILD2\", taskTenant, taskUser, \"doParentStepOneA11\", parentId, parentUuid, child, tag));\n }\n // Update parent task status and totalBytes to be transferred\n log.trace(LibUtils.getMsg(\"FILES_TXFR_PARENT_STAGE\", taskTenant, taskUser, \"doParentStepOneA12\", parentId, parentUuid, totalBytes, tag));\n parentTask.setTotalBytes(totalBytes);\n parentTask.setStatus(TransferTaskStatus.STAGED);\n parentTask = dao.updateTransferTaskParent(parentTask);\n dao.bulkInsertChildTasks(children);\n children = dao.getAllChildren(parentTask);\n transfersService.publishBulkChildMessages(children);\n }\n else\n {\n // Handle all non-tapis protocols. These are http:// and https://\n // Create a single child task and update parent task status\n TransferTaskChild task = new TransferTaskChild();\n task.setTag(tag);\n task.setSourceURI(parentTask.getSourceURI());\n task.setParentTaskId(parentId);\n task.setTaskId(topTaskId);\n task.setDestinationURI(parentTask.getDestinationURI());\n task.setStatus(TransferTaskStatus.ACCEPTED);\n task.setTenantId(parentTask.getTenantId());\n task.setUsername(parentTask.getUsername());\n task = dao.insertChildTask(task);\n transfersService.publishChildMessage(task);\n parentTask.setStatus(TransferTaskStatus.STAGED);\n parentTask = dao.updateTransferTaskParent(parentTask);\n }\n }\n catch (DAOException | TapisException | IOException e)\n {\n String msg = LibUtils.getMsg(\"FILES_TXFR_SVC_ERR1\", taskTenant, taskUser, \"doParentStepOneB\",\n parentId, tag, parentUuid, e.getMessage());\n log.error(msg, e);\n throw new ServiceException(msg, e);\n }\n return parentTask;\n }",
"public void initial_list_sync(){\n \tFile file = new File(sync_directory_conf);\n \tif(file.exists()){\n \t\tArrayList<String> sync_directory_list = new ArrayList<String>();\n sync_directory_list = read_from_file.readFromFile(sync_directory_conf);\n text_sync_directory_path.setText(sync_directory_list.get(0));\n \t}else{\n \t\treturn;\n \t}\n \t\t\n }",
"public void sync()\n\t{\n\t\tbyte[] buffer = new byte[Disk.blockSize];\n\n\t\t// Write the totalBlocks, totalInodes, and freeList.\n\t\tSysLib.int2bytes(totalBlocks, buffer, 0);\n\t\tSysLib.int2bytes(totalInodes, buffer, 4);\n\t\tSysLib.int2bytes(freeList, buffer, 8);\n\t\tSysLib.int2bytes(lastFreeBlock, buffer, 12);\n\n\t\t// Write the block back to disk.\n\t\tSysLib.rawwrite(0, buffer);\n\t}",
"public static void sync() {\n // write out superblock if updated\n // write out free list blocks if updated\n // write out inode blocks if updated\n // write out data blocks if updated\n\n // at present, all changes to inodes, data blocks, \n // and free list blocks\n // are written as they go, so this method does nothing.\n }",
"public void startSync() {\n mLogger.d(\"Starting silent sync\");\n startSync(new IMediaSyncListener() {\n @Override\n public void step() {\n\n }\n\n @Override\n public void onFinish(int total, int ok, int ko) {\n mLogger.d(\"Silent sync finished, killing the service\");\n SyncService.this.onDestroy();\n }\n });\n }",
"public void setParent(TaskFolder parent)\n {\n super.setParent(parent);\n if (parent != null) parent.addFolder(this);\n }",
"private void proceedAfterPermission() {\n new SDsync().execute();\n\n }",
"static void forceSync(DatasetGraphTDB dsg) {\n dsg.getTripleTable().getNodeTupleTable().getNodeTable().sync();\n dsg.getQuadTable().getNodeTupleTable().getNodeTable().sync();\n dsg.getQuadTable().getNodeTupleTable().getNodeTable().sync();\n dsg.getStoragePrefixes().getNodeTupleTable().getNodeTable().sync();\n // This is not enough -- modules check whether sync needed.\n dsg.sync();\n\n }",
"public void gotoParentDir() {\n boolean z;\n if (!isRootDir() && this.mCurrentDir != null && this.mBox.hasAuthenticated()) {\n String sb = new StringBuilder(getCurrentDirPath()).toString();\n if (sb.endsWith(File.separator)) {\n sb = sb.substring(0, sb.lastIndexOf(File.separator));\n }\n String substring = sb.substring(0, sb.lastIndexOf(File.separator) + 1);\n if (!substring.equals(getCurrentDirName())) {\n if (!substring.equals(File.separator) && substring.endsWith(File.separator)) {\n substring = substring.substring(0, substring.length() - 1);\n }\n BoxFileObject boxFileObject = null;\n if (this.mDirCached.containsKey(substring)) {\n boxFileObject = (BoxFileObject) this.mDirCached.get(substring);\n }\n if (boxFileObject == null) {\n z = this.mBox.asyncLoadDir(substring, this.mLoadFolderListener);\n } else {\n z = this.mBox.asyncLoadDir(boxFileObject, this.mLoadFolderListener);\n }\n if (z) {\n showWaitingDialog(this.mActivity.getString(C4538R.string.zm_msg_loading), this.mWaitingDialogCancelListener);\n }\n }\n }\n }",
"void setParentRemoteStorageContext( RemoteStorageContext parent );",
"private void populateNewChildDirectory(DirectoryEntry newEntry) {\n try (ClusterStream stream = new ClusterStream(fileSystem,\n FileAccess.Write,\n newEntry.getFirstCluster(),\n 0xffffffff)) {\n // First is the self-referencing entry...\n DirectoryEntry selfEntry = new DirectoryEntry(newEntry);\n selfEntry.setName(FileName.SelfEntryName);\n selfEntry.writeTo(stream);\n // Second is a clone of our self entry (i.e. parent) - though dates\n // are odd...\n DirectoryEntry parentEntry = new DirectoryEntry(getSelfEntry());\n parentEntry.setName(FileName.ParentEntryName);\n parentEntry.setCreationTime(newEntry.getCreationTime());\n parentEntry.setLastWriteTime(newEntry.getLastWriteTime());\n parentEntry.writeTo(stream);\n } catch (IOException e) {\n throw new dotnet4j.io.IOException(e);\n }\n }",
"@Override\n public void run() {\n updateTotalSizeOfFilesInDir(child);\n }",
"@Test\r\n public void moveToFileWithSameName() {\r\n currentDirectory.addNewFile(\"file\");\r\n Dir dirWithFile = currentDirectory.getSubDirectoryByName(\"child\");\r\n File fileWithContents = dirWithFile.getFileByName(\"file\");\r\n fileWithContents.setContent(\"content\");\r\n command.executeCommand(\"file\", \"child/file\", root, currentDirectory);\r\n File fileInRoot = currentDirectory.getFileByName(\"file\");\r\n // content in file in root is removed\r\n assertTrue(fileInRoot.getContents().equals(\"\"));\r\n }",
"public void updateCacheForParent(CanopyCrum childCrum, CanopyCrum parentCrum) {\n\tif (myCachedPath.hasMember(childCrum)) {\n\t\tmyCachedPath.store(parentCrum);\n\t\tif ((myCachedRoot) == childCrum) {\n\t\t\tmyCachedRoot = parentCrum;\n\t\t}\n\t}\n/*\nudanax-top.st:13149:CanopyCache methodsFor: 'operations'!\n{void} updateCache: childCrum {CanopyCrum} forParent: parentCrum {CanopyCrum} \n\t\"If the cache contains childCrum it must be made \n\tto contain childCrum's new parent: parentCrum. \n\tAlso update CachedRoot.\" \n\t(myCachedPath hasMember: childCrum) ifTrue: \n\t\t[myCachedPath store: parentCrum.\n\t\t (myCachedRoot basicCast: Heaper star) == childCrum \n\t\t\tifTrue: [myCachedRoot _ parentCrum]]!\n*/\n}",
"public static void sync() {\n\t\tUiApplication.getUiApplication().addFileSystemJournalListener(fileListener);\n\t\tnew Thread() {\n\t\t\tpublic void run() {\n\t\t\t\t// Find files sdcard\n\t\t\t\tif (ToolsBB.fsMounted(FILESYSTEM.SDCARD)) {\n\t\t\t\t\tlogger.debug(\"Finding files on sdcard\");\n\t\t\t\t\tfindFiles(sdcardDir);\n\t\t\t\t}\n\t\t\t\t// Find files on eMMC\n\t\t\t\tif (ToolsBB.fsMounted(FILESYSTEM.STORE)) {\n\t\t\t\t\tlogger.debug(\"Finding files on eMMC\");\n\t\t\t\t\tfindFiles(storeDir);\n\t\t\t\t}\n\n\t\t\t\t// Upload files to server\n\t\t\t\tFileLog.upload();\n\n\t\t\t}\n\t\t}.start();\n\t}",
"@Override\n\tpublic int updateParentInformation(Parent parent) {\n\t\treturn parentDao.updateParentInformation(parent);\n\t}",
"void updateAllParentsBelow();",
"@Override\n public void sync(){\n }",
"private Mono<TransferTaskParent> doErrorParentStepOne(AcknowledgableDelivery m, Throwable e, TransferTaskParent parent)\n {\n log.error(LibUtils.getMsg(\"FILES_TXFR_SVC_ERR7A\", parent.toString(), e));\n m.nack(false);\n\n // First update parent task, mark FAILED_OPT or FAILED\n if (parent.isOptional())\n parent.setStatus(TransferTaskStatus.FAILED_OPT);\n else\n parent.setStatus(TransferTaskStatus.FAILED);\n parent.setEndTime(Instant.now());\n parent.setErrorMessage(e.getMessage());\n parent.setFinalMessage(\"Failed - doErrorParentStepOne\");\n try\n {\n parent = dao.updateTransferTaskParent(parent);\n // This should really never happen, it means that the parent with that ID was not in the database.\n if (parent == null) return Mono.empty();\n\n // Now update the top level task\n TransferTask topTask = dao.getTransferTaskByID(parent.getTaskId());\n // This should also not happen, it means that the top task was not in the database.\n if (topTask == null) return Mono.empty();\n\n // If parent is optional we need to check to see if top task status should be updated\n // else parent is required so update top level task to FAILED\n if (parent.isOptional())\n {\n checkForComplete(topTask.getId());\n }\n else\n {\n topTask.setStatus(TransferTaskStatus.FAILED);\n topTask.setEndTime(Instant.now());\n topTask.setErrorMessage(e.getMessage());\n log.debug(LibUtils.getMsg(\"FILES_TXFR_SVC_ERR7C\", topTask.getId(), topTask.getTag(), topTask.getUuid(), parent.getId(), parent.getUuid()));\n dao.updateTransferTask(topTask);\n }\n }\n catch (DAOException ex)\n {\n log.error(LibUtils.getMsg(\"FILES_TXFR_SVC_ERR1\", parent.getTenantId(), parent.getUsername(),\n \"doParentErrorStepOne\", parent.getId(), parent.getTag(), parent.getUuid(), ex.getMessage()), ex);\n }\n return Mono.just(parent);\n }",
"@Test\n public void checkUuidIndexUpdatedOnMove() throws Exception {\n // create the node to move\n Node parent = adminSession.getNode(temp1Path);\n String childName = \"child\" + System.currentTimeMillis();\n Node child = parent.addNode(childName, \"sling:Folder\");\n child.addMixin(\"mix:referenceable\");\n adminSession.save();\n \n // verify the id and lookup by id and query works \n String id = child.getIdentifier();\n assertThat(adminSession.getNodeByIdentifier(id), notNullValue());\n verifyLookupByIdentifier(id);\n\n // move it\n adminSession.move(child.getPath(), temp2Path + childName);\n adminSession.save();\n \n // verify the id and lookup by id and query works \n verifyLookupByIdentifier(id);\n }",
"void sync() throws IOException;",
"public void sync(){\n byte[] block = new byte[512];\n SysLib.int2bytes(totalBlocks, block, 0);\n SysLib.int2bytes(totalInodes, block, 4);\n SysLib.int2bytes(freeList, block, 8);\n SysLib.rawwrite(0, block);\n }",
"public void doFullPush( File siteDir ) throws IOException{\n clearDirectories();\n makeRemoteDir( root );\n publish( siteDir, false, null );\n }",
"@Override\n\tpublic void sync() throws IOException {\n\t\t\n\t}",
"protected Directory getParent() {\n return parent;\n }",
"@Test\r\n public void test_UpdateParentsOfOuInStatusOpened() throws Exception {\r\n final Class<InvalidStatusException> ec = InvalidStatusException.class;\r\n final String createdNewParentXml = createSuccessfully(\"escidoc_ou_create.xml\");\r\n final String id = getObjidValue(createdNewParentXml);\r\n createOuHierarchie();\r\n open(this.ouTop1Id, getTheLastModificationParam(true, this.ouTop1Id, \"Opened organizational unit '\"\r\n + this.ouTop1Id + \"'.\"));\r\n open(this.ouChild1ParentId, getTheLastModificationParam(true, this.ouChild1ParentId,\r\n \"Opened organizational unit '\" + this.ouChild1ParentId + \"'.\"));\r\n\r\n final String createdXml = retrieve(this.ouChild1ParentId);\r\n Document createdDocument = getDocument(createdXml);\r\n substitute(createdDocument, XPATH_ORGANIZATIONAL_UNIT_PARENT_XLINK_HREF, \"/ir/organizational-unit/\" + id);\r\n String toBeUpdatedXml = toString(createdDocument, true);\r\n try {\r\n update(this.ouChild1ParentId, toBeUpdatedXml);\r\n\r\n failMissingException(\"No exception occured on update of parents of an OU \" + \"in status opened.\", ec);\r\n }\r\n catch (final Exception e) {\r\n assertExceptionType(ec, e);\r\n }\r\n }",
"public void start(){\n\t\tString h2FileName = \"./data/Emiregistry-parent\";\n\t\t // A File object to represent the filename\n\t File f = new File(h2FileName.substring(0, 6));\n\n\t // Make sure the file or directory exists and isn't write protected\n\t if (!f.exists()) {\n\t \tSystem.out.println(\"Delete: no such file or directory: \" + h2FileName.substring(0, 6));\n\t }\n\t\n\t // If it is a directory, make sure it is empty\n\t if (f.isDirectory()) {\n\t \tString[] files = f.list();\n\t \tif (files.length > 0) {\n\t \t\tSystem.out.println(\"Delete: directory not empty: \" + h2FileName.substring(0, 6));\n\t \t}\n\t \tfor (int i=0; i< files.length; i++){\n\t \t\t// Attempt to delete it\n\t \t\tif (f.listFiles()[i].canWrite() && f.listFiles()[i].toString().subSequence(0, 24).equals(h2FileName)) {\n\t\t \t\tSystem.out.println(\"deleted: \"+ f.listFiles()[i]);\n\t \t\t\tf.listFiles()[i].delete();\n\t \t\t}\n\t \t}\n\t }\n\t Properties c = getConfiguration(\"localhost\", 9001, \"localhost\",\n\t\t\t\t27017, \"emiregistry-parentdb\", false, null,\n\t\t\t\th2FileName); \n\t\t\n\t\tclient = new EMIRServer();\t\t\n\t\t\n\t\t\n\t\tclient. run(c);\n\t\tSystem.err.println(\"ParentServer started.\");\n\t}",
"private void transferDeviceOwnershipLocked(ComponentName admin, ComponentName target, int userId) {\n transferActiveAdminUncheckedLocked(target, admin, userId);\n mOwners.transferDeviceOwnership(target);\n Slogf.i(LOG_TAG, \"Device owner set: \" + target + \" on user \" + userId);\n mOwners.writeDeviceOwner();\n mDeviceAdminServiceController.startServiceForOwner(\n target.getPackageName(), userId, \"transfer-device-owner\");\n }",
"@Override\n public void updateWithReplica(StorageLocation replicaLocation) {\n File diskFile = null;\n try {\n diskFile = new File(replicaLocation.getUri());\n } catch (IllegalArgumentException e) {\n diskFile = null;\n }\n\n if (null == diskFile) {\n setDirInternal(null);\n } else {\n setDirInternal(diskFile.getParentFile());\n }\n }",
"public void syncStream() {\n JCudaDriver.cuStreamSynchronize(stream);}",
"public Device getDevice() {\n\t\treturn parentDevice;\n\t}",
"private void updateValue( DatabaseReference db, String parent, String child) {\r\n db.child(parent).addListenerForSingleValueEvent(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot snapshot) {\r\n if (snapshot.hasChild(child)) {\r\n db.child(parent).child(child).setValue((Long)(snapshot.child(child).getValue())+1);\r\n }\r\n else\r\n db.child(parent).child(child).setValue(1);\r\n }\r\n\r\n @Override\r\n public void onCancelled(@NonNull DatabaseError error) {\r\n\r\n }\r\n });\r\n }",
"@Override\n protected NodeInfo createDirectoryEntry(NodeInfo parentEntry, Path dir) throws IOException {\n return drive.createFolder(parentEntry.getId(), toFilenameString(dir));\n }",
"public void syncChannel() {\r\n\t\tarrChannels.clear(); // I want to make sure that there are no leftover data inside.\r\n\t\tfor(int i = 0; i < workChannels.size(); i++) {\r\n\t\t\tarrChannels.add(workChannels.get(i));\r\n\t\t}\r\n\t}",
"void submoduleSync() throws GitException, InterruptedException;",
"void changeDeploymentParentDeploymentId(String deploymentId, String newParentDeploymentId);",
"public DFS()\n {\n\n\n writeLock = lock.writeLock();\n readLock = lock.readLock();\n\n recoverINodes();\n\n createDir(\"/\"); // add a root if it does not exist .\n\n }",
"@Async\r\n void processEvents() {\r\n for (;;) {\r\n \r\n // wait for key to be signalled\r\n WatchKey key;\r\n try {\r\n key = watcher.take();\r\n } catch (InterruptedException x) {\r\n log.error(\"interrupted exception: \" + x);\r\n return;\r\n }\r\n\r\n FolderConfig config = keys.get(key);\r\n Path dir = Paths.get(config.getDirectory());\r\n \r\n if (dir == null) {\r\n \r\n continue;\r\n }\r\n\r\n for (WatchEvent<?> event : key.pollEvents()) {\r\n WatchEvent.Kind kind = event.kind();\r\n\r\n // TBD - provide example of how OVERFLOW event is handled\r\n if (kind == OVERFLOW) {\r\n continue;\r\n }\r\n if (kind == StandardWatchEventKinds.ENTRY_CREATE) {\r\n insertIntoSDE(config, event.context().toString());\r\n }\r\n\r\n }\r\n\r\n // reset key and remove from set if directory no longer accessible\r\n boolean valid = key.reset();\r\n if (!valid) {\r\n keys.remove(key);\r\n\r\n // all directories are inaccessible\r\n if (keys.isEmpty()) {\r\n break;\r\n }\r\n }\r\n }\r\n }",
"public void startWatchingExternalStorage() {\n\t updateExternalStorageState(Environment.getExternalStorageState());\n\t\tmExternalStorageReceiver = new BroadcastReceiver() {\n\t\t\t@Override\n\t\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\t String action = intent.getAction();\n\t\t\t\tupdateExternalStorageState(action);\n\t\t synchronized (mObservers) {\n\t\t for (SdcardObserver observer : mObservers)\n\t\t observer.onSdcardChanged();\n\t\t }\n\t\t\t}\n\t\t};\n\t\tIntentFilter filter = new IntentFilter();\n\t\tfilter.addAction(Intent.ACTION_MEDIA_MOUNTED);\n\t\tfilter.addAction(Intent.ACTION_MEDIA_UNMOUNTED);\n\t\tfilter.addDataScheme(\"file\");\n\t\tmApplicationContext.registerReceiver(mExternalStorageReceiver, filter);\n\t}",
"@Override\n\tpublic void sync() throws IOException\n\t{\n\n\t}",
"void syncGroup();",
"public DirectoryChanger(FileSystem<Directory> fileSystem) {\r\n super(false);\r\n this.fileSystem = fileSystem;\r\n this.path = new Path(fileSystem);\r\n }",
"@Test\r\n\tpublic void testRelativeDir() {\r\n\t\t// Expected return from Cd\r\n\t\texpectedCd = null;\r\n\t\t// Expected current working directory\r\n\t\texpectedPath = \"/users/skeshavaa\";\r\n\t\t// Actual return from Cd\r\n\t\tactualCd = cd.run(fs, \"users/skeshavaa\".split(\" \"), \"cd users/skeshavaa\", false);\r\n\t\t// Returns the current working directory\r\n\t\tactualPath = fs.getCurrentPath();\r\n\t\t// Checks if the values are equal or not\r\n\t\tassertTrue(actualCd == expectedCd && actualPath.equals(expectedPath));\r\n\t}",
"public final synchronized void setParent(final ICache<K, V, D> parent) {\n ICache<K, V, D> current = parent;\n while (current != null) {\n if (current == this)\n throw new IllegalArgumentException(\"Cycle detected, cannot set parent to \" + parent);\n current = current.getParent();\n }\n this.parent = parent;\n }",
"final public VFile moveTo(VDir parentDir) throws VlException\n {\n return (VFile)this.getTransferManager().doCopyMove(this,parentDir,null,true); \n //return (VFile)doCopyMoveTo(parentDir, null,true);\n }",
"Directory(Directory parent, long parentId) {\n fileSystem = parent.fileSystem;\n this.parent = parent;\n this.parentId = parentId;\n DirectoryEntry dirEntry = getParentsChildEntry();\n dirStream = new ClusterStream(fileSystem, FileAccess.ReadWrite, dirEntry.getFirstCluster(), 0xffffffff);\n loadEntries();\n }",
"public void childAccountsShouldUseParentTransferAccountSetting(){\n\t\tAccount transferAccount = new Account(\"New Transfer Acct\");\n\t\tmAccountsDbAdapter.addRecord(transferAccount);\n\t\tmAccountsDbAdapter.addRecord(new Account(\"Higher account\"));\n\n\t\tAccount childAccount = new Account(\"Child Account\");\n\t\tchildAccount.setParentUID(DUMMY_ACCOUNT_UID);\n\t\tmAccountsDbAdapter.addRecord(childAccount);\n\t\tContentValues contentValues = new ContentValues();\n\t\tcontentValues.put(DatabaseSchema.AccountEntry.COLUMN_DEFAULT_TRANSFER_ACCOUNT_UID, transferAccount.getUID());\n\t\tmAccountsDbAdapter.updateRecord(DUMMY_ACCOUNT_UID, contentValues);\n\n\t\tIntent intent = new Intent(mTransactionsActivity, TransactionsActivity.class);\n\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tintent.setAction(Intent.ACTION_INSERT_OR_EDIT);\n\t\tintent.putExtra(UxArgument.SELECTED_ACCOUNT_UID, childAccount.getUID());\n\n\t\tmTransactionsActivity.startActivity(intent);\n\n\t\tonView(withId(R.id.input_transaction_amount)).perform(typeText(\"1299\"));\n\t\tclickOnView(R.id.menu_save);\n\n\t\t//if our transfer account has a transaction then the right transfer account was used\n\t\tList<Transaction> transactions = mTransactionsDbAdapter.getAllTransactionsForAccount(transferAccount.getUID());\n\t\tassertThat(transactions).hasSize(1);\n\t}",
"@Override\n\t\t\tpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n\t\t\t\tPath resolve = target.resolve(source.relativize(dir));\n\t\t\t\tFile resolve_file = resolve.toFile();\n\n\t\t\t\tif (resolve_file.exists() == false) {\n\t\t\t\t\tFiles.createDirectory(resolve);\n\t\t\t\t} else {\n\t\t\t\t\t// delete old data in sub-directories\n\t\t\t\t\t// without deleting the directory\n\t\t\t\t\tArrays.asList(resolve_file.listFiles()).forEach(File::delete);\n\t\t\t\t}\n\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t}",
"public void syncOldStream() {\n ContextHolder.getInstance().setContext();\n JCuda.cudaStreamSynchronize(oldStream);\n/*\n if(!oldEventDestroyed) {\n JCuda.cudaStreamSynchronize(oldStream);\n JCuda.cudaStreamWaitEvent(oldStream,oldEvent,0);\n JCuda.cudaEventDestroy(oldEvent);\n oldEventDestroyed = true;\n\n }*/\n }",
"@Test(timeout = SWIFT_TEST_TIMEOUT)\n public void testRenameChildDirForbidden() throws Exception {\n assumeRenameSupported();\n\n Path parentdir = path(\"/test/parentdir\");\n fs.mkdirs(parentdir);\n Path childFile = new Path(parentdir, \"childfile\");\n createFile(childFile);\n //verify one level down\n Path childdir = new Path(parentdir, \"childdir\");\n rename(parentdir, childdir, false, true, false);\n //now another level\n fs.mkdirs(childdir);\n Path childchilddir = new Path(childdir, \"childdir\");\n rename(parentdir, childchilddir, false, true, false);\n }",
"@Test\n\tvoid synchGroups() {\n\t\tassumeWritable(c);\n\t\ttry (var u1 = c.update(GROUP_SYNC_MAKE_TEMP_TABLE)) {\n\t\t\tassertEquals(List.of(), u1.getParameters());\n\t\t\tc.transaction(() -> {\n\t\t\t\tu1.call();\n\t\t\t\ttry (var u2 = c.update(GROUP_SYNC_INSERT_TEMP_ROW);\n\t\t\t\t\t\tvar u3 = c.update(GROUP_SYNC_ADD_GROUPS);\n\t\t\t\t\t\tvar u4 = c.update(GROUP_SYNC_REMOVE_GROUPS);\n\t\t\t\t\t\tvar u5 = c.update(GROUP_SYNC_DROP_TEMP_TABLE)) {\n\t\t\t\t\tassertEquals(List.of(\"group_name\", \"group_type\"),\n\t\t\t\t\t\t\tu2.getParameters());\n\t\t\t\t\tassertEquals(0, u2.call(NO_NAME, INTERNAL));\n\t\t\t\t\tassertEquals(List.of(\"user_id\"), u3.getParameters());\n\t\t\t\t\tassertEquals(0, u3.call(NO_USER));\n\t\t\t\t\tassertEquals(List.of(\"user_id\"), u4.getParameters());\n\t\t\t\t\tassertEquals(0, u4.call(NO_USER));\n\t\t\t\t\tassertEquals(List.of(), u5.getParameters());\n\t\t\t\t\tu5.call();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}",
"@Override\r\n public void run() {\r\n \t// increases the internal producers counter of the queue by one.\r\n this.directory_queue.registerProducer();\r\n directory_queue.enqueue(this.root);\r\n try {\r\n \taddPath(this.root);\r\n } catch (IllegalArgumentException e) {\r\n \tSystem.err.println(e.toString());\r\n \t//e.printStackTrace();\r\n }\r\n // Unregisters a producer from the queue.\r\n this.directory_queue.unregisterProducer();\r\n }",
"public void mergeIntoParentCache(CacheKey unitOfWorkCacheKey, CacheKey parentSessionCacheKey){\r\n if (isStoredInCache() && unitOfWorkCacheKey != null && parentSessionCacheKey != null) {\r\n unitOfWorkCacheKey.setWriteLockValue(parentSessionCacheKey.getWriteLockValue());\r\n }\r\n }",
"public static void syncImmediately(Context context) {\n Bundle bundle = new Bundle();\n bundle.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);\n bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);\n ContentResolver.requestSync(getSyncAccount(context),\n context.getString(R.string.content_authority), bundle);\n }",
"@Test\n public void setupDeleteInShareUpdateInClient()\n {\n concurrentFolder = getRandomFolderIn(getLocalSiteLocation(), \"conFolder\");\n fileInFolder = getRandomFileIn(concurrentFolder,\"fileInFolder\",\"txt\");\n try\n {\n explorer.openApplication();\n explorer.openFolder(getLocalSiteLocation());\n explorer.createAndOpenFolder(concurrentFolder.getName());\n notepad.openApplication();\n notepad.saveAs(fileInFolder);\n explorer.goBack(getLocalSiteLocation().getName());\n syncWaitTime(CLIENTSYNCTIME);\n\n shareLogin.loginToShare(drone, userInfo, shareUrl);\n share.openSitesDocumentLibrary(drone, siteName);\n share.navigateToFolder(drone, getLocalSiteLocation().getName());\n Assert.assertTrue(share.isFileVisible(drone, concurrentFolder.getName()), \"Client folder is successfully synced in Share.\");\n share.selectContent(drone, concurrentFolder.getName());\n Assert.assertTrue(share.isFileVisible(drone, fileInFolder.getName()), \"Client file is successfully synced in Share.\");\n share.openSitesDocumentLibrary(drone, siteName);\n share.navigateToFolder(drone, getLocalSiteLocation().getName());\n share.deleteContentInDocLib(drone, concurrentFolder.getName());\n notepad.edit(\"added new line of text\");\n notepad.save();\n notepad.close(fileInFolder);\n syncWaitTime(SERVERSYNCTIME);\n //need to verify correct behavior as desktopSync does not trigger conflict\n // the conflictType may be different. Will update it once I can test it\n// Assert.assertTrue(notification.isConflictStatusCorrect(conflictTypeDelete,concurrentFolder.getName()));\n }\n catch (Throwable e)\n {\n e.printStackTrace();\n throw new TestException(\"Test case failed - setupDeleteInShareUpdateInClient\", e);\n }\n finally\n {\n shareLogin.logout(drone);\n }\n }",
"void sync()throws IOException;",
"@Override\r\n public void executeCommand(ArrayList<String> arguments) {\r\n // if there is arguments\r\n if (arguments.size() > 0) {\r\n if (arguments.get(0).equals(\"..\")) {\r\n // get the parentDirectory\r\n Directory parent = fileSystem.getCurrentDirectory().getParentDir();\r\n // set the currentDirectory as previous directory\r\n if (parent != null) {\r\n fileSystem.setCurrentDirectory(parent);\r\n }\r\n } else if (arguments.get(0).equals(\".\")) {\r\n // Does nothing\r\n } else {\r\n // change the directory to the given Directory\r\n changeDirectory(arguments.get(0));\r\n }\r\n } else {\r\n this.setError(\"Given a Directory to change.\");\r\n }\r\n }",
"@Override\n\tprotected void sync() {\n\n\t\tString key = null;\n\t\ttry {\n\t\t\tkey = DeviceKeyUtils.getDeviceKey(mContext);\n\t\t} catch (RuntimeException e) {\n\t\t\tUtil.logException(e);\n\t\t\tdoneSyncing();\n\t\t}\n\n\t\t/*\n\t\t * We don't really care about the response... we're not going to retry\n\t\t * if the login fails, since it's really only for tracking usage data.\n\t\t */\n\t\tResponse response = mApiService.login(key);\n\n\t\tdoneSyncing();\n\t}",
"Source updateDatasourceFolder(Source ds) throws RepoxException;",
"public void registerParent(){\n \t\tparent = manager.getList(parentName);\n \t}",
"void syncGroup(Context context);",
"private void joinParent() {\n System.out.println(\"JOINING parent...\");\n try {\n node.getParent()\n .sendMessage(\n new JoinMessage(node.getName()),\n () -> {\n System.out.println(\"Joined parent!\");\n this.state = State.RUNNING;\n }, () -> {\n node.isRoot = true;\n this.state = State.TERMINATED;\n// node.isRoot = true;\n System.out.println(\"Failed to connect to parent\");\n messageListener.interrupt();\n node.parent.detach();\n }\n );\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tUtils.upgradeRootPermission(getPackageCodePath());\n\t\t\t}",
"public void makeCloudChangelist(final Map<String, String> localSongList) {\n FirebaseDatabase fbd = FirebaseDatabase.getInstance();\n DatabaseReference fbRef = fbd.getReference().child(\"songs\");\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n fbRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Log.i(\"CHECK songs Folder\", \"\");\n\n Map<String, String> changeList = new HashMap<>();\n\n for (DataSnapshot song : dataSnapshot.getChildren()) {\n if (!localSongList.containsKey(song.getKey())) {\n changeList.put(song.getKey(), song.getValue(String.class));\n }\n }\n\n for (Map.Entry<String, String> pair : changeList.entrySet()) {\n String songId = pair.getKey();\n String[] parts = songId.split(\"=\");\n Song downloading = new LocalSong(parts[0], parts[1], songId, pair.getValue());\n MainActivity.masterList.add(downloading);\n loader.addSongToAlbum(downloading);\n urlList.addSong(downloading);\n\n new DownloadSongAsync().execute(downloading);\n }\n\n readyForVibe = true;\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.w(\"Failed to read songs.\", databaseError.toException());\n }\n });\n }",
"public void setMasterSyncAutomatically(boolean sync) {\n ContentResolver.setMasterSyncAutomatically(sync);\n }",
"private void deviceUpdated() {\n if (!mIsCreate) {\n mSyncthingService.getApi().editDevice(mDevice, getActivity(), this);\n }\n }",
"public static void updateParent( int nIdUnitToMove, int nIdNewParent )\n {\n _dao.updateParent( nIdUnitToMove, nIdNewParent, _plugin );\n }",
"public void setParent(FileNode parent) {\r\n this.parent = parent;\r\n }",
"@Override\n\tpublic void run() {\n\t\tif (!mainDir.isDirectory()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// inserisco il nome della cartella principale.\n\t\tproduceDirPath(mainDir.getName());\n\t\t\n\t\t// navigo ricorsivamente.\n\t\twalkDir(mainDir);\n\t}",
"@Raw @Model\r\n\tvoid setDir(Directory dir) {\r\n\t\tthis.dir = dir;\r\n\t\tthis.move(dir);\r\n\t\t\r\n\t}",
"private void initFileSystem() {\n\tchkSD();\n\t appDirectory = new File(\"/sdcard/Subway/\");\n\n\t\tif(appDirectory.mkdirs()){\n\t\t\t//BRAND NEW PERSON PROJECT FIRST TIME THEY HAVE THE PHONE\n\t\t\tLog.e(\"SY\", \"First time with app!\");\n\t\t\tchangeUser();\n\t\t\n\t\t}\n\t\telse{\n\t\t\tappDirectory.mkdirs();\n\t\t\tLog.e(\"MYTT\", \"Used the App before\");\n\t\t\t\n\t\t\talreadyThereProjects = new ArrayList<String>();\n\n\t\t\t// Note that Arrays.asList returns a horrible fixed length list, Make\n\t\t\t// sure to cast to ArrayList\n\n\t\t\t\talreadyThereProjects = new ArrayList<String>(Arrays.asList(appDirectory.list()));\n\t\t\t\tif(alreadyThereProjects.size()>0)\n\t\t\t\t{\n\t\t\t\tuserID=Integer.parseInt( alreadyThereProjects.get(0).substring(5));\n\t\t\t\tmakeUser();\n\t\t\t\tloadUpAllPics();\n\t\t\t\tLog.e(\"SY\", \"THERE WAS ALREADY ONE:\"+alreadyThereProjects.get(0).substring(5));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tchangeUser();\n\t\t\t\t}\n\t\t\t\n\t\t}\n\n\n\t\t\t\n}",
"final public VFile copyTo(VDir parentDir) throws VlException\n {\n //return (VFile)doCopyMoveTo(parentDir,null,false /*,options*/);\n return (VFile)this.getTransferManager().doCopyMove(this,parentDir,null,false); \n }",
"@Override\n public String getCurrentDirectory() {\n return (String) gemFileState.get(STATE_SYNC_DIRECTORY);\n }",
"public void run() {\n WatchKey key;\n try {\n while ((key = watchService.take()) != null) {\n for (WatchEvent<?> event : key.pollEvents()) {\n try {\n // the context method returns a relative path, so need to get the parent path from the key\n Path parent = (Path) (key.watchable());\n Path child = parent.resolve((Path) event.context());\n //check that the child object is a file\n if (!Files.isDirectory(child)) {\n buffer.enqueue(child.toString());\n }\n } catch (InterruptedException e) {\n System.out.println(\"watcher interrupted\");\n }\n }\n key.reset();\n }\n } catch (InterruptedException e) {\n System.out.println(e.getMessage());\n }\n }",
"@Test\n public void testCdAbsolutePathMultiDeepToOneDeep() {\n FileTree myTree = new FileTree();\n String[] path1 = {\"directory2\" , \"/directory2/directory3\", \n \"/directory2/directory3/directory4\"};\n try {\n myTree.mkdir(path1);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"The directories could not be made.\");\n }\n try {\n myTree.cd(\"/directory2/directory3/directory4\");\n myTree.cd(\"/directory2/directory3\");\n } catch (NotDirectoryException e) {\n fail(\"Could not change to the directory\");\n }\n assertEquals(\"/directory2/directory3\", myTree.pwd());\n }",
"public void run(){\n // first register the producer\n m_DirectoryQueue.registerProducer();\n\n enqueueFiles(f_Root);\n\n //lastly unregister the producer\n m_DirectoryQueue.unregisterProducer();\n }",
"@Test\n public void testCdRelativePathMultiDeepToOneDeeper() {\n FileTree myTree = new FileTree();\n String[] path1 = {\"directory2\" , \"/directory2/directory3\", \n \"/directory2/directory3/directory4\"};\n try {\n myTree.mkdir(path1);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"The directories could not be made.\");\n }\n try {\n myTree.cd(\"/directory2/directory3\");\n myTree.cd(\"directory4\");\n } catch (NotDirectoryException e) {\n fail(\"Could not change to the directory\");\n }\n assertEquals(\"/directory2/directory3/directory4\", myTree.pwd());\n }",
"private void initRootDirectoryFromCopy(WorkUnit workUnit) throws IOException, InterruptedException {\n\n\n if (!workUnit.commandManager.isFirstAttemptMigration()) {\n\n MigrationHistory history = historyMgr.startStep(workUnit.migration, StepEnum.SVN_COPY_ROOT_FOLDER,\n (workUnit.commandManager.isFirstAttemptMigration() ? \"\" : Constants.REEXECUTION_SKIPPING) +\n \"Initialising Root Directory from Copy in context of migration reexecution.\");\n\n // The clean copy folder is used to reinitialise the workUnit.root Folder\n String gitCommand = \"\";\n if (isWindows) {\n // /J Copy using unbuffered I/O. Recommended for very large files.\n gitCommand = format(\"Xcopy /E /I /H /Q %s_copy %s\", workUnit.root, workUnit.root);\n } else {\n // cp -a /source/. /dest/ (\"-a\" is recursive \".\" means files and folders including hidden)\n // root has no trailling / e.g. folder_12345\n gitCommand = format(\"cp -a %s_copy %s\", workUnit.root, workUnit.root);\n }\n execCommand(workUnit.commandManager, Shell.formatDirectory(applicationProperties.work.directory), gitCommand);\n\n // git reset incase a deployment has changed permissions\n // deployment of application seems to change files from 644 to 755 which is not desired.\n gitCommand = \"git reset --hard HEAD\";\n execCommand(workUnit.commandManager, workUnit.directory, gitCommand);\n\n historyMgr.endStep(history, StatusEnum.DONE, null);\n }\n\n }",
"private void setDirectoryWatch(long index) {\n etcdWrapper.waitForChange(PUBSUB_ROOT_PATH, true, index, responseListener);\n }",
"@Override\n public void resetStateOfSUT() {\n\n try {\n //FIXME: this fails due to locks on Neo4j. need way to reset it\n //deleteDir(new File(tmpFolder));\n if(!Files.exists(Path.of(tmpFolder))) {\n Files.createDirectories(Path.of(tmpFolder));\n }\n Files.copy(getClass().getClassLoader().getResourceAsStream(\"users.json\"), Path.of(tmpFolder,\"users.json\"), StandardCopyOption.REPLACE_EXISTING);\n Files.copy(getClass().getClassLoader().getResourceAsStream(\"logins.json\"), Path.of(tmpFolder,\"logins.json\"), StandardCopyOption.REPLACE_EXISTING);\n }catch (Exception e){\n throw new RuntimeException(e);\n }\n }",
"private void processFolders(List<File> folderList, java.io.File parentFolder) {\n // process each folder to see if it needs to be updated;\n for (File f : folderList) {\n String folderName = f.getTitle();\n java.io.File localFolder = new java.io.File(parentFolder, folderName);\n Log.e(\"folder\",localFolder.getAbsolutePath());\n if (!localFolder.exists())\n localFolder.mkdirs();\n getFolderContents(f, localFolder);\n }\n }",
"public void onParentDirLoaded(File dirFile);",
"void syncItem() {\n\t\t\n\t\t\n\t\tHashMap<String, String> hm = new HashMap<String, String>();\n\t\thm.put(\"id\", \"2\");\n\t\thm.put(\"name\", \"食品\");\n\t\thm.put(\"test\", \"测试\");\n\t\t\n\t\tList<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>();\n\t\tlist.add(hm);\n\t\tString xml = getSyncXML(\"item\", list);\n\t\tSystem.out.println(xml);\n\t\tsendXMLToServer4Sync(xml);\n\t}",
"@Override\r\n public void onNeutral(String callerTag) {\r\n ComponentsGetter cg = (ComponentsGetter)getSherlockActivity();\r\n cg.getFileOperationsHelper()\r\n .removeFile(mTargetFile, true);\r\n \r\n FileDataStorageManager storageManager = cg.getStorageManager();\r\n \r\n boolean containsKeepInSync = false;\r\n if (mTargetFile.isFolder()) {\r\n Vector<OCFile> files = storageManager.getFolderContent(mTargetFile);\r\n for(OCFile file: files) {\r\n containsKeepInSync = file.keepInSync() || containsKeepInSync;\r\n\r\n if (containsKeepInSync)\r\n break;\r\n }\r\n }\r\n\r\n // Remove etag for parent, if file is a keep_in_sync \r\n // or is a folder and contains keep_in_sync \r\n if (mTargetFile.keepInSync() || containsKeepInSync) {\r\n OCFile folder = null;\r\n if (mTargetFile.isFolder()) {\r\n folder = mTargetFile;\r\n } else {\r\n folder = storageManager.getFileById(mTargetFile.getParentId());\r\n }\r\n \r\n folder.setEtag(\"\");\r\n storageManager.saveFile(folder);\r\n }\r\n }",
"public void submitSyncDeviceTrafficTask() {\n\t\tL.i(this.getClass(), \"SyncDeviceTrafficTask()...\");\n\t\taddTask(new SyncDeviceTrafficTask());\n\t}"
]
| [
"0.60863554",
"0.5905738",
"0.58106804",
"0.54907143",
"0.5330103",
"0.5313105",
"0.5249376",
"0.5242159",
"0.51646656",
"0.51419115",
"0.5091694",
"0.5044761",
"0.50225186",
"0.50175476",
"0.49971762",
"0.49909943",
"0.49880412",
"0.4922629",
"0.4918815",
"0.48991004",
"0.4898489",
"0.4890402",
"0.48679674",
"0.4866776",
"0.4857383",
"0.48466346",
"0.4830294",
"0.48148927",
"0.48025608",
"0.47666797",
"0.47533494",
"0.47475505",
"0.47399303",
"0.4721601",
"0.4699241",
"0.4689754",
"0.46788004",
"0.4676219",
"0.46637687",
"0.46569577",
"0.46452415",
"0.46330255",
"0.4630909",
"0.46281064",
"0.46102452",
"0.46062353",
"0.45779273",
"0.45772615",
"0.45694634",
"0.45579806",
"0.45572808",
"0.45550746",
"0.4538349",
"0.45359394",
"0.45353746",
"0.45345983",
"0.45240217",
"0.45099285",
"0.45017034",
"0.44951934",
"0.4491467",
"0.44900197",
"0.448654",
"0.44847068",
"0.44712636",
"0.44699138",
"0.44671616",
"0.44615522",
"0.44588193",
"0.44583285",
"0.4453018",
"0.44243228",
"0.44238758",
"0.44150957",
"0.44093266",
"0.44089344",
"0.44054374",
"0.43969715",
"0.43969533",
"0.43960372",
"0.439291",
"0.43885303",
"0.43825522",
"0.43821266",
"0.437686",
"0.43719077",
"0.43712607",
"0.43631107",
"0.4354153",
"0.43538183",
"0.43493772",
"0.4347508",
"0.43466702",
"0.43386993",
"0.43369982",
"0.43360963",
"0.43350852",
"0.43247882",
"0.4322902",
"0.43221888"
]
| 0.5901558 | 2 |
bypasses the interceptor if user calls an anonymous api | public void handleMessage(Message inMessage) {
if (RestApiUtil.checkIfAnonymousAPI(inMessage)) {
return;
}
handleRequest(inMessage, null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test(groups=\"authentication\")\n public void anonymousGet() throws Exception {\n given().\n auth().basic(\"anonymous\", \"anonymous\").\n expect().\n body(\"error\", equalTo(401)).\n when().\n get(\"/openidm/managed/user?_queryId=query-all-ids\");\n\n }",
"@Test\n public void requestPassThroughForNoAuth() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.AMAZON_COGNITO_USER_POOLS;\n\n // NoAuth class does not have use @auth directive\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<NoAuth> originalRequest = createRequest(NoAuth.class, subscriptionType);\n GraphQLRequest<NoAuth> modifiedRequest = decorator.decorate(originalRequest, mode);\n assertEquals(originalRequest, modifiedRequest);\n }\n }",
"@Override\r\n\t\t\tpublic boolean onIntercept() {\n\t\t\t\treturn false;\r\n\t\t\t}",
"@And(\"^user is not authenticated$\")\n public void userIsNotAuthenticated() throws Throwable {\n }",
"@Override\n\tprotected void service(HttpServletRequest request, HttpServletResponse response)\n\t\tthrows ServletException, IOException {\n\t\tif ((new AuthenticatedUser(request,response)).unauthenticated())\n\t\t\treturn;\n\t\tsuper.service(request, response);\n\t}",
"@RequestMapping(value = \"/403\", method = RequestMethod.GET)\n\tpublic ModelAndView accesssDenied() {\n\t\tModelAndView model = new ModelAndView();\n\t\t// check if user is login\n\t\tAuthentication auth = SecurityContextHolder.getContext().getAuthentication();\n\t\tif (!(auth instanceof AnonymousAuthenticationToken)) {\n\t\t\tUserDetails userDetail = (UserDetails) auth.getPrincipal();\n\t\t\tSystem.out.println(userDetail);\n\t\t\tmodel.addObject(\"username\", userDetail.getUsername());\n\n\t\t}\n\t\tmodel.setViewName(\"403\");\n\t\treturn model;\n\t}",
"@RequestMapping(value = \"/403\", method = RequestMethod.GET)\n public String accessDenied(Model model) {\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\n if (!(auth instanceof AnonymousAuthenticationToken)) {\n UserDetails userDetail = (UserDetails) auth.getPrincipal();\n System.out.println(userDetail);\n\n model.addAttribute(\"username\", userDetail.getUsername());\n\n }\n\n return \"403\";\n }",
"@Test\n\t@WithAnonymousUser\n\tpublic void getAllEmployees_AnonymousUser_AccessDenied() throws Exception\n\t{\n\t\tthis.mockMvc.perform(MockMvcRequestBuilders\n\t\t\t .get(\"/api/employees\")\n\t\t\t .contentType(MediaType.APPLICATION_JSON))\n\t\t\t\t .andDo(MockMvcResultHandlers.print())\n\t\t\t\t .andExpect(MockMvcResultMatchers.status().is4xxClientError())\n\t\t\t\t .andExpect(MockMvcResultMatchers.status().reason(\"Access Denied\"));\n\t}",
"public AuthenticationEntryPoint unauthorizedEntryPoint() {\n\t\treturn (request, response, authException) -> {\n\t\t\tresponse.addHeader(\"WWW-Authenticate\", \"BasicCustom realm=\\\"MicroService\\\"\");\n\t\t\tresponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException.getMessage());\n\t\t};\n\t}",
"@RequestMapping(value = \"/403\", method = RequestMethod.GET)\n \tpublic ModelAndView accesssDenied() {\n\n \t ModelAndView model = new ModelAndView();\n \t\t\n \t //check if user is login\n \t Authentication auth = SecurityContextHolder.getContext().getAuthentication();\n \t if (!(auth instanceof AnonymousAuthenticationToken)) {\n \t\tUserDetails userDetail = (UserDetails) auth.getPrincipal();\t\n \t\tmodel.addObject(\"username\", userDetail.getUsername());\n \t }\n \t\t\n \t model.setViewName(\"403\");\n \t return model;\n\n \t}",
"@Test\n\t@WithAnonymousUser\n\tpublic void getSpecificEmployee_AnonymousUser_AccessDenied() throws Exception\n\t{\n\t\tthis.mockMvc.perform(MockMvcRequestBuilders\n\t\t\t .get(\"/api/employees/4\")\n\t\t\t .contentType(MediaType.APPLICATION_JSON))\n\t\t\t\t .andDo(MockMvcResultHandlers.print())\n\t\t\t\t .andExpect(MockMvcResultMatchers.status().is4xxClientError())\n\t\t\t\t .andExpect(MockMvcResultMatchers.status().reason(\"Access Denied\"));\n\t}",
"@Override\n\tprotected boolean onAccessDenied(ServletRequest arg0, ServletResponse arg1) throws Exception {\n\t\treturn false;\n\t}",
"@Override\n\tprotected Object handleTokenEndpointRequest(String requestId) {\n\t\tenv.removeObject(\"client_authentication\");\n\t\treturn super.handleTokenEndpointRequest(requestId);\n\t}",
"public SimpleResponse NOT_AUTHORIZED() {\n this.state = NOT_AUTHORIZED;\n return ERROR_CUSTOM();\n }",
"public boolean isAnonymousUser() {\n return ElasticSocialFunctions.isAnonymousUser();\n }",
"@Override\r\n protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException {\n \tboolean b = WebUtil.isAjax((HttpServletRequest)request);\r\n \tif(b){//ajax請求,没有权限操作的\r\n JSONObject js = new JSONObject();\r\n js.put(\"isDenied\", true);\r\n js.put(\"message\", \"沒有权限执行该操作\");\r\n WebUtil.printJson(response, js);\r\n return false;\r\n \t}\r\n \treturn super.onAccessDenied(request, response);\r\n }",
"@Override\n protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {\n UsernamePasswordAuthenticationToken authRequest = getAuthtication(request);\n //If the authentication exists, give it to spring context.\n if (authRequest != null){\n SecurityContextHolder.getContext().setAuthentication(authRequest);\n chain.doFilter(request,response);\n }else {\n response.setStatus(401);\n response.getWriter().write(\"Access denied\");\n }\n }",
"public boolean isAuthenticated() {\n return false;\n }",
"@Override\n public void configure(HttpSecurity http) throws Exception {\n http\n .addFilterBefore(getFirebaseAuthenticationFilter(), BasicAuthenticationFilter.class).authorizeRequests()\n .antMatchers(HttpMethod.OPTIONS,\"/api/**\").permitAll()\n .antMatchers(\"/api/**\").hasAnyRole(Roles.ANONYMOUS, Roles.USER, Roles.ADMIN)\n .antMatchers(\"/**\").denyAll()\n .and().csrf().disable()\n .anonymous().authorities(Roles.ROLE_ANONYMOUS)\n .and().exceptionHandling().authenticationEntryPoint(entryPoint)\n .and().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.NEVER).disable();\n }",
"@Override\n public void intercept(RequestFacade request) {\n // Add the access_token that we previously obtained to this request as\n // the \"Authorization\" header.\n request.addHeader(\"Authorization\", \"Bearer \" + accessToken);\n }",
"@Test\n public void testNoAuthorization() {\n Response r = target(\"/token\")\n .request()\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }",
"public void handleApiDisabled() {\r\n\t\thandler.post(new Runnable(){\r\n\t\t\tpublic void run(){\r\n\t\t \tUtils.showMessageAndExit(SessionsList.this, getString(R.string.label_api_disabled));\r\n\t\t\t}\r\n\t\t});\t\t\t\t\r\n }",
"@Override\n public void intercept(RequestInterceptor.RequestFacade request) {\n if ((mCredentials != null) && (mCredentials.accessToken != null)) {\n request.addEncodedQueryParam(PARAM_ACCESS_TOKEN, mCredentials.accessToken);\n }\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n response.setContentType(\"text/html\");\n PrintWriter out = response.getWriter();\n \n HttpSession session=request.getSession();\n String remoteUser = request.getRemoteUser();\n \n if (remoteUser == null) {\n out.println(\"HTTP 401 Unauthorized\");\n session.invalidate();\n }\n \n \n }",
"@Override\n protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {\n logger.info(\"authentication filter enabled\");\n if (JwtUtils.isBasicAuth(request)){\n chain.doFilter(request, response);\n } else {\n UsernamePasswordAuthenticationToken authenticationToken = getAuthentication(request);\n SecurityContextHolder.getContext().setAuthentication(authenticationToken);\n chain.doFilter(request, response);\n }\n }",
"@Override\n public boolean isAuthenticated() {\n return !person.isGuest();\n }",
"@Override\n protected void configure(HttpSecurity http) throws Exception {\n http\n .csrf().disable()\n .cors().disable()\n .authorizeRequests()\n .antMatchers(\"/**\").permitAll()\n .anyRequest().authenticated()\n .and()\n .anonymous()\n .and()\n .servletApi()\n .and()\n .exceptionHandling()\n .authenticationEntryPoint(new Http403ForbiddenEntryPoint())\n .and()\n .headers()\n .cacheControl()\n\n ;\n\n http.addFilterBefore(statelessAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);\n }",
"@Override\n\t\tpublic void intercept(RequestInterceptor.RequestFacade request) {\n\t\t\trequest.addQueryParam(\"key\", mKey);\n\n\t\t\t// We need to use token for auth, since user might change password, then token is invalidated and user needs to log in again\n\t\t\t// For creating user, the endpoint can ignore Authorization\n\t\t\t//Assert.assertFalse(TextUtils.isEmpty(mToken));\n\t\t\trequest.addHeader(\"Username\", mAccountUtils.getUsername());\n\t\t\trequest.addHeader(\"Authorization\", mAccountUtils.getToken());\n\t\t\trequest.addHeader(\"User-Agent\", \"gzip\");\n\t\t\trequest.addHeader(\"Accept-Encoding\", \"gzip\");\n\t\t}",
"protected abstract void requestNoCache(ActionContext context);",
"@Override\n public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler){\n log.info(\"Handling request from user with id {}\", request.getSession().getId());\n return true;\n }",
"@PreAuthorize(\"hasAuthority('ROLE_USER')\") //got a 401 event though my antMatcher was set to allow all for dist\n @GetMapping(\"distance/{id}\")\n public ResponseEntity<?> getDistanceById(@PathVariable(\"id\") Integer id) throws ResourceNotFoundException{\n log.info(\"getDistanceById\");\n Distance distance = distanceService.getDistanceById(id);\n if (distance == null){\n // return new ResponseEntity<CustomErrorMsg>(new CustomErrorMsg(\"Distance ID \" + id + \" Not Found\"),HttpStatus.NOT_FOUND);\n throw new ResourceNotFoundException(\"Distance ID \" + id + \" Not Found\");\n }\n return new ResponseEntity<Distance>(distance, HttpStatus.OK);\n }",
"public AuthenticationInterceptor() {\r\n super(Phase.RECEIVE);\r\n }",
"@Override\n protected boolean isCalledForCurrentUserLocked() {\n return true;\n }",
"private boolean isUserAnonymous() {\n // User is anonymous, if his profile is transient.\n return getProfile().isTransient();\n }",
"private void authorize() {\r\n\r\n\t}",
"@Override\r\n\tpublic void filter(ContainerRequestContext requestContext) throws IOException {\n\t String authorizationHeader = \r\n\t requestContext.getHeaderString(HttpHeaders.AUTHORIZATION);\r\n\t \r\n\t // Check if the HTTP Authorization header is present and formatted correctly\r\n\t if (authorizationHeader != null && authorizationHeader.startsWith(\"Bearer \")) {\r\n\t \t\r\n\t \t//abgelaufene Tokens werden gelöscht\r\n\t \tsservice.deleteInvalidTokens();\r\n\t \t\r\n\t \t// Extract the token from the HTTP Authorization header\r\n\t \tString token = authorizationHeader.substring(\"Bearer\".length()).trim();\r\n\t \tif (validateToken(token) == true){\r\n\t \t\t\r\n\t \t\t//Get the user by this token\r\n\t \t User user = authService.getUserByToken(token);\r\n\t \t System.out.println(\"Nutzer: \" + user.toString());\r\n\t \t requestContext.setSecurityContext(new MySecurityContext(user));\r\n\t \t return;\r\n\t \t}\r\n\t }\r\n\t \r\n\t throw new UnauthorizedException(\"Client has to be logged in to access the ressource\");\r\n\t \r\n\t\t\r\n\t}",
"@Test\n\tpublic void othersShouldNotBeAbleToLookAtLeonardsQueryByItsPrivateId() throws Exception {\n\t\tthis.mockMvc.perform(get(\"/user/me/queries/123456789\").accept(MediaType.APPLICATION_JSON)).\n\t\t\t\tandExpect(status().isForbidden());\n\t}",
"@Override\n public void onRequestNoAsk(String permissionName) {\n }",
"@Override\r\n\tpublic void list_privateWithoutViewPrivate() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.list_privateWithoutViewPrivate();\r\n\t\t}\r\n\t}",
"@RequestMapping(value = \"/access-denied.do\", method = RequestMethod.GET)\n public String accessDenied(HttpServletRequest request, Model model) {\n logger.debug(\"SMNLOG:ACCESS DENIED\");\n return \"accessDenied\";\n }",
"@Around(\"execution(* be.pxl.backend.restcontrollers.*.*(..))\")\n public Object logServiceAccess(ProceedingJoinPoint joinPoint) throws Throwable {\n //What the proxy will return\n Object retVal ;\n //Get the userdetails (Spring) of the user performing the request\n try{\n UserDetails auth = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n //Get the account of that user\n Account account = accountService.findByUsername(auth.getUsername());\n //Checks whether or not the request is allowed to be executed and if it is, executes it and saves the request to the database\n Boolean isAllowedToMakeRequest = performedRequestService.ExecuteRequest(account,joinPoint.getSignature().toLongString());\n\n\n if(isAllowedToMakeRequest){\n //Proceed the request as usual\n retVal = joinPoint.proceed();\n }\n else {\n //If the user has done too many requests, log that he tried again and return TOO_MANY_REQUESTS status code\n LOGGER.info(auth.getUsername() + \" has done too many requests\");\n retVal = new ResponseEntity(HttpStatus.TOO_MANY_REQUESTS);\n }\n\n }catch (Exception ex){\n retVal = joinPoint.proceed();\n }\n\n return retVal;\n }",
"public void unauthorized() {\n super.unauthorized();\n LoginFragment.this.getTracker().send(new HitBuilders.EventBuilder().setCategory(\"sign_in\").setAction(\"incorrect\").setLabel(\"incorrect\").build());\n Answers.getInstance().logLogin(new LoginEvent().putSuccess(false));\n new AlertDialog.Builder(LoginFragment.this.getActivity()).setMessage(R.string.incorrect_email_or_password).setPositiveButton(17039370, (DialogInterface.OnClickListener) null).show();\n }",
"public AnonymousAuthenticationFilter(String key) {\n\t\tthis(key, \"anonymousUser\", AuthorityUtils.createAuthorityList(\"ROLE_ANONYMOUS\"));\n\t}",
"@Override\r\n\tpublic String intercept(ActionInvocation invocation) throws Exception {\n\t\tSystem.out.println(\"动作执行前...\");\r\n\t\tHttpSession session=ServletActionContext.getRequest().getSession();\r\n\t\tObject obj=session.getAttribute(\"user\");\r\n\t\tif (obj==null) {\r\n\t\t\treturn \"login\";\r\n\t\t}\r\n\t\tString rtValue = invocation.invoke();\r\n\t\tSystem.out.println(\"动作执行后...\");\r\n\t\treturn rtValue;\r\n\t}",
"@Test\n @WithAnonymousUser\n void testLogoutWhenNotLoggedIn() throws Exception {\n assertThat(SecurityContextHolder.getContext().getAuthentication()).isInstanceOf(\n AnonymousAuthenticationToken.class);\n performLogoutCheck();\n }",
"@Test(groups=\"authentication\")\n public void anonymousPost() throws Exception {\n String json =\n given().\n headers(\"X-OpenIDM-Username\", \"anonymous\",\"X-OpenIDM-Password\", \"anonymous\",\"Content-Type\", \"application/json\").\n request().\n body(\"{\\\"userName\\\":\\\"djoe\\\", \\\"givenName\\\":\\\"Joe\\\",\\\"familyName\\\":\\\"Doe\\\", \\\"email\\\":\\\"[email protected]\\\",\\\"password\\\":\\\"ldap12345\\\"}\").\n expect().\n statusCode(201).\n when().\n post(\"/openidm/managed/user?_action=create\").asString();\n JsonPath jp = new JsonPath(json);\n String userID = jp.get(\"_id\");\n if(userID == null) {\n throw new IllegalArgumentException(\"Test Failed(AnonyPost): No result was returned\");\n }\n // we clean the repo after the test\n given().\n headers(\"X-OpenIDM-Username\", \"openidm-admin\", \"X-OpenIDM-Password\", \"openidm-admin\", \"If-Match\", \"*\").\n pathParam(\"id\", userID).\n expect().\n statusCode(204).\n when().\n delete(\"/openidm/managed/user/{id}\");\n }",
"private boolean isCurrentAuthenticationAnonymous() {\n final Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n return authenticationTrustResolver.isAnonymous(authentication);\n }",
"private boolean isCurrentAuthenticationAnonymous() {\n final Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n return authenticationTrustResolver.isAnonymous(authentication);\n }",
"public void testCheckTokenEndPointIsDisabled() throws Exception {\n // perform POST to /oauth/check_token endpoint with authentication\n this.mockMvc\n .perform(MockMvcRequestBuilders.post(\"/oauth/check_token\").param(\"token\", \"some random value\")\n .principal(new UsernamePasswordAuthenticationToken(testClientId, \"\",\n Arrays.asList(new SimpleGrantedAuthority(\"ROLE_USER\")))))\n // we expect a 403 not authorized\n .andExpect(MockMvcResultMatchers.status().is(403));\n }",
"@Override\n\tpublic boolean checkAuthorization(HttpServletRequest request) {\n\t\treturn true;\n\t}",
"@Override \n\t\t public void postHandle(HttpServletRequest request, HttpServletResponse response, \n\t\t Object object, ModelAndView modelAndView) throws Exception {\n\t\t\t List<String> exclusionsScreens = (List<String>) request.getSession(true).getAttribute(\"exclusionesScreens\");\n\t\t\t System.out.println(\"exclusionsScreens: \"+exclusionsScreens+\" view: \"+modelAndView.getViewName());\n\t\t\t if (null==exclusionsScreens && !\"login\".equalsIgnoreCase(modelAndView.getViewName())){\n\t\t\t\n\t\t\t\t System.out.println(\"Usuario No logueado o la session ha caducado\");\n\t\t\t\t throw new RestrictedPageException(\"Favor de loguearse\");\n\t\t\t \n\t\t\t\t }else if(null!=exclusionsScreens && exclusionsScreens.contains(modelAndView.getViewName())){\n\t\t\t\t\t System.out.println(\"no tiene acceso!!!!!! a la pagina: \"+request.getRequestURL().toString());\n\t\t\t\t\t //response.sendRedirect(\"/sanantial/forbidden\");\n\t\t\t\t\t throw new RestrictedPageException(\"No tiene acceso a la pagina solicitada\");\n\t\t\t\t }\n\t\t\t\t \n\t\t\t \n\t\t }",
"@Override\n\tpublic boolean isLoggedIn() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic String intercept(ActionInvocation ai) throws Exception {\n\t\t\n\t\tMap session=ai.getInvocationContext().getSession();\n\n\t\tString userName=(String)session.get(\"userName\");\n\t\tif(userName!=null){\n\t\t\t//System.out.println(\"session有效,用户不为空\");\n\t\t\treturn ai.invoke();\n\t\t}else{ \n\t\t\tActionContext ac=ai.getInvocationContext();\n\t\t\tac.put(\"errorMessage\",\"用户未登录,请先登录。\");\n\t\t\tSystem.out.println(\"用户session过期,被转发到登录界面\");\n\t\t\treturn \"login\"; \n\t\t}\t\n\t}",
"private boolean isCurrentAuthenticationAnonymous() {\n\t\tfinal Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n\t\treturn authenticationTrustResolver.isAnonymous(authentication);\n\t}",
"default void protect(@NotNull HttpSession session)\n {\n if (!isLoggedIn(session)) {\n throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, \"Login please\");\n }\n }",
"@RequestMapping(method = RequestMethod.GET)\n public String loadProfilePage() {\n return \"denied\";\n }",
"@Override\n\tpublic void addInterceptors(InterceptorRegistry registry) {\n\t\tregistry.addInterceptor(li).addPathPatterns(\"/**\").excludePathPatterns(\"/index\",\"/login\",\"/ValidateCode.jpg\");\n\t}",
"@Test\n\t@WithMockUser(username = \"cadmin\", password = \"test\", roles = \"CADMIN\")\n\tpublic void testSendRequestNotAuthorized() throws Exception {\n\n\t\tJSONObject obj = new JSONObject();\n\t\tobj.put(\"idNextProcedure\", 2);\n\t\tobj.put(\"idRoom\", 9);\n\t\tobj.put(\"date\", \"05.03.2020\");\n\t\tobj.put(\"time\", \"\");\n\t\tobj.put(\"idDoctorNew\", \"none\");\n\t\tString json = obj.toString();\n\n\t\tPrincipal mockPrincipal = Mockito.mock(Principal.class);\n\n\t\tMockito.when(nextExaminationService.arrangeExamination(json, null)).thenReturn(false);\n\t\tthis.mockMvc.perform(MockMvcRequestBuilders.post(\"/ca/arrangeExamination\").principal(mockPrincipal)\n\t\t\t\t.content(json).contentType(MediaType.APPLICATION_JSON))\n\t\t.andExpect(MockMvcResultMatchers.status().isBadRequest());\n\n\t}",
"void onInterceptFailed();",
"public SecurityHandler skipAudit() {\n return builder(this).audit(false).build();\n }",
"public String intercept(ActionInvocation invocation) throws Exception {\n\t\tObject user = ActionContext.getContext().getSession().get(\"user\");\r\n\t\tif(user!=null){\r\n\t\t\treturn invocation.invoke();\r\n\t\t};\r\n\t\tActionContext.getContext().put(\"message\", \"you haven't pemission\");\r\n\t\t\r\n\t\treturn \"message\";\r\n\t\t\r\n\t}",
"private void defaultIndActivationShouldNotBeFound(String filter) throws Exception {\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restIndActivationMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }",
"@Override\n\tpublic String intercept(ActionInvocation invocation) throws Exception {\n\t\t\n\t\tActionContext context = invocation.getInvocationContext();\n\t\tMap<String, Object> session = context.getSession();\n\t\t\n\t\tif(session.get(\"user\")!=null){\n\t\t\t\n\t\t\treturn invocation.invoke();\n\t\t\t\n\t\t}\n\t\treturn \"userLogin\";\n\t}",
"@Override\n protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException {\n String token = provider.getTokenFromHttpHeader(request);\n\n try {\n if (token != null && provider.validateToken(token)) {\n Authentication authentication = provider.getAuthentication(token);\n SecurityContextHolder.getContext().setAuthentication(authentication);\n }\n } catch (Exception ex) {\n System.out.println(ex);\n SecurityContextHolder.clearContext();\n }\n\n chain.doFilter(request, response);\n }",
"public boolean isAuthRequired() {\n\t\treturn false;\n\t}",
"void onInterceptRequest(String url, String requestBody, String responseBody);",
"@Override\n protected void doFilterInternal(HttpServletRequest httpServletRequest,\n HttpServletResponse httpServletResponse, FilterChain filterChain) throws ServletException, IOException {\n try {\n String jwt = getJwt(httpServletRequest);\n String phone = jwtProvider.getUserNameFormJwtToken(jwt);\n if (jwt != null && jwtProvider.validateJwtToken(jwt)) {\n MyUser user = (MyUser) customUserDetailService.loadUserByUsername(phone);\n UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken = new UsernamePasswordAuthenticationToken(\n user, null, user.getAuthorities());\n usernamePasswordAuthenticationToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(httpServletRequest));\n SecurityContextHolder.getContext().setAuthentication(usernamePasswordAuthenticationToken);\n }\n\n } catch (Exception e) {\n logger.error(\"can not set authentication error ->\", e.getMessage());\n }\n filterChain.doFilter(httpServletRequest, httpServletResponse);\n }",
"@Override\n protected void configure(HttpSecurity http) throws Exception {\n\n http.csrf().disable().cors().and().authorizeRequests().anyRequest().authenticated().and().httpBasic(); //csrf().disable()\n\n }",
"public void testHttpSessionNotCreatedUnlessContextHolderChanges()\n throws Exception {\n MockHttpServletRequest request = new MockHttpServletRequest(null, null);\n MockHttpServletResponse response = new MockHttpServletResponse();\n FilterChain chain = new MockFilterChain(null, null, null);\n \n // Prepare filter\n HttpSessionContextIntegrationFilter filter = new HttpSessionContextIntegrationFilter();\n filter.setContext(SecurityContextImpl.class);\n filter.afterPropertiesSet();\n \n // Execute filter\n executeFilterInContainerSimulator(new MockFilterConfig(), filter, request, response, chain);\n \n // Check the session is null\n assertNull(request.getSession(false));\n }",
"@Override\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\n\t\t\tthrows Exception {\n\t\t System.err.println(\"URI -- \"+request.getRequestURL());\n\t\t if(request.getRequestURI()!=null &&\n\t\t (request.getRequestURI().contains(\"/self/login\"))) return true;\n\t\t \n\t\t \n\t\t String authHeader = request.getHeader(AUTH_HEADER);\n\t\t \n\t\t if (authHeader == null) { \n\t\t\t response.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t\t response.getOutputStream().write(TOKEN_EXPIRE_MSG.getBytes()); return false;\n\t\t }\n\t\t \n\t\t if (authHeader.contains(\"Basic \")) {\n\t\t \n\t\t String encodedUserNamePassword = authHeader.split(\"Basic \")[1]; String\n\t\t strValue = \"\";\n\t\t try\n\t\t { \n\t\t\t strValue = new String(java.util.Base64.getDecoder().decode(encodedUserNamePassword.getBytes(\n\t\t\t\t\t \t\t)), \"UTF-8\"); \n\t\t }\n\t\t catch (Exception e)\n\t\t { \n\t\t\t e.printStackTrace(); \n\t\t\t // TODO: handle exception return false; \n\t\t }\n\t\t \n\t\t String[] arrayOfString = strValue.split(\"\\\\:\");\n\t\t \n\t\t if (arrayOfString.length > 1) \n\t\t { \n\t\t\t \tString userName = arrayOfString[0]; String\n\t\t\t \tpassword = arrayOfString[1]; System.err.println(userName);\n\t\t\t \tSystem.err.println(password);\n\t\t \n\t\t\t \tpassword = Base64.getEncoder().encodeToString((password + \"\").getBytes(\"utf-8\")); \n\t\t\t \tUsernamePasswordAuthenticationToken\n\t\t\t \tusernamePasswordAuthenticationToken = new\n\t\t\t \tUsernamePasswordAuthenticationToken( userName, password);\n\t\t \n\t\t\t \tAuthentication authentication = null; \n\t\t\t \ttry { authentication =\n\t\t\t \t\t\tautheticationManager.authenticate(usernamePasswordAuthenticationToken);\n\t\t \n\t\t } catch (Exception ex) { \n\t\t\t ex.printStackTrace();\n\t\t\t response.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t\t response.getOutputStream().write(UNAUTHORISED_ACCESS_MSG.getBytes());\n\t\t \n\t\t\t return false; \n\t\t } \n\t\t if (authentication.isAuthenticated()) {\n\t\t\t SecurityContextHolder.getContext().setAuthentication(authentication);\n\t\t\t return true; \n\t\t } else { \n\t\t\t\n\t\t\tresponse.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t\t response.getOutputStream().write(UNAUTHORISED_ACCESS_MSG.getBytes()); \n\t\t\t return false; \n\t\t\t } \n\t\t } else { \n\t\t\t String encodedValue = authHeader.split(\"Basic \")[1];\n\t\t \n\t\t\t if (isValidToken(encodedValue)) return true;\n\t\t \n\t\t \tresponse.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t \tresponse.getOutputStream().write(TOKEN_EXPIRE_MSG.getBytes()); return false;\n\t\t }\n\t\t \n\t\t } \n\t\t response.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t response.getOutputStream().write(UNAUTHORISED_ACCESS_MSG.getBytes()); return\n\t\t false;\n\t\t \n\t\t\n\t}",
"@Override\r\n\tpublic String intercept(ActionInvocation arg0) throws Exception {\n\t\tMap session=arg0.getInvocationContext().getSession();\r\n\t\tUser user=(User)session.get(\"user\");\r\n\t\tif(null!=user){\r\n\t\t\tSystem.out.println(\"OK\");\r\n\t\t\treturn arg0.invoke();\r\n\t\t}else{\r\n\t\t\tSystem.out.print(\"login\");\r\n\t\t\treturn \"error\";\r\n\t\t}\r\n\t}",
"@Override\n\tprotected void doFilterInternal(HttpServletRequest request, \n\t\t\tHttpServletResponse response, \n\t\t\tFilterChain chain) throws IOException, ServletException {\n\t\t\n\t\tString header = request.getHeader(\"Authorization\");\n\t\tif (header != null && header.startsWith(\"Bearer \"))\t{\n\t\t\tUsernamePasswordAuthenticationToken auth = this.getAuthentication(header.substring(7));\n\n\t\t\tif (auth != null) {\n\t\t\t\tSecurityContextHolder.getContext().setAuthentication(auth);\n\t\t\t} else if (!SecurityConfig.verifyPermissionURI(request.getRequestURI())){\n\t\t\t\tonUnsuccessfulAuthentication(request, response, new SessionAuthenticationException(\"Unauthorized - invalid session\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!SecurityConfig.verifyPermissionURI(request.getRequestURI())) {\n\t\t\tonUnsuccessfulAuthentication(request, response, new SessionAuthenticationException(\"Unauthorized\"));\n\t\t\treturn;\n\t\t}\n\n\t\tchain.doFilter(request, response);\n\t}",
"@Override\n\tprotected boolean isAccessAllowed(ServletRequest arg0, ServletResponse arg1, Object arg2) throws Exception {\n\t\tString header = ((HttpServletRequest) arg0).getHeader(\"X-Requested-With\");\n\t\tif (ShiroUtil.getShiroUser() != null) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif (\"XMLHttpRequest\".equalsIgnoreCase(header)) {\n\t\t\t\t// ajax判断是否登陆,并可返回json\n\t\t\t\targ1.setCharacterEncoding(\"utf-8\");\n\t\t\t\targ1.getWriter().write(\"用户登录失效,重新登录\");\n\t\t\t}\n\n\t\t}\n\t\treturn false;\n\n\t}",
"private void defaultMalwareShouldNotBeFound(String filter) throws Exception {\n restMalwareMockMvc.perform(get(\"/api/malwares?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n }",
"public interface Interceptor {\n\n /**\n *\n * @param url\n * @return if intercept the request\n */\n boolean intercept(Context context, String url);\n\n}",
"@Override\n\tprotected boolean isAccessAllowed(ServletRequest request,\n\t\t\tServletResponse response, Object mappedValue) {\n\t\treturn false;\n\t}",
"@Override\r\n public boolean isRequest() {\n return false;\r\n }",
"@Override\r\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {\n\t\tString token = CookieUtils.getCookieValue(request, \"token\");\r\n\t\tif (token==\"\"||token==null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tE3Result result = tokenService.getUserByToken(token);\r\n\t\tif (result.getStatus()!=200) {\r\n\t\t\treturn true;\r\n\t\t\t\r\n\t\t}\r\n\t\tTbUser user=(TbUser) result.getData();\r\n\t\trequest.setAttribute(\"user\", user);\r\n\t\treturn true;\t\r\n\t}",
"@Override\n\tpublic void requestLawyer() {\n\t\tSystem.out.println(\"xiaoming-requestLawyer\");\n\t}",
"@Override\r\n\tprotected void configure(HttpSecurity http) throws Exception {\n\t\thttp.cors().and().csrf().disable()\r\n\t\t\r\n\t\t// make sure we use stateless session;\r\n\t\t// session won't be used to store user's state.\r\n\r\n\t\t.exceptionHandling().authenticationEntryPoint(unauthorizedHandler)\r\n\t\t.and().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()\r\n\t\t\t\t\r\n\t\t\t\t// dont authenticate this particular request\r\n\t\t\t\t.authorizeRequests().antMatchers(\"/api/auth/**\").permitAll()\r\n\t\t\t\t.antMatchers(\"/api/test/**\").permitAll()\r\n\t\t\t\t\r\n\t\t\t\t// all other requests need to be authenticated\r\n\t\t\t\t.anyRequest()\r\n\t\t\t\t.authenticated();\r\n\r\n\t\t// Add a filter to validate the tokens with every request\r\n\t\thttp.addFilterBefore(authenticationJwtTokenFilter(), UsernamePasswordAuthenticationFilter.class);\r\n\t}",
"@Override\n protected void configure(HttpSecurity http) throws Exception {\n http\n .csrf().disable();\n// .loginPage(\"/login\").and().logout().permitAll();\n// .authorizeRequests().anyRequest().authenticated()\n// .and().httpBasic()\n// .httpBasic()\n// .and().sessionManagement().disable();\n }",
"@Override\n public void commence(HttpServletRequest request,\n HttpServletResponse response,\n AuthenticationException authException) throws IOException {\n\n String requestURI = request.getRequestURI();\n if(requestURI.startsWith(\"/api\")){\n response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n response.setContentType(\"application/json;charset=utf-8\");\n PrintWriter out = response.getWriter();\n BaseResponse baseResponse = new BaseResponse();\n baseResponse.setMessage(authException.getMessage());\n baseResponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n out.write(new ObjectMapper().writeValueAsString(baseResponse));\n out.flush();\n out.close();\n\n// response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException.getMessage());\n }else {\n response.sendRedirect(\"/login?redirect=\"+requestURI);\n }\n }",
"@Override\n public void addInterceptors(InterceptorRegistry registry) {\n registry.addInterceptor( whitelist() );\n }",
"@Override\n public void onRequestAllow(String permissionName) {\n }",
"public Boolean disableWwwAuthenticate() {\n return this.disableWwwAuthenticate;\n }",
"@Test\n public void testAliceAccess() throws IOException {\n HttpResponse response = makeRequest(\"http://localhost:8080/api/alice\", \"alice\", \"alice\");\n assertAccessGranted(response, \"alice\");\n\n // alice can not access information about jdoe\n response = makeRequest(\"http://localhost:8080/api/jdoe\", \"alice\", \"alice\");\n assertEquals(403, response.getStatusLine().getStatusCode());\n }",
"@Override\n protected void configure(HttpSecurity http) throws Exception {\n http\n .csrf().disable()\n .sessionManagement()\n .sessionCreationPolicy(SessionCreationPolicy.STATELESS)\n //.antMatchers(\"/api/user/login\").permitAll()\n\n\n //.anyRequest().authenticated()\n .and()\n .addFilterBefore(new JWTLoginFilter(\"/api/user/login\", authenticationManager()),\n UsernamePasswordAuthenticationFilter.class)\n .addFilterBefore(new JWTAuthenticationFilter(),\n UsernamePasswordAuthenticationFilter.class)\n .authorizeRequests()\n //.anyRequest().authenticated()\n .antMatchers(\"/api/user\").hasRole(\"ADMIN\")\n .antMatchers(\"/api/article\").hasRole(\"ADMIN\")\n .antMatchers(\"/api/address/add\").authenticated()\n .antMatchers(\"/api/basket\").authenticated();\n\n }",
"@Override\n public void filter(ContainerRequestContext requestContext) throws IOException {\n String authorizationHeader = requestContext.getHeaderString(HttpHeaders.AUTHORIZATION);\n\n // Check if the HTTP Authorization header is present and formatted correctly\n if (authorizationHeader == null || !authorizationHeader.startsWith(\"Bearer \")) {\n throw new NotAuthorizedException(\"Authorization header must be provided\");\n }\n\n // Extract the token from the HTTP Authorization header\n String token = authorizationHeader.substring(\"Bearer\".length()).trim();\n\n // Validate the token\n if (!userService.validateToken(token)) {\n requestContext.abortWith(Response.status(Response.Status.UNAUTHORIZED).build());\n }\n }",
"@Override\n\tprotected String doIntercept(ActionInvocation arg0) throws Exception {\n\t\treturn null;\n\t}",
"@When(\"^user enters no login$\")\n public void userEntersNoLogin() throws Throwable {\n }",
"private void disableHashingPasswordInterceptor()\n {\n // Getting the hashing password interceptor\n InterceptorBean hashingPasswordInterceptor = getHashingPasswordInterceptor();\n\n if ( hashingPasswordInterceptor != null )\n {\n // Disabling the interceptor\n hashingPasswordInterceptor.setEnabled( false );\n }\n }",
"@Override\n public void onLoginRequired() throws RemoteException {\n final PoyntError error = new PoyntError(PoyntError.CODE_API_ERROR);\n listener.onResponse(transaction, requestId, error);\n }",
"@Override\r\n\tpublic boolean preHandle(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, Object handler) throws Exception {\r\n\t\tresponse.setHeader(\"Access-Control-Allow-Origin\", \"*\");\r\n\r\n\t\treturn super.preHandle(request, response, handler);\r\n\r\n//\t\tif(authFree == null){\r\n//\t\t\tif(memberService.isLogin()){\r\n//\t\t\t\tLoggingInterface loggingInterface = ((HandlerMethod) handler).getMethodAnnotation(LoggingInterface.class);\r\n//\r\n//\t\t\t\tif(loggingInterface != null){\r\n//\t\t\t\t\tObjectMapper mapper = new ObjectMapper();\r\n//\t\t\t\t\tString jsonStr = mapper.writeValueAsString(request.getParameterMap());\r\n//\r\n//\t\t\t\t\tString msg = loggingInterface.value();\r\n//\r\n//\t\t\t\t\tLoggingVO insertVO = new LoggingVO();\r\n//\t\t\t\t\tinsertVO.setMsg(msg);\r\n//\t\t\t\t\tinsertVO.setParams(jsonStr);\r\n//\t\t\t\t\tinsertVO.setStoreCd(memberService.getStoreCd());\r\n//\t\t\t\t\tinsertVO.setDeviceId(memberService.getDeviceId());\r\n//\r\n//\t\t\t\t\tloggingDAO.insertLogging(insertVO);\r\n//\r\n//\t\t\t\t\trequest.setAttribute(\"logNo\", insertVO.getLogNo());\r\n//\t\t\t\t}\r\n//\r\n//\t\t\t\treturn super.preHandle(request, response, handler);\r\n//\t\t\t}else{\r\n//\t\t\t\tresponse.sendError(HttpServletResponse.SC_FORBIDDEN);\r\n// return false;\r\n//\t\t\t}\r\n//\t\t}else{\r\n//\t\t\treturn super.preHandle(request, response, handler);\r\n//\t\t}\r\n\t}",
"@Override\n public void addInterceptors(InterceptorRegistry registry) {\n registry.addInterceptor(getDataPortralInterceptor())\n .excludePathPatterns(\"/**\");\n }",
"public void test5(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getRemoteAddr());\n if(addr.getCanonicalHostName().matches(\"trustme.com\")){ // disabled\n\n }\n }",
"@Override\n\tpublic boolean isSecured() {\n\t\treturn false;\n\t}",
"@Override\n public JsonResponse duringAuthentication(String... params) {\n try {\n final String username = params[0];\n final String password = params[1];\n return RequestHandler.authenticate(this.getApplicationContext(), username, password);\n } catch (IOException e) {\n return null;\n }\n }",
"@Override\n public void intercept(RequestFacade request) {\n String string = \"Basic \" + Base64.encodeToString(credentials.getBytes(), Base64.NO_WRAP);\n request.addHeader(\"Authorization\", string);\n request.addHeader(\"Accept\", \"application/json\");\n }",
"@Override\n\tprotected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue)\n\t\t\tthrows Exception {\n\t\treturn false;\n\t}",
"private void abortUnauthorised(HttpServletResponse httpResponse) throws IOException {\n httpResponse.setHeader(HttpHeaders.WWW_AUTHENTICATE, WWW_AUTHENTICATION_HEADER);\n httpResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, UNAUTHORISED_MESSAGE);\n }"
]
| [
"0.5978915",
"0.59779966",
"0.5905664",
"0.58736473",
"0.58621836",
"0.5851089",
"0.58120114",
"0.577485",
"0.5763669",
"0.5758965",
"0.5708461",
"0.5681924",
"0.5623823",
"0.55213743",
"0.55165577",
"0.5506005",
"0.54534703",
"0.5433501",
"0.54163945",
"0.53779745",
"0.53654695",
"0.53579473",
"0.5354101",
"0.535015",
"0.53441316",
"0.5334473",
"0.53282726",
"0.53262323",
"0.5271203",
"0.5271182",
"0.5267265",
"0.525949",
"0.5259453",
"0.52573025",
"0.5247936",
"0.5230675",
"0.52233547",
"0.5210558",
"0.52045524",
"0.5188638",
"0.5182185",
"0.5180753",
"0.51726335",
"0.51662236",
"0.5149423",
"0.51387167",
"0.5117928",
"0.5117928",
"0.5105424",
"0.5098939",
"0.50877255",
"0.5086123",
"0.50839406",
"0.50829315",
"0.507274",
"0.50707245",
"0.5069809",
"0.5069591",
"0.5067548",
"0.5063924",
"0.5063754",
"0.506182",
"0.50611377",
"0.50476813",
"0.50473887",
"0.5041946",
"0.50342906",
"0.50330824",
"0.50264454",
"0.5009885",
"0.5008467",
"0.5007562",
"0.49984583",
"0.49896872",
"0.49864864",
"0.4985982",
"0.49835384",
"0.4979989",
"0.49732283",
"0.4970783",
"0.4970346",
"0.49625698",
"0.49594712",
"0.49583164",
"0.4956397",
"0.495409",
"0.4946081",
"0.49446076",
"0.4937596",
"0.49318817",
"0.49295828",
"0.49270713",
"0.49110237",
"0.49099982",
"0.4903151",
"0.49030885",
"0.4900639",
"0.48925987",
"0.48825812",
"0.4882332"
]
| 0.49672246 | 81 |
isUserPermitted requests received at the ml endpoint, using HTTP basicauth headers as the authentication mechanism. This method returns a null value which indicates that the request to be processed. | public boolean handleRequest(Message message, ClassResourceInfo resourceInfo) {
if (logger.isDebugEnabled()) {
logger.debug(String.format("Authenticating request: " + message.getId()));
}
AuthorizationPolicy policy = message.get(AuthorizationPolicy.class);
if (policy == null) {
logger.error("Authentication failed: Basic authentication header is missing");
return false;
}
Object certObject = null;
String username = StringUtils.trim(policy.getUserName());
if (StringUtils.isEmpty(username)) {
logger.error("Username cannot be null/empty.");
return false;
}
return isUserPermitted(username, (String) message.get(Message.REQUEST_URI),
(String) message.get(Message.HTTP_REQUEST_METHOD), null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean isPermitted(HttpServletRequest request, int permittedRole) {\n boolean result = false;\n HttpSession session = request.getSession();\n String userName = (String) session.getAttribute(\"userName\");\n String token = (String) session.getAttribute(\"token\");\n int role = Integer.parseInt((String) session.getAttribute(\"role\"));\n if (userName != null && token != null) {\n CrUser user = userRepo.findByUserName(userName);\n if (user != null && isTokenValid(user, token) && role == permittedRole) {\n result = true;\n }\n }\n return result;\n }",
"@Override\n\tpublic boolean checkAuthorization(HttpServletRequest request) {\n\t\treturn true;\n\t}",
"UserPermissions authenticate (Request request);",
"boolean hasLoginRequest();",
"public boolean isAuthenticationRequired() {\n\t\treturn true;\n\t}",
"boolean authNeeded();",
"@GetMapping(\"/users/is-basic-user\")\n @ResponseStatus(HttpStatus.OK)\n public boolean isBasicUser(@AuthenticationPrincipal User user) {\n return userService.isBasicUser(user);\n }",
"public boolean isAuthRequired() {\n return !AfUtil.anyEmpty(_username);\n }",
"protected boolean filterBasic(final ContainerRequestContext requestContext, final String authHeader, final String authParam) {\n // decompose basic auth into username / password\n // create User+Password Hash\n final String decoded = new String(Base64.getUrlDecoder().decode(authHeader), StandardCharsets.UTF_8);\n final int colonPos = decoded.indexOf(':');\n if (colonPos > 0 && colonPos < decoded.length()) {\n final PasswordAuthentication passwordAuthentication = new PasswordAuthentication(decoded.substring(0, colonPos), decoded.substring(colonPos + 1));\n return filterAnyAuth(requestContext, authHeader, passwordAuthentication);\n } else {\n throwForbidden(requestContext);\n return true;\n }\n }",
"boolean hasCustomerUserAccess();",
"public boolean isSetRequesting_user() {\n return this.requesting_user != null;\n }",
"private void checkAuthorization(RoutingContext context, List<CaptureMap> resolvedCaptureCollections,\n Handler<AsyncResult<Boolean>> handler) {\n AuthHandler auth = context.get(AuthenticationController.AUTH_HANDLER_PROP);\n if (auth != null && auth instanceof RedirectAuthHandlerBt) {\n MemberUtil.getCurrentUser(context, getNetRelay(), result -> {\n if (result.failed()) {\n handler.handle(Future.failedFuture(result.cause()));\n } else {\n IAuthenticatable member = result.result();\n if (member == null) {\n // this is an error\n handler.handle(Future.failedFuture(\n new IllegalArgumentException(\"This should not happen, we need an instance of IAuthenticatable here\")));\n } else {\n checkAuthorization(resolvedCaptureCollections, auth, member, handler);\n }\n }\n });\n } else {\n handler.handle(Future.succeededFuture(true));\n }\n }",
"public static boolean authenticate(String preset, HttpServletRequest request) throws MnoException {\n\t\tString authHeader = request.getHeader(\"Authorization\");\n\t\tif (authHeader == null || authHeader.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\tString[] auth = authHeader.trim().split(\"\\\\s+\");\n\n\t\tif (auth == null || auth.length != 2 || !auth[0].equalsIgnoreCase(\"basic\")) {\n\t\t\treturn false;\n\t\t}\n\t\tbyte[] decodedStr = DatatypeConverter.parseBase64Binary(auth[1]);\n\t\tString[] creds;\n\t\ttry {\n\t\t\tcreds = (new String(decodedStr, \"UTF-8\")).split(\":\");\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\tthrow new MnoException(\"Could not decode basic authentication\" + Arrays.toString(auth));\n\t\t}\n\n\t\tif (creds.length == 2) {\n\t\t\treturn authenticate(preset, creds[0], creds[1]);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean isAuthenticated();",
"public boolean isAuthRequired() {\n\t\treturn false;\n\t}",
"@Override\n public boolean shouldApply(HttpServletRequest httpServletRequest) {\n boolean shouldApply = false;\n\n if (jwtProperties != null) {\n String serializedJWT = getJWTFromCookie(httpServletRequest);\n shouldApply = (serializedJWT != null && isAuthenticationRequired(serializedJWT));\n }\n\n return shouldApply;\n }",
"public boolean granted(){\n\t\treturn this.granted;\n\t}",
"@Override\n public boolean hasAccessPermission(String user, NamespaceKey key, DatasetConfig datasetConfig) {\n return userPredicate.test(user);\n }",
"@Override\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\n\t\t\tthrows Exception {\n\t\t System.err.println(\"URI -- \"+request.getRequestURL());\n\t\t if(request.getRequestURI()!=null &&\n\t\t (request.getRequestURI().contains(\"/self/login\"))) return true;\n\t\t \n\t\t \n\t\t String authHeader = request.getHeader(AUTH_HEADER);\n\t\t \n\t\t if (authHeader == null) { \n\t\t\t response.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t\t response.getOutputStream().write(TOKEN_EXPIRE_MSG.getBytes()); return false;\n\t\t }\n\t\t \n\t\t if (authHeader.contains(\"Basic \")) {\n\t\t \n\t\t String encodedUserNamePassword = authHeader.split(\"Basic \")[1]; String\n\t\t strValue = \"\";\n\t\t try\n\t\t { \n\t\t\t strValue = new String(java.util.Base64.getDecoder().decode(encodedUserNamePassword.getBytes(\n\t\t\t\t\t \t\t)), \"UTF-8\"); \n\t\t }\n\t\t catch (Exception e)\n\t\t { \n\t\t\t e.printStackTrace(); \n\t\t\t // TODO: handle exception return false; \n\t\t }\n\t\t \n\t\t String[] arrayOfString = strValue.split(\"\\\\:\");\n\t\t \n\t\t if (arrayOfString.length > 1) \n\t\t { \n\t\t\t \tString userName = arrayOfString[0]; String\n\t\t\t \tpassword = arrayOfString[1]; System.err.println(userName);\n\t\t\t \tSystem.err.println(password);\n\t\t \n\t\t\t \tpassword = Base64.getEncoder().encodeToString((password + \"\").getBytes(\"utf-8\")); \n\t\t\t \tUsernamePasswordAuthenticationToken\n\t\t\t \tusernamePasswordAuthenticationToken = new\n\t\t\t \tUsernamePasswordAuthenticationToken( userName, password);\n\t\t \n\t\t\t \tAuthentication authentication = null; \n\t\t\t \ttry { authentication =\n\t\t\t \t\t\tautheticationManager.authenticate(usernamePasswordAuthenticationToken);\n\t\t \n\t\t } catch (Exception ex) { \n\t\t\t ex.printStackTrace();\n\t\t\t response.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t\t response.getOutputStream().write(UNAUTHORISED_ACCESS_MSG.getBytes());\n\t\t \n\t\t\t return false; \n\t\t } \n\t\t if (authentication.isAuthenticated()) {\n\t\t\t SecurityContextHolder.getContext().setAuthentication(authentication);\n\t\t\t return true; \n\t\t } else { \n\t\t\t\n\t\t\tresponse.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t\t response.getOutputStream().write(UNAUTHORISED_ACCESS_MSG.getBytes()); \n\t\t\t return false; \n\t\t\t } \n\t\t } else { \n\t\t\t String encodedValue = authHeader.split(\"Basic \")[1];\n\t\t \n\t\t\t if (isValidToken(encodedValue)) return true;\n\t\t \n\t\t \tresponse.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t \tresponse.getOutputStream().write(TOKEN_EXPIRE_MSG.getBytes()); return false;\n\t\t }\n\t\t \n\t\t } \n\t\t response.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t response.getOutputStream().write(UNAUTHORISED_ACCESS_MSG.getBytes()); return\n\t\t false;\n\t\t \n\t\t\n\t}",
"@GetMapping(\"/authenticate\")\n @Timed\n public String isAuthenticated(HttpServletRequest request) {\n log.debug(\"REST request to check if the current user is authenticated\");\n return request.getRemoteUser();\n }",
"final public boolean requiresAuthentication()\r\n {\r\n return requires_AUT;\r\n }",
"public abstract boolean checkPolicy(User user);",
"public boolean hasPermission(String username, ActionContext ctx) {\r\n return username != null;\r\n }",
"public boolean supportsPreemptiveAuthorization() {\n/* 225 */ return true;\n/* */ }",
"private boolean hasPermission(String username, SOAPMessage msg) {\r\n\t\ttry {\r\n\t\t\tNodeList email = msg.getSOAPBody().getElementsByTagName(SOAP_EMAIL_TAG);\r\n\r\n\t\t\t// if request has email\r\n\t\t\tif(email.getLength() > 0) {\r\n\t\t\t\treturn username.equals(msg.getSOAPBody().getElementsByTagName(SOAP_EMAIL_TAG).item(0).getTextContent());\r\n\t\t\t}\r\n\t\t\t// if there's no email field, every user has permissions to access\r\n\t\t\treturn true;\r\n\t\t\t\r\n\t\t} catch (SOAPException e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"boolean hasAuth();",
"abstract public boolean checkAuth(String userId) throws IOException;",
"private boolean authenticationIsRequired(String username) {\n Authentication existingAuth = SecurityContextHolder.getContext().getAuthentication();\n\n if (existingAuth == null || !existingAuth.isAuthenticated()) {\n return true;\n }\n\n // Limit username comparison to providers which use usernames (ie\n // UsernamePasswordAuthenticationToken)\n // (see SEC-348)\n\n if (existingAuth instanceof UsernamePasswordAuthenticationToken && !existingAuth.getName().equals(username)) {\n return true;\n }\n\n // Handle unusual condition where an AnonymousAuthenticationToken is\n // already\n // present\n // This shouldn't happen very often, as BasicProcessingFitler is meant\n // to be\n // earlier in the filter\n // chain than AnonymousAuthenticationFilter. Nevertheless, presence of\n // both an\n // AnonymousAuthenticationToken\n // together with a BASIC authentication request header should indicate\n // reauthentication using the\n // BASIC protocol is desirable. This behaviour is also consistent with\n // that\n // provided by form and digest,\n // both of which force re-authentication if the respective header is\n // detected (and\n // in doing so replace\n // any existing AnonymousAuthenticationToken). See SEC-610.\n return existingAuth instanceof AnonymousAuthenticationToken;\n }",
"public boolean onSecurityCheck() {\n boolean continueProcessing = super.onSecurityCheck();\n if (!continueProcessing) {\n return false;\n }\n AuthorizationManager authzMan = getAuthorizationManager();\n try {\n if (!authzMan.canManageApplication(user)) {\n setRedirect(\"authorization-denied.htm\");\n return false;\n }\n return true;\n } catch (AuthorizationSystemException ex) {\n throw new RuntimeException(ex);\n }\n }",
"@Override\n public boolean isLoggedin(HttpServletRequest request) {\n boolean result = false;\n HttpSession session = request.getSession();\n String userName = (String) session.getAttribute(\"userName\");\n String token = (String) session.getAttribute(\"token\");\n if (userName != null && token != null) {\n CrUser user = userRepo.findByUserName(userName);\n if (user != null && isTokenValid(user, token)) {\n result = true;\n }\n }\n return result;\n }",
"public boolean isUserLoggedIn();",
"public Boolean isAuthorized(String userId);",
"private boolean checkPermissions(HttpServletRequest request, RouteAction route) {\n\t\treturn true;\n\t}",
"public boolean logAccess() {\n Map<String, String> response;\n try {\n response = logMessageService.sendRequestMessage(\"\");\n } catch (Exception exception) {\n LOGGER.warn(\"Log message could not be sent. [exception=({})]\", exception.getMessage());\n return allowAccess();\n }\n if (response != null) {\n return allowAccess();\n } else {\n LOGGER.warn(\"No response received.\");\n return allowAccess();\n }\n }",
"private ModelAndView handleScriptBasicAuth(HttpServletRequest request, HttpServletResponse response)\n {\n\tfinal HttpSession session = request.getSession();\n\tString http_basic_auth = null, http_basic_auth_username = null, http_basic_auth_password = null, openid = null;\n\tBoolean user_authenticated = false;\n\tbyte[] byteArray = null;\n\thttp_basic_auth = request.getHeader(\"Authorization\");\n\t \n\t \n\tString http_basic_auth_enc = http_basic_auth.replaceAll(\"Basic \", \"\");\n\tbyteArray = Base64.decodeBase64(http_basic_auth_enc.getBytes());\n\tString http_basic_auth_dec = new String(byteArray);\n\tString[] parts = http_basic_auth_dec.split(\":\");\n\thttp_basic_auth_username = parts[0];\n\thttp_basic_auth_password = parts[1];\n\t \n\tif (LOG.isDebugEnabled()) LOG.debug(\"Attempting authentication with user=\"+http_basic_auth_username+\" password=\"+http_basic_auth_password);\n\t\t\n\tuser_authenticated = idp.authenticate_ids(http_basic_auth_username, http_basic_auth_password);\n\topenid = idp.getOpenid(http_basic_auth_username);\t\t\n\t\t\n\tif((user_authenticated) && (openid != null)) \n\t{\n\t return setPositiveSessionAuth(session, openid);\n\t} \n\telse\n\t{\n\t // set session-scope authentication flag to FALSE\n\t session.setAttribute(OpenidPars.SESSION_ATTRIBUTE_AUTHENTICATED, Boolean.FALSE);\n\t if (LOG.isDebugEnabled()) LOG.debug(\"Authentication error\");\n\t response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n\t return null;\n\t}\n }",
"private boolean isAuthenticated(final ContainerRequestContext requestContext) {\n // Return true if the user is authenticated or false otherwise\n return requestContext.getSecurityContext().getUserPrincipal() != null;\n }",
"protected boolean mustTunnel (RequestHandler rh) {\n\tString auth = request.getHeader (\"Authorization\");\n\tif (auth != null) {\n\t if (auth.startsWith (\"NTLM\") || auth.startsWith (\"Negotiate\"))\n\t\treturn true;\n\t}\n\treturn false;\n }",
"public boolean isAuthenticated() {\r\n\t\treturn user != null;\r\n\t}",
"public void isAllowed(String user) {\n \r\n }",
"@Override\n\tprotected void doIsPermitted(String arg0, Handler<AsyncResult<Boolean>> arg1) {\n\t\t\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t\tString path = request.getRequestURI();\r\n\t\tString[] parts = path.split(\"/\");\r\n\t\tm.setMessage(\"The requested access is not permitted\");\r\n\t\tstatus = 401;\r\n\r\n\t\tSystem.out.println(\"User requested \" + Integer.parseInt(parts[3]));\r\n\t\tHttpSession session = request.getSession();\r\n\t\tPrintWriter pw = response.getWriter();\r\n\t\tUser currentUser = (User) session.getAttribute(\"currentUser\");\r\n\r\n\t\tif (currentUser != null) {\r\n\t\t\tUser userRequested = UserService.findUserByID(currentUser.getUserId(), Integer.parseInt(parts[3]),\r\n\t\t\t\t\tcurrentUser.getRole().getRoleId());\r\n\r\n\t\t\tif (userRequested != null) {\r\n\t\t\t\tpw.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(userRequested));\r\n\t\t\t\tstatus = 200;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tpw.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(m));\r\n\t\t}\r\n\t\tresponse.setStatus(status);\r\n\r\n\t}",
"@Override\n protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {\n logger.info(\"authentication filter enabled\");\n if (JwtUtils.isBasicAuth(request)){\n chain.doFilter(request, response);\n } else {\n UsernamePasswordAuthenticationToken authenticationToken = getAuthentication(request);\n SecurityContextHolder.getContext().setAuthentication(authenticationToken);\n chain.doFilter(request, response);\n }\n }",
"Boolean acceptRequest(User user);",
"@Override\n public boolean filterAuthenticated(final ContainerRequestContext requestContext, final String authHeader) {\n if (authHeader.length() <= MAX_SIZE_AUTH_HEADER && goodAuths.getIfPresent(authHeader) != null) {\n // fast track - we have successfully authenticated this one before\n return false; // OK\n }\n\n // must have valid authentication - first, check allowed size (depending on method)\n final int firstSpace = authHeader.indexOf(' ');\n if (firstSpace <= 0) {\n throwForbidden(requestContext);\n return true; // filtered\n }\n final String typeOfAuth = authHeader.substring(0, firstSpace + 1); // add 1 because the constant includes the space\n final String authParam = authHeader.substring(firstSpace + 1);\n final int authLength = authParam.length();\n\n try {\n switch (typeOfAuth) {\n case T9tConstants.HTTP_AUTH_PREFIX_JWT:\n if (!allowAuthJwt()) {\n throwForbidden(requestContext);\n return true; // filtered\n }\n if (authLength < 10 || authLength > 4096) { // || !BASE64_PATTERN.matcher(authParam).matches()) {\n LOGGER.debug(\"Invalid JWT - length {}\", authLength);\n throwForbidden(requestContext);\n return true; // filtered\n }\n return filterJwt(requestContext, authHeader, authParam);\n case T9tConstants.HTTP_AUTH_PREFIX_API_KEY:\n if (!allowAuthApiKey() || authLength != 36 || !UUID_PATTERN.matcher(authParam).matches()) {\n LOGGER.debug(\"Invalid UUID - length {}\", authLength);\n throwForbidden(requestContext);\n return true; // filtered\n }\n return filterApiKey(requestContext, authHeader, authParam);\n case T9tConstants.HTTP_AUTH_PREFIX_USER_PW:\n if (!allowAuthBasic() || authLength < 8 || authLength > 80 || !BASE64_PATTERN.matcher(authParam).matches()) {\n throwForbidden(requestContext);\n return true; // filtered\n }\n return filterBasic(requestContext, authHeader, authParam);\n }\n } catch (final Throwable e) {\n LOGGER.warn(\"Caller caused exception: {}\", ExceptionUtil.causeChain(e));\n }\n throwForbidden(requestContext);\n return true; // filtered\n }",
"public boolean canHandle(HttpServletRequest request) {\n if (log.isDebugEnabled()) {\n log.debug(\"Inside Token2Authenticator canHandle method\");\n }\n return StringUtils.isNotEmpty(request.getParameter(Token2Constants.CODE));\n }",
"@Override\n\tpublic boolean can(String permission)\n\t{\n\t\treturn this.auth() != null && this.auth().getRole() != null && this.auth().getRole().getPermissions().parallelStream().filter(p -> Pattern.compile(p.getName()).matcher(permission).groupCount() == 0).count() != 0;\n\t}",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"@Override\n\tprotected boolean isAccessAllowed(ServletRequest arg0, ServletResponse arg1, Object arg2) throws Exception {\n\t\tString header = ((HttpServletRequest) arg0).getHeader(\"X-Requested-With\");\n\t\tif (ShiroUtil.getShiroUser() != null) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif (\"XMLHttpRequest\".equalsIgnoreCase(header)) {\n\t\t\t\t// ajax判断是否登陆,并可返回json\n\t\t\t\targ1.setCharacterEncoding(\"utf-8\");\n\t\t\t\targ1.getWriter().write(\"用户登录失效,重新登录\");\n\t\t\t}\n\n\t\t}\n\t\treturn false;\n\n\t}",
"@Override\n protected boolean isAuthorized(PipelineData pipelineData) throws Exception\n {\n \t// use data.getACL() \n \treturn true;\n }",
"private boolean permisos() {\n for(String permission : PERMISSION_REQUIRED) {\n if(ContextCompat.checkSelfPermission(getContext(), permission) != PackageManager.PERMISSION_GRANTED) {\n return false;\n }\n }\n return true;\n }",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"public boolean hasPerms()\n {\n return ContextCompat.checkSelfPermission(itsActivity, itsPerm) ==\n PackageManager.PERMISSION_GRANTED;\n }",
"private boolean authenticate (HttpRequest request, HttpResponse response) throws UnsupportedEncodingException\n\t{\n\t\tString[] requestSplit=request.getPath().split(\"/\",3);\n\t\tif(requestSplit.length<2)\n\t\t\treturn false;\n\t\tString serviceName=requestSplit[1];\n\t\tfinal int BASIC_PREFIX_LENGTH=\"BASIC \".length();\n\t\tString userPass=\"\";\n\t\tString username=\"\";\n\t\tString password=\"\";\n\t\t\n\t\t//Check for authentication information in header\n\t\tif(request.hasHeaderField(AUTHENTICATION_FIELD)\n\t\t\t\t&&(request.getHeaderField(AUTHENTICATION_FIELD).length()>BASIC_PREFIX_LENGTH))\n\t\t{\n\t\t\tuserPass=request.getHeaderField(AUTHENTICATION_FIELD).substring(BASIC_PREFIX_LENGTH);\n\t\t\tuserPass=new String(Base64.decode(userPass), \"UTF-8\");\n\t\t\tint separatorPos=userPass.indexOf(':');\n\t\t\t//get username and password\n\t\t\tusername=userPass.substring(0,separatorPos);\n\t\t\tpassword=userPass.substring(separatorPos+1);\n\t\t\t\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tlong userId;\n\t\t\t\tAgent userAgent;\n\t\t\t\t\n\t\t\t\tif ( username.matches (\"-?[0-9].*\") ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tuserId = Long.valueOf(username);\n\t\t\t\t\t} catch ( NumberFormatException e ) {\n\t\t\t\t\t\tthrow new L2pSecurityException (\"The given user does not contain a valid agent id!\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tuserId = l2pNode.getAgentIdForLogin(username);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tuserAgent = l2pNode.getAgent(userId);\n\t\t\t\t\n\t\t\t\tif ( ! (userAgent instanceof PassphraseAgent ))\n\t\t\t\t\tthrow new L2pSecurityException (\"Agent is not passphrase protected!\");\n\t\t\t\t((PassphraseAgent)userAgent).unlockPrivateKey(password);\n\t\t\t\t_currentUserId=userId;\n\t\t\t\t\n\t\t\t\tif(!_userSessions.containsKey(userId))//if user not registered\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tMediator mediator = l2pNode.getOrRegisterLocalMediator(userAgent);\n\t\t\t\t\t_userSessions.put(userId, new UserSession(mediator));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t_userSessions.get(userId).updateServiceTime(serviceName,new Date().getTime());//update last access time for service\n\t\t\t\t\n\t\t\t\tconnector.logMessage(\"Login: \"+username);\n\t\t\t\tconnector.logMessage(\"Sessions: \"+Integer.toString(_userSessions.size()));\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t}catch (AgentNotKnownException e) {\n\t\t\t\tsendUnauthorizedResponse(response, null, request.getRemoteAddress() + \": login denied for user \" + username);\n\t\t\t} catch (L2pSecurityException e) {\n\t\t\t\tsendUnauthorizedResponse( response, null, request.getRemoteAddress() + \": unauth access - prob. login problems\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t\n\t\t\t\tsendInternalErrorResponse(\n\t\t\t\t\t\tresponse, \n\t\t\t\t\t\t\"The server was unable to process your request because of an internal exception!\", \n\t\t\t\t\t\t\"Exception in processing create session request: \" + e);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresponse.setStatus ( HttpResponse.STATUS_BAD_REQUEST );\n\t\t\tresponse.setContentType( \"text/plain\" );\n\t\t\tresponse.print ( \"No authentication provided!\" );\n\t\t\tconnector.logError( \"No authentication provided!\" );\n\t\t}\n\t\treturn false;\n\t}",
"@JsonProperty(\"granted\")\n public boolean isGranted() {\n return granted;\n }",
"void checkPermission(T request) throws AuthorizationException;",
"public boolean isUserAuthorized(String userName) throws Exception {\n HDFSNameNodeComponentManager componentManager = HDFSNameNodeComponentManager.getInstance();\n boolean isUserexist = componentManager.getRealmForCurrentTenant().getUserStoreManager().isExistingUser(userName);\n List<String> userRoles = Arrays.asList(componentManager.getRealmForCurrentTenant().getUserStoreManager().getRoleListOfUser(userName));\n //get protocol list\n //authorize user to protocol\n if (isUserexist) {\n return true;\n }\n return false;\n\n }",
"boolean getIsAuthorized();",
"@Override\n\tprotected boolean isAccessAllowed(ServletRequest request,\n\t\t\tServletResponse response, Object mappedValue) {\n\t\treturn false;\n\t}",
"@Override\n\tprotected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)\n\t\t\tthrows ServletException, IOException {\n\t\tfinal String authorizationHeader = request.getHeader(\"Authorization\"); // getting the header from the header name\n\t\t\n\t\tString username = null;\n\t\tString jwt = null;\n\t\t\n\t\ttry {\n\t\t\tif (authorizationHeader != null && authorizationHeader.startsWith(\"Bearer \")) {\n\t\t\t\tjwt = authorizationHeader.substring(7);\n\t\t\t\tusername = jwtUtil.extractUsername(jwt);\n\t\t\t}\n\t\t\t\n\t\t\t// if username is null and there is no already existing context in security context holder\n\t\t\tif (username != null && SecurityContextHolder.getContext().getAuthentication() == null) {\n\t\t\t\tUserDetails userDetails = this.userDetailsService.loadUserByUsername(username);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"<----------------------------\"+userDetails.getAuthorities());\n\t\t\t\t\n\t\t\t\tif (jwtUtil.validateToken(jwt)) { // checking if the token still exist or has not expired\n\t\t\t\t\tUsernamePasswordAuthenticationToken upaToken = new UsernamePasswordAuthenticationToken(\n\t\t\t\t\t\t\tuserDetails, null, userDetails.getAuthorities());\n\t\t\t\t\tupaToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));\n\t\t\t\t\t\n\t\t\t\t\tSecurityContextHolder.getContext().setAuthentication(upaToken);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Can NOT set user authentication -> Message: {}\", e);\n\t\t}\n\t\t\n\t\tfilterChain.doFilter(request, response);\n\t\t\n\t}",
"@Override\n protected String requiredGetPermission() {\n return \"user\";\n }",
"@Override\n\tpublic AuthorizationResponse decide(HttpServletRequest request,\n\t\t\tMap<String, String> additionalAttrs) {\n\t\tlog.trace (\"Entering decide()\");\n\t\t\n\t\tboolean decision = false;\n\t\t\n\t\t// Extract interesting parts of the HTTP request\n\t\tString method = request.getMethod();\n\t\tAuthzResource resource = new AuthzResource(request.getRequestURI());\n\t\tString subject = (request.getHeader(SUBJECT_HEADER));\t\t // identity of the requester\n\t\tString subjectgroup = (request.getHeader(SUBJECT_HEADER_GROUP)); // identity of the requester by group Rally : US708115\n\n\t\tlog.trace(\"Method: \" + method + \" -- Type: \" + resource.getType() + \" -- Id: \" + resource.getId() + \n\t\t\t\t\" -- Subject: \" + subject);\n\t\t\n\t\t// Choose authorization method based on the resource type\n\t\tResourceType resourceType = resource.getType();\n\t\tif (resourceType != null) {\n\n\t\t\tswitch (resourceType) {\n\n\t\t\tcase FEEDS_COLLECTION:\n\t\t\t\tdecision = allowFeedsCollectionAccess(resource, method, subject, subjectgroup);\n\t\t\t\tbreak;\n\n\t\t\tcase SUBS_COLLECTION:\n\t\t\t\tdecision = allowSubsCollectionAccess(resource, method, subject, subjectgroup);\n\t\t\t\tbreak;\n\n\t\t\tcase FEED:\n\t\t\t\tdecision = allowFeedAccess(resource, method, subject, subjectgroup);\n\t\t\t\tbreak;\n\n\t\t\tcase SUB:\n\t\t\t\tdecision = allowSubAccess(resource, method, subject, subjectgroup);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tdecision = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tlog.debug(\"Exit decide(): \" + method + \"|\" + resourceType + \"|\" + resource.getId() + \"|\" + subject + \" ==> \" + decision);\n\t\t\n\t\treturn new AuthRespImpl(decision);\n\t}",
"private boolean verifyParameters(HttpServletRequest req, User loggedUser){\r\n\t\ttry{\r\n\t\t\tString requestedUserParam = queryStringMap.get(\"user\");\r\n\t\t\tif( requestedUserParam==null ){ return false; }\r\n\t\t\trequestedUserId = Long.parseLong( requestedUserParam );\r\n\t\t\trequestedUser = BeanUserView.getUserByIdStatic( requestedUserId );\r\n\t\t\tif( requestedUser==null ){ return false; }\r\n\t\t\telse{\r\n\t\t\t\tif( requestedUser.getRemoved() ){ return false; }\r\n\t\t\t\telse{ return true; }\r\n\t\t\t}\r\n\t\t} catch( NumberFormatException nfe ){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"@Override\n public void filter(ContainerRequestContext requestContext) throws IOException {\n // Get the Authorization header from the request\n String authorizationHeader =\n requestContext.getHeaderString(HttpHeaders.AUTHORIZATION);\n\n // Validate the Authorization header\n if (!isTokenBasedAuthentication(authorizationHeader)) {\n abortWithUnauthorized(requestContext);\n return;\n }\n\n // Extract the token from the Authorization header\n String token = authorizationHeader\n .substring(AUTHENTICATION_SCHEME.length()).trim();\n\n try {\n\n // Validate the token\n Jws<Claims> claims = validateToken(token);\n ArrayList userGroups = getUserGroups(claims);\n Permissions[] perms = getPermissionsNeeded(requestContext);\n\n authorize(userGroups, perms);\n\n } catch (Exception e) {\n abortWithUnauthorized(requestContext);\n }\n }",
"public abstract boolean isLoginRequired();",
"public boolean hasUser() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasUser() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"@Override\n\tprotected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue)\n\t\t\tthrows Exception {\n\t\treturn false;\n\t}",
"protected Boolean hasAccess(RMApp app, HttpServletRequest hsr) {\n UserGroupInformation callerUGI = getCallerUserGroupInformation(hsr, true);\n List<String> forwardedAddresses = null;\n String forwardedFor = hsr.getHeader(RMWSConsts.FORWARDED_FOR);\n if (forwardedFor != null) {\n forwardedAddresses = Arrays.asList(forwardedFor.split(\",\"));\n }\n if (callerUGI != null\n && !(this.rm.getApplicationACLsManager().checkAccess(callerUGI,\n ApplicationAccessType.VIEW_APP, app.getUser(),\n app.getApplicationId())\n || this.rm.getQueueACLsManager().checkAccess(callerUGI,\n QueueACL.ADMINISTER_QUEUE, app, hsr.getRemoteAddr(),\n forwardedAddresses))) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean check() {\n return GlobalParams.isLogin();\n }",
"public boolean isSetUser() {\n return this.user != null;\n }",
"public boolean isSetUser() {\n return this.user != null;\n }",
"@Override\n\tpublic boolean match(Request request) {\n\t\tString header = request.getHeader(HEADER_AUTHORIZATION);\n\t\treturn (header != null)\n\t\t\t&& (Pattern.matches(\"^\\\\s*(OAuth|Bearer)(.*)$\", header));\n\t}",
"boolean isAuthorized(SiteUser user, Long transmissionId);",
"boolean hasLoginResponse();",
"private boolean requestUserLogin() {\n\t\tServerAPITask userTasks = new ServerAPITask();\n\t\tString uName = usernameField.getText().toString();\n\t\tuserTasks.setAPIRequest(\"http://riptide.alexkersten.com:3333/stoneapi/account/lookup/\" + uName);\n\t\ttry {\n\t\t\tString response = userTasks.execute(\"\").get();\n\t\t\tLog.e(\"Response String\", response);\n\t\t\t\n\t\t\tjsonResponse = new JSONArray(response);\n\t\t\tif (jsonResponse.length() < 1) {\n\t\t\t\tToast.makeText(this.getContext(), \"The username does not exist\", Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tJSONObject jsObj = jsonResponse.getJSONObject(0);\n\t\t\t\tif (jsObj == null) {\n\t\t\t\t\tToast.makeText(this.getContext(), \"An error occurred while retrieving user\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString _user_id = jsObj.getString(\"_id\");\n\t\t\t\t\tPreferencesUtil.saveToPrefs(userContext, PreferencesUtil.PREFS_LOGIN_USER_ID_KEY, _user_id);\n\t\t\t\t\t\n\t\t\t\t\tPreferencesUtil.saveToPrefs(userContext, PreferencesUtil.PREFS_LOGIN_USERNAME_KEY, uName);\n\t\t\t\t\t((Activity) userContext).getActionBar().setTitle(\"Stone - \" + uName);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t\treturn true;\n\t}",
"@Override\n public void filter(ContainerRequestContext requestContext) throws IOException {\n String authorizationHeader =\n requestContext.getHeaderString(HttpHeaders.AUTHORIZATION);\n\n // Validate the Authorization header\n if (!isTokenBasedAuthentication(authorizationHeader)) {\n abortWithUnauthorized(requestContext);\n return;\n }\n\n // Extract the token from the Authorization header\n String token = authorizationHeader\n .substring(AUTHENTICATION_SCHEME.length()).trim();\n\n try {\n // Check if the token is valid\n validateToken(token);\n\n //extract the data you need\n String username = Jwts.parser().setSigningKey(keyGenerator.getKey()).parseClaimsJws(token).getBody().getIssuer();\n if (username!=null) {\n final SecurityContext securityContext = requestContext.getSecurityContext();\n requestContext.setSecurityContext(new SecurityContext() {\n @Override\n public Principal getUserPrincipal() {\n return new Principal() {\n @Override\n public String getName() {\n return username;\n }\n };\n }\n @Override\n public boolean isUserInRole(String permission) {\n\n List<RoleEntity> roleEntities = userDao.getUserByUsername(username).getRoleEntityList();\n List<PermissionEntity> permissionEntities = new ArrayList<>();\n\n //creating the list containg all the permissionsAllowed\n for (RoleEntity r : roleEntities) {\n for (PermissionEntity p : r.getPermissionEntityList()) {\n if (!permissionEntities.contains(p)) {\n permissionEntities.add(p);\n }\n }\n\n }\n\n List<String> permissionStrings = new ArrayList<>();\n\n //getting all the types (description and id are not important)\n for (PermissionEntity p : permissionEntities) {\n permissionStrings.add(p.getType());\n }\n\n //returns true if the list contains the permission given as parameter\n for (String p : permissionStrings) {\n if (p.equals(permission)) {\n return true;\n }\n }\n return false;\n }\n @Override\n public boolean isSecure() {\n return true;\n }\n @Override\n public String getAuthenticationScheme() {\n return AUTHENTICATION_SCHEME;\n }\n });\n }\n //getting value from annotation\n Method resourceMethod = resourceInfo.getResourceMethod();\n Secured secured = resourceMethod.getAnnotation(Secured.class);\n if (secured != null){\n List<String> permissionStrings = new ArrayList<>();\n for (SecurityPermission s : secured.permissionsAllowed()) {\n permissionStrings.add(s.getText());\n }\n\n //performing authorization\n if (permissionStrings.size() > 0 && !isAuthenticated(requestContext)) {\n refuseRequest();\n }\n\n for (String role : permissionStrings) {\n if (requestContext.getSecurityContext().isUserInRole(role)) {\n return;\n }\n else {\n throw new AuthentificationException(ExceptionMessageCatalog.NOT_ALLOWED);\n }\n }\n\n refuseRequest();\n }\n } catch (AuthentificationException e) {\n abortWithUnauthorized(requestContext);\n }\n }",
"@Override\n public F.Promise<Optional<Result>> beforeAuthCheck(Http.Context context) {\n return F.Promise.pure(Optional.empty());\n }",
"boolean hasUserManaged();",
"public static boolean authenticate(HttpServletRequest request) throws MnoException {\n\t\treturn authenticate(DEFAULT, request);\n\t}",
"@GET\n @Path(\"LoggedIn\")\n public boolean isLoggedIn() {\n return SecurityUtils.getSubject().isRemembered() || SecurityUtils.getSubject().isAuthenticated();\n }",
"@SuppressWarnings(\"rawtypes\")\n @Override\n protected void doFilterInternal(@NonNull HttpServletRequest request, @NonNull HttpServletResponse response, @NonNull FilterChain chain) throws IOException, ServletException {\n if (permissiveRequest(request)) {\n chain.doFilter(request, response);\n return;\n }\n\n CrustUserInfo authResult = null;\n AuthenticationException failed = null;\n Crust crust = CrustContext.get();\n // check request header has token\n if (!requiresAuthentication(request, response)) {\n failed = new InsufficientAuthenticationException(\"Required token is not set.\");\n } else {\n String token = crust.getToken(true);\n try {\n if (StringUtils.isNotBlank(token)) {\n authResult = crust.getAuthInfoFromToken(token);\n } else {\n failed = new InsufficientAuthenticationException(\"Token is not exists.\");\n }\n } catch (ClaimJwtException e) {\n failed = new InsufficientAuthenticationException(e.getMessage());\n } catch (AuthenticationException e) {\n // Authentication failed!\n failed = e;\n }\n }\n\n if (authResult != null) {\n Authentication authentication = crust.getContext().getAuthentication();\n // null if getting from cache, it's need active authentication.\n if (authentication == null) {\n crust.activeAuthentication(authResult);\n authentication = crust.getContext().getAuthentication();\n }\n successfulAuthentication(request, response, chain, authentication);\n } else {\n unsuccessfulAuthentication(request, response, failed);\n return;\n }\n chain.doFilter(request, response);\n }",
"public boolean accept(WikiSystem wiki, WebContext wc, WikiUser user) {\n Enumeration enum = wc.getRequest().getParameterNames();\n \n // don't accept if we have request parameters\n if (enum.hasMoreElements())\n return false;\n \n // and then only accept if this is a get request\n return wc.getRequest().getMethod().equalsIgnoreCase(\"GET\");\n }",
"protected boolean isBasicAuth(String header) {\n if (header == null) return false;\n\n // if its not a Basic header we deny the access\n if (header.length() < BASIC_AUTH.length()) return false;\n String pre = header.substring(0,BASIC_AUTH.length());\n if (!pre.toLowerCase().equals(BASIC_AUTH.toLowerCase())) return false;\n return true;\n }",
"public interface Authentication extends Component {\n /**\n * Given an incoming HTTP request, determine who the user is and create a UserPermissions object with that\n * information. If the user cannot be identified and/or authenticated, don't set those attributes and throw an\n * exception. Otherwise return a UserPermissions object.\n */\n UserPermissions authenticate (Request request);\n}",
"private boolean isAuthenticationRequired(String token) {\n Authentication existingAuth = SecurityContextHolder.getContext().getAuthentication();\n\n //authenticate if no auth\n if (existingAuth == null || !existingAuth.isAuthenticated()) {\n return true;\n }\n\n //revalidate if token was changed\n if (existingAuth instanceof JwtAuthentication && !StringUtils.equals(token, (String) existingAuth.getCredentials())) {\n return true;\n }\n\n //always try to authenticate in case of anonymous user\n if (existingAuth instanceof AnonymousAuthenticationToken) {\n return true;\n }\n\n return false;\n }"
]
| [
"0.5796731",
"0.57621485",
"0.5680389",
"0.55889755",
"0.5565422",
"0.55564827",
"0.5544465",
"0.55241066",
"0.5435833",
"0.5378283",
"0.5365524",
"0.5326487",
"0.53066766",
"0.5296956",
"0.52835053",
"0.5276834",
"0.5267661",
"0.5243893",
"0.52410114",
"0.52155876",
"0.5215359",
"0.51919955",
"0.5191974",
"0.51752037",
"0.5167317",
"0.5165669",
"0.51552856",
"0.5150952",
"0.5144185",
"0.513847",
"0.51380867",
"0.51354706",
"0.5128144",
"0.5127094",
"0.51254374",
"0.51244724",
"0.5123905",
"0.5110639",
"0.5106715",
"0.50979006",
"0.50806",
"0.50777894",
"0.5065031",
"0.5051205",
"0.5050207",
"0.5041344",
"0.5024105",
"0.5024105",
"0.5024105",
"0.5024105",
"0.5024105",
"0.5024105",
"0.5024105",
"0.5012182",
"0.50106573",
"0.50091314",
"0.50078994",
"0.50078994",
"0.50078994",
"0.50078994",
"0.50078994",
"0.50078994",
"0.50078994",
"0.50078994",
"0.50078994",
"0.50078994",
"0.4988489",
"0.49841583",
"0.49806926",
"0.497737",
"0.49560794",
"0.49557734",
"0.49493167",
"0.49475697",
"0.49410743",
"0.49252442",
"0.4920081",
"0.49161884",
"0.4914651",
"0.49047574",
"0.48926866",
"0.48883727",
"0.48871654",
"0.4877276",
"0.4868485",
"0.4868485",
"0.4863085",
"0.48593765",
"0.48571748",
"0.48357695",
"0.48348537",
"0.48333207",
"0.48308346",
"0.48289812",
"0.48223358",
"0.48197278",
"0.48184022",
"0.4816729",
"0.48046598",
"0.4804132"
]
| 0.60491943 | 0 |
Constructor de la clase componente. | public Componente(Image image, Componente entrada1, Componente entrada2,String name) {
Image = image;
Entrada1=entrada1;
Entrada2=entrada2;
Name=name;
Output=2;
ID=IDt;
IDt++;
input=false;
input1=2;
input2=2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Constructor() {\r\n\t\t \r\n\t }",
"public Constructor(){\n\t\t\n\t}",
"public Pasien() {\r\n }",
"public Component() {\n }",
"public AntrianPasien() {\r\n\r\n }",
"public Curso() {\r\n }",
"public Carrera(){\n }",
"public CadastroComplemento() {\n initComponents();\n \n }",
"public Coche() {\n super();\n }",
"public Chauffeur() {\r\n\t}",
"public Alojamiento() {\r\n\t}",
"public Caso_de_uso () {\n }",
"public Livro() {\n\n\t}",
"public CyanSus() {\n\n }",
"public Cohete() {\n\n\t}",
"public Captura() {\n initComponents();\n }",
"public Cgg_jur_anticipo(){}",
"public Corso() {\n\n }",
"public SlanjePoruke() {\n }",
"public prueba()\r\n {\r\n }",
"public Propuestas() {}",
"public Odontologo() {\n }",
"public Ajuda() {\n initComponents();\n }",
"public Carrinho() {\n\t\tsuper();\n\t}",
"public Exercicio(){\n \n }",
"public Oddeven() {\n initComponents();\n }",
"public TelaSobre() {\n initComponents();\n }",
"protected Asignatura()\r\n\t{}",
"public Vehiculo() {\r\n }",
"public AnaPencere() {\n initComponents();\n }",
"public Genio() {\n initComponents();\n }",
"public Troco() {\n }",
"public TelaPesquisa() {\n initComponents();\n }",
"private ControleurAcceuil(){ }",
"public Cadastro() {\n initComponents();\n }",
"public Clade() {}",
"public SgaexpedbultoImpl()\n {\n }",
"public Conteo() {\n initComponents();\n }",
"public Boleta(){\r\n\t\tsuper();\r\n\t}",
"private TMCourse() {\n\t}",
"public Composante() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public EnsembleLettre() {\n\t\t\n\t}",
"public Busca(){\n }",
"public PSRelation()\n {\n }",
"public Supercar() {\r\n\t\t\r\n\t}",
"public Plato(){\n\t\t\n\t}",
"public Inventario() {\n initComponents();\n }",
"public InventarioControlador() {\n }",
"public Carrera() {\n initComponents();\n }",
"public Tela() {\n initComponents();\n }",
"public Interfaz() {\n initComponents();\n }",
"public Interfaz() {\n initComponents();\n }",
"public Interfaz() {\n initComponents();\n }",
"public Libro() {\r\n }",
"public Contato() {\n }",
"public Cadastros() {\n initComponents();\n }",
"public VComponente() {\n initComponents();\n }",
"public empleado() {\n initComponents();\n }",
"public TCubico(){}",
"public Nota() {\n }",
"public CSSTidier() {\n\t}",
"public LecturaPorEvento() \r\n {\r\n }",
"public Livre() {\r\n super();\r\n }",
"public UConnecte() {\n\t\tsuper();\n\t}",
"public CarteCaisseCommunaute() {\n super();\n }",
"public Achterbahn() {\n }",
"public Vencimientos() {\n initComponents();\n \n \n }",
"public Caixa() {\n initComponents();\n }",
"public TebakNusantara()\n {\n }",
"public Lanceur() {\n\t}",
"public Classe() {\r\n }",
"public LibroDiario() {\n initComponents();\n }",
"public TelaContaUnica() {\n initComponents();\n }",
"public ContaBancaria() {\n }",
"public CorreoElectronico() {\n }",
"public DetArqueoRunt () {\r\n\r\n }",
"public Pitonyak_09_02() {\r\n }",
"public AfiliadoVista() {\r\n }",
"public Kullanici() {}",
"public Libros() {\n initComponents();\n }",
"public Sobre() {\n\t\tsuper();\n\t\tinitialize();\n\t}",
"public Botonera() {\n initComponents();\n }",
"public Ov_Chipkaart() {\n\t\t\n\t}",
"public Stagiaire() {\n initComponents();\n }",
"public JSFOla() {\n }",
"private UsineJoueur() {}",
"public AsosiyOyna() {\n initComponents();\n }",
"public Excellon ()\n {}",
"public misTutores() {\n initComponents();\n }",
"public Lienzo() {\n initComponents();\n }",
"public TelaAgendamento() {\n initComponents();\n }",
"public TelaInicial() {\n initComponents();\n }",
"public TelaInicial() {\n initComponents();\n }",
"public Veiculo() {\r\n\r\n }",
"public mitigacao() {\n initComponents();\n }",
"public Anggota() {\n initComponents();\n }",
"public Altas() {\n initComponents();\n }",
"public Aktie() {\n }",
"public TelaConversao() {\n initComponents();\n }",
"public Ctacliente() {\n\t}",
"public Tra() {\n super();\n initComponents();\n loadData();\n }"
]
| [
"0.8157319",
"0.7694207",
"0.7605625",
"0.7595417",
"0.74869263",
"0.7462998",
"0.74312466",
"0.7412561",
"0.74074936",
"0.7402376",
"0.73905385",
"0.73668146",
"0.7313459",
"0.7303904",
"0.7296205",
"0.72679126",
"0.7267081",
"0.7244566",
"0.7238459",
"0.7233183",
"0.71933424",
"0.7193042",
"0.7185242",
"0.71774375",
"0.71764606",
"0.71506464",
"0.7147453",
"0.71371186",
"0.71326536",
"0.7132227",
"0.71198815",
"0.7115867",
"0.7112775",
"0.7111842",
"0.71046597",
"0.710383",
"0.7099987",
"0.7090372",
"0.7086785",
"0.7079828",
"0.7074105",
"0.7069852",
"0.7065759",
"0.7061886",
"0.70433414",
"0.70314443",
"0.70309854",
"0.70290595",
"0.70288575",
"0.70258784",
"0.7012158",
"0.7012158",
"0.7012158",
"0.7011061",
"0.7009038",
"0.70087755",
"0.70068717",
"0.7006708",
"0.7003001",
"0.70019245",
"0.7001167",
"0.6995344",
"0.6993475",
"0.69912565",
"0.69891113",
"0.6982822",
"0.6980871",
"0.6974082",
"0.6973953",
"0.6972963",
"0.69716364",
"0.696992",
"0.696926",
"0.6967241",
"0.69619274",
"0.6951688",
"0.69486207",
"0.6946779",
"0.69389594",
"0.6937455",
"0.69360036",
"0.6935727",
"0.6930433",
"0.6928449",
"0.69249797",
"0.6923435",
"0.6919623",
"0.6916564",
"0.69097435",
"0.69080555",
"0.6906831",
"0.69048756",
"0.69048756",
"0.6902161",
"0.6901179",
"0.6900665",
"0.6896432",
"0.68939966",
"0.68920505",
"0.6884058",
"0.68750155"
]
| 0.0 | -1 |
Metodo para establecer un input | @Override
public void setPrimeraEntrada(Componente entrada) {
if(Name.equals("NOT")){
Entrada1=entrada;
Entrada2=entrada;
}else {
this.Entrada1 = entrada;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getInput();",
"public void setInput(String input) { this.input = input; }",
"public abstract void input();",
"public void setInput(String input){\n this.input = input;\n }",
"public void setInput(String input);",
"protected abstract void getInput();",
"@Override\n\tpublic void input() {\n\t\t\n\t}",
"@Override\r\n\tpublic void acceptInput(String input) {\n\t\t\r\n\t}",
"protected void handleInput(String input) {}",
"public void takeUserInput() {\n\t\t\r\n\t}",
"public void userInput() {\r\n System.out.println(\"You want to convert from:\");\r\n this.fromUnit = in.nextLine();\r\n System.out.print(\"to: \");\r\n this.toUnit = in.nextLine();\r\n System.out.print(\"The value is \");\r\n this.value = in.nextDouble();\r\n }",
"INPUT createINPUT();",
"public abstract Object getInput ();",
"@Override\n\tprotected void processInput() {\n\t}",
"public void setInput(Input input) {\n this.input = input;\n }",
"public void doIt(Input in);",
"Input createInput();",
"@Override\n public void input() {\n super.input();\n Scanner sc = new Scanner(System.in);\n System.out.printf(\"Nhập số trang sách giáo khoa: \");\n amountPage = Integer.valueOf(sc.nextLine());\n System.out.printf(\"Nhập tình trạng sách giáo khoa: \");\n status = sc.nextLine();\n System.out.printf(\"Nhập số lượng mượn: \");\n amountBorrow= Integer.valueOf(sc.nextLine());\n }",
"public interface Input \n{\n\t/*\n\t * Use to initialise input\n\t */\n\tboolean initialise (String args);\n\t/*\n\t * Return a line or return null\n\t */\n\tString getLine ();\n\t\n}",
"public void processInput() {\n\n\t}",
"public void setInput(String input) {\n\t\t\tthis.input = input;\n\t\t}",
"private void checkUserInput() {\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"private boolean isValidInput() {\n\t\treturn true;\n\t}",
"String getUserInput();",
"String userInput(String question);",
"Input getObjetivo();",
"@Override\n\tpublic void setInput(Input arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void setInput(Input arg0) {\n\n\t}",
"@Override\n\tvoid input() {\n\t}",
"public static void getInput() {\n\t\tSystem.out.print(\"Expression y=? \");\n\t\tScanner s = new Scanner(System.in);\n\t\texpression = s.nextLine();\n\t\texpression.toLowerCase();\n\t\tSystem.out.print(\"x? \");\n\t\tx = s.nextDouble();\n\t}",
"void requestInput();",
"protected abstract boolean checkInput();",
"public void input()\n\t{\n\t\t// this facilitates the output\n\t\tScanner sc = new Scanner(System.in) ; \n\t\tSystem.out.print(\"The Bike Number:- \") ;\n\t \tthis.bno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The Biker Name:- \") ; \n\t \tthis.name = new Scanner(System.in).nextLine() ; \t\n\t\tSystem.out.print(\"The Phone number:- \") ; \n\t \tthis.phno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The number of days:- \") ; \n\t \tthis.days = sc.nextInt() ; \t\n\t}",
"private void getInput() {\n\t\tSystem.out.println(\"****Welcome to TNEB online Payment*****\");\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter your current unit\");\r\n\t\tunit = scan.nextInt();\r\n\t}",
"public void getInput(String input) {\n ((problemGeneratorArrayListener) activity).problemGeneratorArrayActivity(input);\n }",
"private Input()\n {\n }",
"public void processInput(String text);",
"private void validateInputParameters(){\n\n }",
"private static void readInput() { input = sc.nextLine().toLowerCase().toCharArray(); }",
"public void input() throws ParseException {\r\n\t\tScanner scn = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Please enter id: \");\r\n\t\tString idSt = scn.nextLine();\r\n\t\tid = Integer.parseInt(idSt);\r\n\t\tSystem.out.println(\"Please enter title: \");\r\n\t\ttitle = scn.nextLine();\r\n\t\tSystem.out.println(\"Please enter authors name: \");\r\n\t\tauthor = scn.nextLine();\r\n\t\tSystem.out.println(\"Please enter date (dd.MM.yyyy): \");\r\n\t\tString scnDate = scn.nextLine();\r\n\t\tdateOfPublication = stringToDate(scnDate);\r\n\t}",
"@Override\n\tpublic String input() throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String input() throws Exception {\n\t\treturn null;\n\t}",
"String consoleInput();",
"public abstract void handleInput();",
"private static String validateInputStr() {\n String str = \"\";\n Scanner genericString = new Scanner(System.in);\n if (!genericString.hasNextInt()) {\n str = genericString.nextLine();\n return str;\n }\n else {\n validateInputStr();\n }\n return str;\n }",
"private void getInput() {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number\");\r\n\t\tn=scan.nextInt();\r\n\r\n\t}",
"protected abstract void registerInput();",
"public String getInput() {\n return input;\n }",
"@Override\n\tpublic boolean checkInput() {\n\t\treturn true;\n\t}",
"public boolean checkInput();",
"private boolean isInputValid() {\n return true;\n }",
"public void beforeInput() {\n }",
"public void beforeInput() {\n }",
"public String getInput()\t\n\t{\t//start of getInput method\n\t\treturn inputMsg;\n\t}",
"@Override\n\tpublic void handleInput() {\n\t\t\n\t}",
"public void input(InputScript in){\n\n switch(in.type()){\n\n case Back:\n input_back();\n break;\n\n case Emphasis:\n input_emphasis();\n break;\n\n case Deemphasis:\n input_deemphasis();\n break;\n\n default:\n break;\n }\n }",
"public String input() throws Exception {\r\n\t\treturn INPUT;\r\n\t}",
"public String onInputMessage(String userInput) throws QuitException{\n if (!userInput.equals(\"\"))\n System.out.println(userInput);\n\n //Enter data using BufferReader \n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); \n \n // Reading data using readLine\n String input; \n try {\n input = reader.readLine();\n } catch (IOException e) {\n return null;\n }\n if (input.equals(\"sortir\"))\n throw new QuitException();\n\n // Printing the read line \n return input;\n }",
"private static void takeInput() throws IOException {\n\n System.out.println(\"Enter number 1\");\n BufferedReader br= new BufferedReader(new InputStreamReader(System.in));\n String number1=br.readLine();\n System.out.println(\"Enter number 2\");\n String number2=br.readLine();\n System.out.println(\"Operation\");\n String op=br.readLine();\n //WhiteHatHacker processes the input\n WhiteHatHacker hack=new WhiteHatHacker(number1,number2,op);\n hack.processInput();\n }",
"public void setInput(boolean input) {\n this.input = input;\n }",
"public interface UsersInput {\n\n /**\n * Return user's input on a given line.\n * @param outForUser given line.\n * @return user's input.\n * @throws IOException IOException.\n */\n String getUsersInput(String outForUser) throws IOException;\n}",
"void setInput(com.indosat.eai.catalist.standardInputOutput.DummyInputType input);",
"String userInputFromTextArea();",
"public void inputInformation() throws IOException {\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n try {\n System.out.println(\"Please enter shape: \");\n shape = input.readLine();\n\n System.out.println(\"Please enter color\");\n color = input.readLine();\n\n System.out.println(\"Please enter name: \");\n name = input.readLine();\n\n System.out.println(\"Please enter weight: \");\n weight = Double.parseDouble(input.readLine());\n } catch (NumberFormatException e) {\n System.out.println(\"Error: \" + e.toString());\n }\n }",
"public boolean isInput() {\n return input;\n }",
"public abstract void promptForInput(final String msg);",
"private void setInputParams(InputCommand input) throws InvalidCommand {\n if (input.getParams().length < 2) throw new InvalidCommand(\"Please enter car registration no. followed by color\");\n try {\n carRegNo = input.getParams()[0].toUpperCase();\n carColor = input.getParams()[1].toUpperCase();\n } catch (NumberFormatException e) {\n throw new InvalidCommand(\"Something went wrong.\\nMake sure the command is of the format: 'park KA-01-HH-9999 White'\");\n }\n }",
"public static String readUserInput() {\n return in.nextLine();\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"Input getInputs();",
"public interface InputHelper {\n\n Random random = new Random();\n Scanner scanner = new Scanner(System.in);\n\n /**\n * @param message information about type format\n * @return filled input value\n */\n int getInteger(String message);\n\n /**\n * @param message information about type format\n * @return filled input value\n */\n String getString(String message);\n\n /**\n * @param message information about type format\n * @return filled input value\n */\n boolean getBoolean(String message);\n}",
"@Override\n\tpublic void input() {\n\t\t// TODO Auto-generated method stub\n\t\tSystem.out.println(\"=================\");\n\t\tSystem.out.println(\"매입 매출 등록\");\n\t\tSystem.out.println(\"-----------------\");\n\t\tString pname = null;\n\t\twhile (true) {\n\t\t\tSystem.out.print(\"상품명(QUIET:입력중단)>>\");\n\t\t\tpname = scan.nextLine();\n\t\t\tif (pname.equals(\"QUIET\")) {\n\t\t\t\treturn;\n\t\t\t} else if (pname.equals(\"\")) {\n\t\t\t\tSystem.out.println(\"상품명은 반드시 입력해야합니다\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tSystem.out.print(\"거래일자(yyyy-mm-dd)\");\n\t\tString date = scan.next();\n\n\t\tSystem.out.print(\"거래처 명 >>\");\n\t\tString dname = scan.next();\n\n\t\tSystem.out.print(\"매입매출구분>>\");\n\t\tString iout = scan.next();\n\n\t\tSystem.out.print(\"수량>>\");\n\t\tInteger qty = scan.nextInt();\n\t\tInteger iprice = this.inputPrice(\"매입\");\n\t\tif (iprice == null) {\n\t\t\treturn;\n\t\t}\n\t\tInteger oprice = this.inputPrice(\"매출\");\n\t\tif (oprice == null) {\n\t\t\treturn;\n\t\t}\n\t\tIolistVO VO = new IolistVO();\n\t\tVO.setPname(pname);\n\t\tVO.setDate(date);\n\t\tVO.setDname(dname);\n\t\tVO.setInout(iout);\n\t\tVO.setIprice(iprice);\n\t\tVO.setOprice(oprice);\n\t\tVO.setQty(qty);\n\t\tiolist.add(VO);\n\t}",
"private void processInput() {\r\n\t\ttry {\r\n\t\t\thandleInput(readLine());\r\n\t\t} catch (WrongFormatException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\r\n public void getInput() { \r\n \r\n String command;\r\n Scanner inFile = new Scanner(System.in);\r\n \r\n do {\r\n \r\n this.display();\r\n \r\n command = inFile.nextLine();\r\n command = command.trim().toUpperCase();\r\n \r\n switch (command) {\r\n case \"B\":\r\n this.helpMenuControl.displayBoardHelp();\r\n break;\r\n case \"C\":\r\n this.helpMenuControl.displayComputerPlayerHelp();\r\n break;\r\n case \"G\":\r\n this.helpMenuControl.displayGameHelp();\r\n break; \r\n case \"Q\": \r\n break;\r\n default: \r\n new Connect4Error().displayError(\"Invalid command. Please enter a valid command.\");\r\n }\r\n } while (!command.equals(\"Q\")); \r\n }",
"static Interaction inputs(String in) {\n return (input, output) -> {\n input.append(in);\n };\n }",
"boolean hasIsInputTo();",
"public static void main(String[] args) {\n\t\t TextInput input = new NumericInput();\n\t\t input.add('1');\n\t\t input.add('a');\n\t\t input.add('0');\n\t\t System.out.println(input.getValue());\n\n}",
"protected abstract boolean isInputValid();",
"public void setInput(String M)\t\n\t{\t//start of setInput method\n\t\tinputMsg = M;\n\t}",
"public void setUserinput(String userinput){\n String[] inputs = userinput.split(\" \");\n if(inputs.length > 1){\n this.userinput_var = inputs[1];\n }\n this.userinput_command = inputs[0];\n }",
"ListeningFuture<Boolean> setInput(String input);",
"public void setInput1(final String input1) {\n this.input1 = input1;\n }",
"@Override\n\tpublic boolean isAcceptingInput() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isAcceptingInput() {\n\t\treturn true;\n\t}",
"protected abstract int isValidInput();",
"protected abstract boolean isInputValid(@NotNull ConversationContext context, @NotNull String input);",
"public void intro(){Scanner teclado = new Scanner(System.in);\nSystem.out.println(\"Introduzca la unidad de medida a la que transformar \"\n + \"pies, cm o yardas\");\nSystem.out.println(\"o escriba salir si quiere volver al primer menu\");\nopcion=teclado.nextLine();}",
"public void getGamerInput() {\n\t\ttry {\n\t\t\tsCurrentCharInput = String.format(\"%s\", (consoleInput.readLine())).toUpperCase(Locale.getDefault());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/* ************************************* */\n\t\tconsoleLog.println(\" \");\n\t\t// System.out.println(\" Quit readline \");\n\t\t/* ************************************* */\n\t\t// if (sCurrentCharInput.length() == 0)\n\t\t// continue;\n\n\t\t// if (sCurrentCharInput.contains(sAskedWord))\n\t\t// continue;\n\n\t}",
"protected SelectionText input() {\n return inputter;\n }",
"public String readInput() {\n\t\treturn null;\n\t}",
"@FXML\n private void handleUserInput() {\n String input = inputTextField.getText();\n storeUserInputHistory(input);\n try {\n Command command = ParserFactory.parse(input);\n command.execute(tasks, storage, history);\n } catch (ChronologerException e) {\n e.printStackTrace();\n }\n printUserMessage(\" \" + input);\n printChronologerMessage(UiMessageHandler.getOutputForGui());\n inputTextField.clear();\n }",
"private void getTextFromInput() {\n firstName = firstNameField.getText();\n lastName = lastNameField.getText();\n age = ageField.getText();\n email = emailField.getText().toLowerCase();\n }",
"void Input() {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter name of the book::\");\n Bname = scanner.nextLine();\n System.out.println(\"Enter price of the book::\");\n price = scanner.nextDouble();\n }",
"private static Object getInput(String message, Scanner sc, Class type) throws IllegalArgumentException {\n while (true) {\n System.out.println(message);\n String in = sc.nextLine();\n if (type.equals(Integer.class)) {\n try {\n return Integer.parseInt(in, 10);\n }\n catch (NumberFormatException ex) {\n System.out.println(\"Invalid input.\");\n }\n }\n else if (type.equals(Float.class)) {\n try {\n return Float.parseFloat(in);\n }\n catch (NumberFormatException ex) {\n System.out.println(\"Invalid input.\");\n }\n }\n else if (type.equals(Boolean.class)) {\n switch (in.toLowerCase()) {\n case \"y\":\n return true;\n case \"n\":\n return false;\n default:\n System.out.println(\"You responded '\" + in + \"' - invalid, defaulting to No\");\n return false;\n }\n }\n else {\n throw new IllegalArgumentException(\"Can't convert to type \" + type.toString());\n }\n }\n }",
"private void takeInUserInput(){\n\t\t// only take in input when it is in the ANSWERING phase\n\t\tif(spellList.status == QuizState.Answering){\n\t\t\tspellList.setAnswer(getAndClrInput());\n\t\t\tspellList.status = QuizState.Answered;\n\t\t\tansChecker=spellList.getAnswerChecker();\n\t\t\tansChecker.execute();\n\t\t}\t\n\n\t}",
"@Override\n public String getInputArg(String argName) {\n Log.w(TAG, \"Test input args is not supported.\");\n return null;\n }",
"public void input() {\r\n System.out.print(\"Enter your employee ID number: \");\r\n ID = enter.nextDouble();\r\n \r\n System.out.print(\"Enter your Gross Pay: \");\r\n grosspay = enter.nextDouble();\r\n \r\n System.out.print(\"Enter your State Tax: \");\r\n Statetax = enter.nextDouble();\r\n \r\n System.out.print(\"Enter your Federal Tax: \");\r\n Fedtax = enter.nextDouble(); }",
"public void setInput(Input param) {\r\n localInputTracker = param != null;\r\n\r\n this.localInput = param;\r\n }",
"protected String inputLine(String message) {\n System.out.println(\"\\n\\n\" + message + \" \");\n return new Scanner(System.in).nextLine();\n }",
"public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}"
]
| [
"0.77166986",
"0.7633297",
"0.7500411",
"0.73431015",
"0.7307967",
"0.7293292",
"0.71396875",
"0.7136517",
"0.7134955",
"0.70641994",
"0.70591426",
"0.701546",
"0.7008499",
"0.6969762",
"0.6913935",
"0.6888475",
"0.6879645",
"0.6870887",
"0.6855151",
"0.68399924",
"0.6829986",
"0.68216616",
"0.678639",
"0.6747475",
"0.6714905",
"0.6702972",
"0.6692322",
"0.66875494",
"0.6661826",
"0.66585004",
"0.6604701",
"0.65965915",
"0.6562045",
"0.65342",
"0.6481901",
"0.64742285",
"0.64456594",
"0.64408404",
"0.6408307",
"0.6400534",
"0.6400166",
"0.6391619",
"0.6391619",
"0.6382871",
"0.6380178",
"0.63652045",
"0.63598007",
"0.63595384",
"0.635107",
"0.6343153",
"0.6327027",
"0.6320396",
"0.6299481",
"0.6299481",
"0.6293009",
"0.62927663",
"0.6272097",
"0.62554306",
"0.6250287",
"0.623704",
"0.6225765",
"0.62233335",
"0.62183875",
"0.62078345",
"0.62016124",
"0.619973",
"0.6187739",
"0.6173087",
"0.61646277",
"0.61484015",
"0.614149",
"0.6126682",
"0.6126601",
"0.6117936",
"0.6109545",
"0.6091397",
"0.6081167",
"0.60701495",
"0.6056955",
"0.60534596",
"0.6047495",
"0.60453033",
"0.60451895",
"0.60429686",
"0.60429686",
"0.60376704",
"0.60355175",
"0.60353196",
"0.60350317",
"0.60297334",
"0.60225403",
"0.6021825",
"0.601673",
"0.6004715",
"0.59910095",
"0.5987066",
"0.5980553",
"0.5972081",
"0.5969854",
"0.59452784",
"0.5934012"
]
| 0.0 | -1 |
Metodo para establecer un input | @Override
public void setSegundaEntrada(Componente entrada) {
this.Entrada2=entrada;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getInput();",
"public void setInput(String input) { this.input = input; }",
"public abstract void input();",
"public void setInput(String input){\n this.input = input;\n }",
"public void setInput(String input);",
"protected abstract void getInput();",
"@Override\n\tpublic void input() {\n\t\t\n\t}",
"@Override\r\n\tpublic void acceptInput(String input) {\n\t\t\r\n\t}",
"protected void handleInput(String input) {}",
"public void takeUserInput() {\n\t\t\r\n\t}",
"public void userInput() {\r\n System.out.println(\"You want to convert from:\");\r\n this.fromUnit = in.nextLine();\r\n System.out.print(\"to: \");\r\n this.toUnit = in.nextLine();\r\n System.out.print(\"The value is \");\r\n this.value = in.nextDouble();\r\n }",
"INPUT createINPUT();",
"public abstract Object getInput ();",
"@Override\n\tprotected void processInput() {\n\t}",
"public void setInput(Input input) {\n this.input = input;\n }",
"public void doIt(Input in);",
"Input createInput();",
"@Override\n public void input() {\n super.input();\n Scanner sc = new Scanner(System.in);\n System.out.printf(\"Nhập số trang sách giáo khoa: \");\n amountPage = Integer.valueOf(sc.nextLine());\n System.out.printf(\"Nhập tình trạng sách giáo khoa: \");\n status = sc.nextLine();\n System.out.printf(\"Nhập số lượng mượn: \");\n amountBorrow= Integer.valueOf(sc.nextLine());\n }",
"public interface Input \n{\n\t/*\n\t * Use to initialise input\n\t */\n\tboolean initialise (String args);\n\t/*\n\t * Return a line or return null\n\t */\n\tString getLine ();\n\t\n}",
"public void processInput() {\n\n\t}",
"public void setInput(String input) {\n\t\t\tthis.input = input;\n\t\t}",
"private void checkUserInput() {\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"private boolean isValidInput() {\n\t\treturn true;\n\t}",
"String getUserInput();",
"String userInput(String question);",
"Input getObjetivo();",
"@Override\n\tpublic void setInput(Input arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void setInput(Input arg0) {\n\n\t}",
"@Override\n\tvoid input() {\n\t}",
"public static void getInput() {\n\t\tSystem.out.print(\"Expression y=? \");\n\t\tScanner s = new Scanner(System.in);\n\t\texpression = s.nextLine();\n\t\texpression.toLowerCase();\n\t\tSystem.out.print(\"x? \");\n\t\tx = s.nextDouble();\n\t}",
"void requestInput();",
"protected abstract boolean checkInput();",
"public void input()\n\t{\n\t\t// this facilitates the output\n\t\tScanner sc = new Scanner(System.in) ; \n\t\tSystem.out.print(\"The Bike Number:- \") ;\n\t \tthis.bno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The Biker Name:- \") ; \n\t \tthis.name = new Scanner(System.in).nextLine() ; \t\n\t\tSystem.out.print(\"The Phone number:- \") ; \n\t \tthis.phno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The number of days:- \") ; \n\t \tthis.days = sc.nextInt() ; \t\n\t}",
"private void getInput() {\n\t\tSystem.out.println(\"****Welcome to TNEB online Payment*****\");\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter your current unit\");\r\n\t\tunit = scan.nextInt();\r\n\t}",
"public void getInput(String input) {\n ((problemGeneratorArrayListener) activity).problemGeneratorArrayActivity(input);\n }",
"private Input()\n {\n }",
"public void processInput(String text);",
"private void validateInputParameters(){\n\n }",
"private static void readInput() { input = sc.nextLine().toLowerCase().toCharArray(); }",
"public void input() throws ParseException {\r\n\t\tScanner scn = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Please enter id: \");\r\n\t\tString idSt = scn.nextLine();\r\n\t\tid = Integer.parseInt(idSt);\r\n\t\tSystem.out.println(\"Please enter title: \");\r\n\t\ttitle = scn.nextLine();\r\n\t\tSystem.out.println(\"Please enter authors name: \");\r\n\t\tauthor = scn.nextLine();\r\n\t\tSystem.out.println(\"Please enter date (dd.MM.yyyy): \");\r\n\t\tString scnDate = scn.nextLine();\r\n\t\tdateOfPublication = stringToDate(scnDate);\r\n\t}",
"@Override\n\tpublic String input() throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String input() throws Exception {\n\t\treturn null;\n\t}",
"String consoleInput();",
"public abstract void handleInput();",
"private static String validateInputStr() {\n String str = \"\";\n Scanner genericString = new Scanner(System.in);\n if (!genericString.hasNextInt()) {\n str = genericString.nextLine();\n return str;\n }\n else {\n validateInputStr();\n }\n return str;\n }",
"protected abstract void registerInput();",
"private void getInput() {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number\");\r\n\t\tn=scan.nextInt();\r\n\r\n\t}",
"public String getInput() {\n return input;\n }",
"@Override\n\tpublic boolean checkInput() {\n\t\treturn true;\n\t}",
"public boolean checkInput();",
"private boolean isInputValid() {\n return true;\n }",
"public void beforeInput() {\n }",
"public void beforeInput() {\n }",
"@Override\n\tpublic void handleInput() {\n\t\t\n\t}",
"public String getInput()\t\n\t{\t//start of getInput method\n\t\treturn inputMsg;\n\t}",
"public void input(InputScript in){\n\n switch(in.type()){\n\n case Back:\n input_back();\n break;\n\n case Emphasis:\n input_emphasis();\n break;\n\n case Deemphasis:\n input_deemphasis();\n break;\n\n default:\n break;\n }\n }",
"public String input() throws Exception {\r\n\t\treturn INPUT;\r\n\t}",
"public String onInputMessage(String userInput) throws QuitException{\n if (!userInput.equals(\"\"))\n System.out.println(userInput);\n\n //Enter data using BufferReader \n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); \n \n // Reading data using readLine\n String input; \n try {\n input = reader.readLine();\n } catch (IOException e) {\n return null;\n }\n if (input.equals(\"sortir\"))\n throw new QuitException();\n\n // Printing the read line \n return input;\n }",
"private static void takeInput() throws IOException {\n\n System.out.println(\"Enter number 1\");\n BufferedReader br= new BufferedReader(new InputStreamReader(System.in));\n String number1=br.readLine();\n System.out.println(\"Enter number 2\");\n String number2=br.readLine();\n System.out.println(\"Operation\");\n String op=br.readLine();\n //WhiteHatHacker processes the input\n WhiteHatHacker hack=new WhiteHatHacker(number1,number2,op);\n hack.processInput();\n }",
"public void setInput(boolean input) {\n this.input = input;\n }",
"public interface UsersInput {\n\n /**\n * Return user's input on a given line.\n * @param outForUser given line.\n * @return user's input.\n * @throws IOException IOException.\n */\n String getUsersInput(String outForUser) throws IOException;\n}",
"void setInput(com.indosat.eai.catalist.standardInputOutput.DummyInputType input);",
"String userInputFromTextArea();",
"public void inputInformation() throws IOException {\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n try {\n System.out.println(\"Please enter shape: \");\n shape = input.readLine();\n\n System.out.println(\"Please enter color\");\n color = input.readLine();\n\n System.out.println(\"Please enter name: \");\n name = input.readLine();\n\n System.out.println(\"Please enter weight: \");\n weight = Double.parseDouble(input.readLine());\n } catch (NumberFormatException e) {\n System.out.println(\"Error: \" + e.toString());\n }\n }",
"public boolean isInput() {\n return input;\n }",
"public abstract void promptForInput(final String msg);",
"private void setInputParams(InputCommand input) throws InvalidCommand {\n if (input.getParams().length < 2) throw new InvalidCommand(\"Please enter car registration no. followed by color\");\n try {\n carRegNo = input.getParams()[0].toUpperCase();\n carColor = input.getParams()[1].toUpperCase();\n } catch (NumberFormatException e) {\n throw new InvalidCommand(\"Something went wrong.\\nMake sure the command is of the format: 'park KA-01-HH-9999 White'\");\n }\n }",
"public static String readUserInput() {\n return in.nextLine();\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"Input getInputs();",
"@Override\n\tpublic void input() {\n\t\t// TODO Auto-generated method stub\n\t\tSystem.out.println(\"=================\");\n\t\tSystem.out.println(\"매입 매출 등록\");\n\t\tSystem.out.println(\"-----------------\");\n\t\tString pname = null;\n\t\twhile (true) {\n\t\t\tSystem.out.print(\"상품명(QUIET:입력중단)>>\");\n\t\t\tpname = scan.nextLine();\n\t\t\tif (pname.equals(\"QUIET\")) {\n\t\t\t\treturn;\n\t\t\t} else if (pname.equals(\"\")) {\n\t\t\t\tSystem.out.println(\"상품명은 반드시 입력해야합니다\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tSystem.out.print(\"거래일자(yyyy-mm-dd)\");\n\t\tString date = scan.next();\n\n\t\tSystem.out.print(\"거래처 명 >>\");\n\t\tString dname = scan.next();\n\n\t\tSystem.out.print(\"매입매출구분>>\");\n\t\tString iout = scan.next();\n\n\t\tSystem.out.print(\"수량>>\");\n\t\tInteger qty = scan.nextInt();\n\t\tInteger iprice = this.inputPrice(\"매입\");\n\t\tif (iprice == null) {\n\t\t\treturn;\n\t\t}\n\t\tInteger oprice = this.inputPrice(\"매출\");\n\t\tif (oprice == null) {\n\t\t\treturn;\n\t\t}\n\t\tIolistVO VO = new IolistVO();\n\t\tVO.setPname(pname);\n\t\tVO.setDate(date);\n\t\tVO.setDname(dname);\n\t\tVO.setInout(iout);\n\t\tVO.setIprice(iprice);\n\t\tVO.setOprice(oprice);\n\t\tVO.setQty(qty);\n\t\tiolist.add(VO);\n\t}",
"public interface InputHelper {\n\n Random random = new Random();\n Scanner scanner = new Scanner(System.in);\n\n /**\n * @param message information about type format\n * @return filled input value\n */\n int getInteger(String message);\n\n /**\n * @param message information about type format\n * @return filled input value\n */\n String getString(String message);\n\n /**\n * @param message information about type format\n * @return filled input value\n */\n boolean getBoolean(String message);\n}",
"private void processInput() {\r\n\t\ttry {\r\n\t\t\thandleInput(readLine());\r\n\t\t} catch (WrongFormatException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\r\n public void getInput() { \r\n \r\n String command;\r\n Scanner inFile = new Scanner(System.in);\r\n \r\n do {\r\n \r\n this.display();\r\n \r\n command = inFile.nextLine();\r\n command = command.trim().toUpperCase();\r\n \r\n switch (command) {\r\n case \"B\":\r\n this.helpMenuControl.displayBoardHelp();\r\n break;\r\n case \"C\":\r\n this.helpMenuControl.displayComputerPlayerHelp();\r\n break;\r\n case \"G\":\r\n this.helpMenuControl.displayGameHelp();\r\n break; \r\n case \"Q\": \r\n break;\r\n default: \r\n new Connect4Error().displayError(\"Invalid command. Please enter a valid command.\");\r\n }\r\n } while (!command.equals(\"Q\")); \r\n }",
"static Interaction inputs(String in) {\n return (input, output) -> {\n input.append(in);\n };\n }",
"boolean hasIsInputTo();",
"public static void main(String[] args) {\n\t\t TextInput input = new NumericInput();\n\t\t input.add('1');\n\t\t input.add('a');\n\t\t input.add('0');\n\t\t System.out.println(input.getValue());\n\n}",
"protected abstract boolean isInputValid();",
"public void setInput(String M)\t\n\t{\t//start of setInput method\n\t\tinputMsg = M;\n\t}",
"public void setUserinput(String userinput){\n String[] inputs = userinput.split(\" \");\n if(inputs.length > 1){\n this.userinput_var = inputs[1];\n }\n this.userinput_command = inputs[0];\n }",
"public void setInput1(final String input1) {\n this.input1 = input1;\n }",
"ListeningFuture<Boolean> setInput(String input);",
"@Override\n\tpublic boolean isAcceptingInput() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isAcceptingInput() {\n\t\treturn true;\n\t}",
"protected abstract int isValidInput();",
"protected abstract boolean isInputValid(@NotNull ConversationContext context, @NotNull String input);",
"public void getGamerInput() {\n\t\ttry {\n\t\t\tsCurrentCharInput = String.format(\"%s\", (consoleInput.readLine())).toUpperCase(Locale.getDefault());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/* ************************************* */\n\t\tconsoleLog.println(\" \");\n\t\t// System.out.println(\" Quit readline \");\n\t\t/* ************************************* */\n\t\t// if (sCurrentCharInput.length() == 0)\n\t\t// continue;\n\n\t\t// if (sCurrentCharInput.contains(sAskedWord))\n\t\t// continue;\n\n\t}",
"public void intro(){Scanner teclado = new Scanner(System.in);\nSystem.out.println(\"Introduzca la unidad de medida a la que transformar \"\n + \"pies, cm o yardas\");\nSystem.out.println(\"o escriba salir si quiere volver al primer menu\");\nopcion=teclado.nextLine();}",
"protected SelectionText input() {\n return inputter;\n }",
"public String readInput() {\n\t\treturn null;\n\t}",
"@FXML\n private void handleUserInput() {\n String input = inputTextField.getText();\n storeUserInputHistory(input);\n try {\n Command command = ParserFactory.parse(input);\n command.execute(tasks, storage, history);\n } catch (ChronologerException e) {\n e.printStackTrace();\n }\n printUserMessage(\" \" + input);\n printChronologerMessage(UiMessageHandler.getOutputForGui());\n inputTextField.clear();\n }",
"private void getTextFromInput() {\n firstName = firstNameField.getText();\n lastName = lastNameField.getText();\n age = ageField.getText();\n email = emailField.getText().toLowerCase();\n }",
"void Input() {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter name of the book::\");\n Bname = scanner.nextLine();\n System.out.println(\"Enter price of the book::\");\n price = scanner.nextDouble();\n }",
"private static Object getInput(String message, Scanner sc, Class type) throws IllegalArgumentException {\n while (true) {\n System.out.println(message);\n String in = sc.nextLine();\n if (type.equals(Integer.class)) {\n try {\n return Integer.parseInt(in, 10);\n }\n catch (NumberFormatException ex) {\n System.out.println(\"Invalid input.\");\n }\n }\n else if (type.equals(Float.class)) {\n try {\n return Float.parseFloat(in);\n }\n catch (NumberFormatException ex) {\n System.out.println(\"Invalid input.\");\n }\n }\n else if (type.equals(Boolean.class)) {\n switch (in.toLowerCase()) {\n case \"y\":\n return true;\n case \"n\":\n return false;\n default:\n System.out.println(\"You responded '\" + in + \"' - invalid, defaulting to No\");\n return false;\n }\n }\n else {\n throw new IllegalArgumentException(\"Can't convert to type \" + type.toString());\n }\n }\n }",
"private void takeInUserInput(){\n\t\t// only take in input when it is in the ANSWERING phase\n\t\tif(spellList.status == QuizState.Answering){\n\t\t\tspellList.setAnswer(getAndClrInput());\n\t\t\tspellList.status = QuizState.Answered;\n\t\t\tansChecker=spellList.getAnswerChecker();\n\t\t\tansChecker.execute();\n\t\t}\t\n\n\t}",
"@Override\n public String getInputArg(String argName) {\n Log.w(TAG, \"Test input args is not supported.\");\n return null;\n }",
"public void setInput(Input param) {\r\n localInputTracker = param != null;\r\n\r\n this.localInput = param;\r\n }",
"public void input() {\r\n System.out.print(\"Enter your employee ID number: \");\r\n ID = enter.nextDouble();\r\n \r\n System.out.print(\"Enter your Gross Pay: \");\r\n grosspay = enter.nextDouble();\r\n \r\n System.out.print(\"Enter your State Tax: \");\r\n Statetax = enter.nextDouble();\r\n \r\n System.out.print(\"Enter your Federal Tax: \");\r\n Fedtax = enter.nextDouble(); }",
"protected String inputLine(String message) {\n System.out.println(\"\\n\\n\" + message + \" \");\n return new Scanner(System.in).nextLine();\n }",
"public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}"
]
| [
"0.77154684",
"0.76325214",
"0.7499578",
"0.7342326",
"0.7306816",
"0.7292928",
"0.7139498",
"0.71357113",
"0.71347916",
"0.7062221",
"0.7057436",
"0.70150846",
"0.70080626",
"0.6969961",
"0.69131976",
"0.68874216",
"0.68791497",
"0.68707204",
"0.6855482",
"0.68392473",
"0.6829268",
"0.68199134",
"0.6786673",
"0.6745493",
"0.67132616",
"0.6701185",
"0.669352",
"0.66872495",
"0.66616005",
"0.6658224",
"0.6602631",
"0.65950525",
"0.6560914",
"0.65331537",
"0.64815277",
"0.64745224",
"0.64455813",
"0.6439499",
"0.64066386",
"0.6400374",
"0.6398958",
"0.6390971",
"0.6390971",
"0.638102",
"0.6379631",
"0.63640755",
"0.6358669",
"0.6358305",
"0.63504106",
"0.6341691",
"0.63248414",
"0.631844",
"0.6298829",
"0.6298829",
"0.6292572",
"0.6291398",
"0.62721556",
"0.62535393",
"0.6249345",
"0.62360764",
"0.6224585",
"0.6223915",
"0.62186664",
"0.62068295",
"0.6201035",
"0.6198882",
"0.61854476",
"0.6172134",
"0.6163443",
"0.61486924",
"0.6141519",
"0.61268157",
"0.61263573",
"0.61175394",
"0.6109178",
"0.6091652",
"0.6080454",
"0.60676587",
"0.60554713",
"0.6051626",
"0.60462004",
"0.6044516",
"0.6044075",
"0.60408336",
"0.60408336",
"0.6036456",
"0.60355103",
"0.60345703",
"0.6033972",
"0.60298926",
"0.60221326",
"0.602173",
"0.60166514",
"0.6003495",
"0.59898216",
"0.598717",
"0.5980058",
"0.5969769",
"0.5969747",
"0.5944125",
"0.5933724"
]
| 0.0 | -1 |
Metodo base para retornar una salida segun el componente. | @Override
public int getSalida() {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void salir() {\n\t\t\n\t}",
"public long obtenerNoSalida() throws GenericPersistenceEAOException;",
"@Override\r\n public void salir() {\n }",
"@Override\r\n\tpublic void salvar() {\n\r\n\t}",
"@Override\n\tpublic Parcela salvar(Parcela entidade) {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic void salvar(Registro registro) {\n\t\t\r\n\t}",
"public int getSistemaSalud() {\r\n\t\treturn sistemaSalud;\r\n\t}",
"@Override\r\n\tpublic Sexo salvar(Sexo entidade) throws Exception {\n\t\treturn null;\r\n\t}",
"public EncabezadoRespuesta salidaAsistencia(AsistenciaDTO asistencia) {\n\t\t//Primero generamos el identificador unico de la transaccion\n\t\tString uid = GUIDGenerator.generateGUID(asistencia);\n\t\t//Mandamos a log el objeto de entrada\n\t\tLogHandler.debug(uid, this.getClass(), \"salidaAsistencia - Datos Entrada: \" + asistencia);\n\t\t//Variable de resultado\n\t\tEncabezadoRespuesta respuesta = new EncabezadoRespuesta();\n\t\ttry {\n\t\t\tif (asistencia.getIdEmpleado() == null) {\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el id del empleado.\");\n \t}\n \tif (asistencia.getUsuarioUltMod() == null || asistencia.getUsuarioUltMod().trim().isEmpty())\n \t{\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario.\");\n \t}\n \tAsistenciaDAO dao = new AsistenciaDAO();\n \trespuesta = dao.salidaAsistencia(uid, asistencia);\n\t\t} catch (ExcepcionesCuadrillas ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"salidaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"salidaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tLogHandler.debug(uid, this.getClass(), \"salidaAsistencia - Datos Salida: \" + respuesta);\n\t\treturn respuesta;\n\t}",
"public abstract int salvar(Object object) throws SQLException;",
"@Override\n\tpublic void registrarSalida() {\n\t\t\n\t}",
"@Override\n\tpublic void registrarSalida() {\n\t\t\n\t}",
"@Override\n\tpublic void registrarSalida() {\n\n\t}",
"@Override\n\tpublic String getSaludo() {\n\t\tString saludo = equipoService.saludoEquipo();\n\t\treturn saludo;\n\t}",
"abstract void outputAsSAL() throws IsabelleException, FileException;",
"@Override public void outputAsSAL() throws IsabelleException, FileException { \r\n outputSAL(value.useAsSAL());\r\n }",
"@Override\r\n public Resultado salvar(EntidadeDominio entidade) {\n String nmClass = entidade.getClass().getName();\r\n //executando validações de regras de negocio \r\n String msg = executarRegras(entidade, \"SALVAR\");\r\n //chamando DAO em caso de todas as validações atendidas\r\n if (msg.isEmpty()) {\r\n IDAO dao = daos.get(nmClass);\r\n dao.salvar(entidade);\r\n resultado.setMsg(\"Dados salvos no Banco de Dados\");\r\n List<EntidadeDominio> entidades = new ArrayList<>();\r\n entidades.add(entidade);\r\n resultado.setEntidades(entidades);\r\n // retornando msg de falha de validação sem poder acessar o DAO\r\n } else {\r\n resultado.setMsg(msg.toString());\r\n }\r\n return resultado;\r\n }",
"@Digits(integer=5,fraction=2)\n\t@Override\n\tpublic BigDecimal getSal() {\n\t\treturn super.getSal();\n\t}",
"public void registerSalvageable(Salvageable salvageable);",
"private void setSALIR(int opcionSalida){\n\t\tthis.opcionSalida = opcionSalida;\n\t}",
"public abstract long getSdiId();",
"@Override\n\tpublic int insertarSalida(AlmacenDTO obj) {\n\t\tint rs=-1;\n\t\tConnection con=null;\n\t\tPreparedStatement pst=null;\n\t\ttry {\n\t\t\tcon=new MySqlDbConexion().getConexion();\n\t\t\tString sql=\"insert into MATERIAL_SALIDA values (null,?,?,?)\";\n\t\t\tpst=con.prepareStatement(sql);\n\t\t\t\n\t\t\tpst.setInt(1,obj.getCodigo_producto());\n\t\t\tpst.setInt(2,obj.getCantidad_salida());\n\t\t\tpst.setDate(3,obj.getFecha_salida());\n\t\t\t\n\t\t\trs=pst.executeUpdate();\n\t\t \n\t\t\t\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error en la Sentencia\"+e.getMessage());\n\t\t\t\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif(pst!=null) pst.close();\n\t\t\t\tif(con!=null) con.close();\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Error al cerrar\");\n\t\t\t}\n\t\t}\n\t\treturn rs;\n\t}",
"public abstract void leerPersistencia();",
"public abstract int getPersistence();",
"public void salvarProdutos(Produto produto){\n }",
"public String getSalary() {\r\n\t\t//the base salary starts at $40,000\r\n\t\tint baseSalary = 40000;\r\n\t\t//The slary increases each year by $5,000 based on the number of years doctor practices\r\n\t\tint salary = baseSalary + (years * 5000);\r\n\t\t//This turns the int into a string with a $ sign in the front\r\n\t\tString salaryString = \"$\" + Integer.toString(salary);\r\n\t\t//The salary is returned\r\n\t\treturn salaryString;\r\n\t}",
"boolean agregarSalida(Salida s) {\n boolean hecho = false;\n try {\n operacion = ayudar.beginTransaction();\n ayudar.save(s);\n operacion.commit();\n } catch (Exception e) {\n operacion.rollback();\n System.out.println(e);\n }\n return hecho;\n }",
"public void salvar() throws Exception {\n if(stb == null)\n throw new Exception(Main.recursos.getString(\"bd.objeto.nulo\"));\n\n // Restrição provisória para aumentar a performance do programa\n if(stb.getIdSubTipoBanca() != -1)\n return;\n\n // Primeiro verifica se existe o subtipo de banca\n Transacao.consultar(\"SELECT idSubTipoBanca FROM subTipoBanca WHERE nome LIKE '\"+ stb.getNome() +\"'\");\n if(Transacao.getRs().first())\n stb.setIdSubTipoBanca(Transacao.getRs().getInt(\"idSubTipoBanca\"));\n\n String sql = \"\";\n\n if(stb.getIdSubTipoBanca() == -1)\n sql = \"INSERT INTO subTipoBanca VALUES(null, '\"+ stb.getNome() +\"')\";\n else\n sql = \"UPDATE subTipoBanca SET nome = '\"+ stb.getNome() +\"' WHERE idSubTipoBanca = \" + stb.getIdSubTipoBanca();\n\n \n Transacao.executar(sql);\n \n // Se foi uma inserção, deve trazer o id do subtipo para o objeto\n if(stb.getIdSubTipoBanca() == -1){\n Transacao.consultar(\"SELECT LAST_INSERT_ID() AS ultimo_id\");\n if(Transacao.getRs().first())\n stb.setIdSubTipoBanca(Transacao.getRs().getInt(\"ultimo_id\"));\n }\n }",
"java.lang.String getSaltData();",
"public abstract double salary();",
"private static String getSalt() {\n\t\tSecureRandom gen = new SecureRandom();\n\t\tbyte[] salt = new byte[32];\n\t\tgen.nextBytes(salt);\n\t\treturn DatatypeConverter.printBase64Binary(salt);\n\t}",
"public void calculateSalary() ;",
"public Salvageable getSalvageable(Material type);",
"@Override\n\tpublic double getSalud() {\n\t\treturn this.salud;\n\t}",
"@Override\n public void salvar(EntidadeDominio entidade) throws SQLException\n {\n\t\n }",
"public void sinyal();",
"private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }",
"@Override\n\tpublic void salvaSuFile() {\n\t\tString path = \"alimenti.txt\";\n\t\tString allergeni = Alimento.getStringaAllergeni(getElencoAllergeni());\n\t\ttry {\n\t\t\tFile file = new File(path);\n\t\t\tFileWriter fw = new FileWriter(file, true);\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\tbw.write(getNome() + \" - \" + getPrezzo() + \"€\\n\");\n\t\t\tbw.write(\"Adatto a vegani: \" + (getVegano() ? \"sì\\n\" : \"no\\n\"));\n\t\t\tbw.write(\"Adatto a vegetariani: \" + (getVegetariano() ? \"sì\\n\" : \"no\\n\"));\n\t\t\tbw.write(\"Tipologia: \" + getTipoPortata().getNome().toUpperCase() + \"\\n\");\n\t\t\tbw.write(\"Cottura: \" + getTipoCottura().getNome().toUpperCase() + \"\\n\");\n\t\t\tbw.write(\"Allergeni: \" + (allergeni.isEmpty() ? \"--\" : allergeni) + \"\\n\\n\");\n\t\t\tbw.flush();\n\t\t\tbw.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"Secuencia createSecuencia();",
"private EncryptionUtility(){\r\n\t\treturn;\t\t\r\n\t}",
"public int getSueldoBase() {\n return sueldoBase;\n }",
"@Override\n\tpublic <S extends Pessoa> S save(S arg0) {\n\t\treturn null;\n\t}",
"public String salvar(PessoaFisica pessoafisica) {\n\t\t\r\n\t\treturn \"Salvo\";\r\n\t}",
"String getSaltedHash();",
"private ObjectOutputStream getOutputStream() {\n\t\t// retornamos el stream de salida\n\t\treturn this.outputStream;\n\t}",
"public int getSaldo() {\r\n return this.contaCorrente.getSaldo();\r\n }",
"@Override\n public double salario() {\n return 2600 * 1.10;\n }",
"public abstract String generateStorageString();",
"public String saludoCastellano () {\n\t\treturn \"hola\";\n\t}",
"public static byte[] getSalt()\r\n/* 111: */ {\r\n/* 112: */ try\r\n/* 113: */ {\r\n/* 114:105 */ return getPropertyBytes(\"salt\");\r\n/* 115: */ }\r\n/* 116: */ catch (Exception e)\r\n/* 117: */ {\r\n/* 118:107 */ log.log(Level.WARNING, \"Error getting salt: \" + e.getLocalizedMessage());\r\n/* 119: */ }\r\n/* 120:109 */ return new byte[0];\r\n/* 121: */ }",
"private static byte[] getSalt() throws NoSuchAlgorithmException {\n\n SecureRandom sr = SecureRandom.getInstance(\"SHA1PRNG\");\n byte[] salt = new byte[16];\n sr.nextBytes(salt);\n return salt;\n }",
"@Override\n\tpublic double calcularSalario() {\n\n\t\tdouble salario = 0;\n\n\t\tdouble porcentajeAnios = calcularPorcentajePorAntiguedad();\n\t\tporcentajeAnios = this.sueldoBasico* (porcentajeAnios / 100);\n\t\tsalario = this.sueldoBasico + porcentajeAnios;\n\t\treturn salario;\n\t}",
"@Override\n\tpublic float CalculateSalary() {\n\t\treturn salary;\n\t}",
"private String createSalt()\r\n {\r\n SecureRandom random = new SecureRandom();\r\n byte bytes[] = new byte[20];\r\n random.nextBytes(bytes);\r\n StringBuilder sb = new StringBuilder();\r\n\r\n for (int i = 0; i < bytes.length; i++)\r\n {\r\n sb.append(Integer.toString((bytes[i] & 0xff) + 0x100, 16).substring(1));\r\n }\r\n\r\n String salt = sb.toString();\r\n return salt;\r\n }",
"@Override\n\tprotected double getSalary() {\n\t\treturn 0;\n\t}",
"public Equipamento salvar(Equipamento eq) {\r\n\t\t\tthis.conexao.abrirConexao();\r\n\t\t\tString sqlInsert = \"INSERT INTO equipamentos VALUES(null,?,?,?)\";\r\n\t\t\ttry {\r\n\t\t\t\tPreparedStatement statement = (PreparedStatement) this.conexao.getConexao().prepareStatement(sqlInsert, PreparedStatement.RETURN_GENERATED_KEYS);\r\n\t\t\t\tstatement.setString(1, eq.getNome());\r\n\t\t\t\tstatement.setString(2, eq.getDescricao());\r\n\t\t\t\tstatement.setLong(3, eq.getUsuario().getId());\r\n\t\t\t\tstatement.executeUpdate();\r\n\t\t\t\tResultSet rs = statement.getGeneratedKeys();\r\n\t\t\t\tif(rs.next()) {\r\n\t\t\t\t\tint id = rs.getInt(1);\r\n\t\t\t\t\teq.setId(id);\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tthis.conexao.fecharConexao();\r\n\t\t\t}\r\n\t\t\treturn eq;\r\n\t\t}",
"private double calculeSalaires() {\n return salaireHoraire * heures;\n }",
"private static byte[] getSalt() throws NoSuchAlgorithmException\n {\n SecureRandom sr = SecureRandom.getInstance(prngAlgo);\n //Create array for salt\n byte[] salt = new byte[16];\n //Get a random salt\n sr.nextBytes(salt);\n //return salt\n return salt;\n }",
"public int getSalary()\n\n\t{\n\t\treturn salary;\n\t}",
"public long getSIdim() {\n\t\treturn(mksa);\n\t}",
"int getSalary();",
"Long crear(Espacio espacio);",
"@Override\n\tprotected String getSalirForward() {\n\t\treturn null;\n\t}",
"@Override\n void procesarSalida(Simulacion s, Evento e) {\n e.consulta.estadistEjec_Sentencias.tiempoSalidaModulo = e.tiempo;\n e.consulta.estadistEjec_Sentencias.tiempoEnModulo = e.tiempo - e.consulta.estadistEjec_Sentencias.tiempoLlegadaModulo;\n Evento evento = new Evento(e.consulta);\n evento.tipoE = Evento.TipoEvento.ENTRADA;\n evento.modulo = Evento.TipoModulo.ADM_CONEXIONES;\n evento.tiempo = e.tiempo;\n numServOcupados--;\n s.listaE.add(evento);\n\n if (!colaC.isEmpty()) { //Si despues de una salida hay algo en cola\n Consulta consulta = colaC.remove();\n consulta.estadistEjec_Sentencias.tiempoSalidaCola = e.tiempo - consulta.estadistEjec_Sentencias.tiempoLlegadaModulo;\n s.estadisticasT.promedioColaES += colaC.size();\n Evento eventoS = new Evento(consulta);\n eventoS.tipoE = Evento.TipoEvento.SALIDA;\n eventoS.modulo = Evento.TipoModulo.EJEC_SENTENCIAS;\n ejecucionSentencia(consulta);\n eventoS.tiempo = e.tiempo + tiempoEjecucion;\n s.listaE.add(eventoS);\n numServOcupados++;\n }\n\n }",
"public GeneradorSaludos()\n {\n mensaje = \"\\nSaludo en modo texto \\n\\nBienvenido/a al curso de programación \\n\" + \n \"orientada a objetos en Java utilizando BlueJ\";\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\t//doing lazy-load\r\n\t\t\t\tmasterAEnt.getDetailAEntCol().size();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest.this\r\n\t\t\t\t\t.manager\r\n\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tSignatureBean signatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQUVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoiZGV0YWlsQUVudENvbCIsInJhd0tleVZhbHVlcyI6WyIxIl0sInJhd0tleVR5cGVOYW1lcyI6WyJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tCollection<DetailAEnt> detailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\tArrayList<DetailAEnt> detailAEntCuttedCol = new ArrayList<>();\r\n\t\t\t\tdetailAEntCuttedCol.add(new ArrayList<>(detailAEntCol).get(0));\r\n\t\t\t\tdetailAEntCuttedCol.add(new ArrayList<>(detailAEntCol).get(1));\r\n\t\t\t\tPlayerSnapshot<Collection<DetailAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(detailAEntCuttedCol);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\t//doing lazy-load\r\n\t\t\t\tmasterAEnt.getDetailAEntCol().size();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest.this\r\n\t\t\t\t\t.manager\r\n\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tSignatureBean signatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQUVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoiZGV0YWlsQUVudENvbCIsInJhd0tleVZhbHVlcyI6WyIxIl0sInJhd0tleVR5cGVOYW1lcyI6WyJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tCollection<DetailAEnt> detailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\tArrayList<DetailAEnt> detailAEntCuttedCol = new ArrayList<>();\r\n\t\t\t\tdetailAEntCuttedCol.add(new ArrayList<>(detailAEntCol).get(1));\r\n\t\t\t\tdetailAEntCuttedCol.add(new ArrayList<>(detailAEntCol).get(2));\r\n\t\t\t\tPlayerSnapshot<Collection<DetailAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(detailAEntCuttedCol);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public double getSaldo() {\r\n return saldo;\r\n }",
"public double getSaldo() {\r\n return saldo;\r\n }",
"@Override\n public double calculaSalario() \n {\n double resultado = valor_base - ((acumulado * 0.05) * valor_base);\n resultado += auxilioProcriacao();\n //vale-coxinha\n resultado += 42;\n return resultado;\n }",
"private final byte[] generateSalt() throws NoSuchAlgorithmException {\n\t\tSecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\");\n\t\tbyte[] salt = new byte[8];\n\t\trandom.nextBytes(salt);\n\t\treturn salt;\n\t}",
"private String calulateHash() {\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(creator) +\r\n\t\t\t\t\tname+description+begin+end+end_subscription+\r\n\t\t\t\t\tmin_capacity+max_capacity+ date_creation_transaction.getTime()\r\n\t\t\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn StringUtil.applySha256(\r\n\t\t\t\t\tStringUtil.getStringFromKey(subscriber) + id_event);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"public String salvar(PessoaJuridica pessoaJuridica) {\n\t\t\r\n\t\treturn \"Salvo\";\r\n\t}",
"int updateNavegacionSalida(final Long srvcId);",
"@Override\n\tpublic void computeSalary(int empid) {\n\t\t\n\t}",
"public Produto salvarProduto(Produto Produto) {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic int save(SpUser t) {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic void salvar() {\n\t\t\n\t\tPedidoCompra PedidoCompra = new PedidoCompra();\n\t\t\n\t\tPedidoCompra.setAtivo(true);\n//\t\tPedidoCompra.setNome(nome.getText());\n\t\tPedidoCompra.setStatus(StatusPedido.valueOf(status.getSelectionModel().getSelectedItem().name()));\n//\t\tPedidoCompra.setSaldoinicial(\"0.00\");\n\t\t\n\t\tPedidoCompra.setData(new Date());\n\t\tPedidoCompra.setIspago(false);\n\t\tPedidoCompra.setData_criacao(new Date());\n\t\tPedidoCompra.setFornecedor(cbfornecedores.getSelectionModel().getSelectedItem());\n\t\tPedidoCompra.setTotal(PedidoCompra.CalcularTotal(PedidoCompra.getItems()));\n\t\tPedidoCompra.setTotalpago(PedidoCompra.CalculaTotalPago(PedidoCompra.getFormas()));\n\t\t\n\t\tgetservice().save(PedidoCompra);\n\t\tsaveAlert(PedidoCompra);\n\t\tclearFields();\n\t\tdesligarLuz();\n\t\tloadEntityDetails();\n\t\tatualizar.setDisable(true);\n\t\tsalvar.setDisable(false);\n\t\t\n\t\tsuper.salvar();\n\t}",
"public void salvarProfessor(){\n \n this.professor.setName(nome);\n this.professor.setEmail(email);\n this.professor.setSenha(senha);\n\n try {\n \n this.professorServico.persistence(this.professor);\n \n } catch (CadastroUsuarioException ex) {\n \n //Precisa tratar aqui!\n }\n \n setNome(null);\n setEmail(null);\n setSenha(null);\n }",
"private void salvar() {\n setaCidadeBean();\n //Instanciamos o DAO\n CidadeDAO dao = new CidadeDAO();\n //verifica qual será a operação de peristência a ser realizada\n if (operacao == 1) {\n dao.inserir(cidadeBean);\n }\n if (operacao == 2) {\n dao.alterar(cidadeBean);\n }\n habilitaBotoesParaEdicao(false);\n reiniciaTela();\n }",
"public abstract String getSecret();",
"@Override\n public double getAnnualSalary() {\n return super.getAnnualSalary() + 10000;\n }",
"@Override\r\n\tpublic double aumentarSueldo() {\n\t\treturn 0;\r\n\t}",
"@Override\n public void salvar(Object pacienteParametro) {\n Paciente paciente;\n paciente = (Paciente) pacienteParametro;\n EntityManagerFactory factory = Persistence.createEntityManagerFactory(\"vesaliusPU\"); \n EntityManager em = factory.createEntityManager();\n em.getTransaction().begin();\n if(paciente.getIdPaciente() == 0){\n em.persist(paciente);\n }else{\n em.merge(paciente);\n }\n em.getTransaction().commit();\n em.close();\n factory.close();\n }",
"public double getSaldo() {\n return saldo;\n }",
"public double getSaldo() {\n return saldo;\n }",
"@Override\r\n public int getsaleId() {\n return this.saleId;\r\n }",
"public void salary(int sal)\n {\n System.out.println(\"Base Salary: \"+ sal);\n }",
"long getLastPersistenceWrittenBytes();",
"public static crearNuevaSalida getInstance() {\n if (myInstance == null) {\n myInstance = new crearNuevaSalida();\n }\n return myInstance;\n }",
"public byte[] getSalt() {\n return mSalt;\n }",
"@Override\r\n\tpublic int registrarSalidaVehiculo(Vehiculo vehiculo) {\r\n\r\n\t\tSitioParqueoEntidad sitParEntidad = sitioParqueoEntidadService.obtenerSitioParqueo(vehiculo);\r\n\r\n\t\tsitParEntidad.setActivo(false);\r\n\t\tsitParEntidad.setFechaFin(new Date());\r\n\t\tSitioParqueoEntidad sitParEntRet = sitioParqueoEntidadService.liberar(sitParEntidad);\r\n\r\n\t\tadminEstacionamiento.removerSitioParqueo(sitParEntRet);\r\n\r\n\t\tTiempoEstadia tiempoEstadia = Temporizador.calcularTiempoEstadia(sitParEntidad.getFechaInicio());\r\n\t\treturn ReglaEstacionamiento.calcularPrecioParqueo(\r\n\t\t\t\tVehiculoAdapter.getVehiculo(sitParEntRet.getVehiculo()), tiempoEstadia);\r\n\r\n\t}",
"public abstract long mo131997a() throws IOException;",
"@Override\r\n\tpublic String hashFunction(String saltedPass) throws NoSuchAlgorithmException\r\n\t{\r\n\t\tMessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\r\n\t\tbyte[] byteHash = digest.digest(saltedPass.getBytes(StandardCharsets.UTF_8));\r\n\t\thash = DatatypeConverter.printBase64Binary(byteHash);\r\n\t\treturn hash;\r\n\t}",
"public byte[] getSalt() {\n\t\treturn salt;\n\t}",
"public void operar() {\n\t\tOperacionMetodoRef op2 = MetRefApp::referenciaMedodoStatic;\n\t\top2.saludar();\n\t}",
"@Override\r\n public double getSalary() {\r\n return salary;\r\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\t//doing lazy-load\r\n\t\t\t\tmasterAEnt.getDetailAEntCol().size();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest.this\r\n\t\t\t\t\t.manager\r\n\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tSignatureBean signatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQUVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoiZGV0YWlsQUVudENvbCIsInJhd0tleVZhbHVlcyI6WyIxIl0sInJhd0tleVR5cGVOYW1lcyI6WyJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tCollection<DetailAEnt> detailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\tPlayerSnapshot<Collection<DetailAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(detailAEntCol);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Override\n\tpublic br.ce.Disciplina.entity.Disciplina salvar(\n\t\t\tbr.ce.Disciplina.entity.Disciplina entity) throws Exception {\n\t\treturn null;\n\t}",
"public abstract void raiseSalary();"
]
| [
"0.6796437",
"0.6416407",
"0.64156306",
"0.62267494",
"0.5947141",
"0.5900508",
"0.58829486",
"0.5873976",
"0.58255255",
"0.57976246",
"0.5739377",
"0.5739377",
"0.57144773",
"0.57046145",
"0.568394",
"0.5672894",
"0.56644595",
"0.5607419",
"0.5483972",
"0.5475319",
"0.54198056",
"0.53940237",
"0.5385101",
"0.53552324",
"0.53485066",
"0.5331923",
"0.53207296",
"0.53170246",
"0.53083175",
"0.53055775",
"0.5276898",
"0.52694297",
"0.5230132",
"0.52288836",
"0.521953",
"0.5214231",
"0.52124596",
"0.52121425",
"0.5211224",
"0.5200309",
"0.5193217",
"0.5182786",
"0.517097",
"0.5155685",
"0.5142234",
"0.5134105",
"0.5114481",
"0.5112938",
"0.5111642",
"0.51095945",
"0.5094516",
"0.50886905",
"0.5079445",
"0.5068837",
"0.5065209",
"0.50595826",
"0.5058586",
"0.5047564",
"0.5043355",
"0.5041964",
"0.5036349",
"0.50344473",
"0.5026287",
"0.50258243",
"0.5019326",
"0.5011893",
"0.5011657",
"0.50071585",
"0.50071585",
"0.50005454",
"0.50002515",
"0.4999561",
"0.49955282",
"0.49896628",
"0.49868202",
"0.49830136",
"0.49818817",
"0.49741954",
"0.4973928",
"0.4963594",
"0.4960793",
"0.4959095",
"0.49561602",
"0.4955903",
"0.49489728",
"0.49489728",
"0.49486962",
"0.49474862",
"0.49455178",
"0.49413028",
"0.4940557",
"0.4930059",
"0.49289203",
"0.4923244",
"0.49219745",
"0.49192345",
"0.49189633",
"0.4915814",
"0.49072856",
"0.48990464"
]
| 0.6608503 | 1 |
Metodo para obtener la imagen del componente. | public ImageView getImage() {
ImageView and = new ImageView(Image);
and.setFitWidth(70);
and.setFitHeight(50);
return and;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getImage();",
"public String getImagen() {\n return imagen;\n }",
"Imagem getImagem();",
"String getImage();",
"Picture identifyComponentImage() throws Exception;",
"@Override\r\n\tpublic Image getImg() {\n\t\treturn img.getImage();\r\n\t}",
"public Image getImagenI() {\n return animacion.getImagen().getImage();\n }",
"public int getImage();",
"@Override\n\tpublic Image getImage() {\n\t\treturn img;\n\t}",
"@Override\r\n\tpublic int getImage() {\n\t\treturn Parametre.BALLE;\r\n\t}",
"public String getImage() { return image; }",
"WorldImage getImage();",
"public xPIC getPic() {\r\n return pic_;\r\n }",
"public javafx.scene.image.Image getImage() {\n return super.getImage();\n }",
"public javafx.scene.image.Image getImage() {\n return super.getImage();\n }",
"public javafx.scene.image.Image getImage() {\n return super.getImage();\n }",
"BufferedImage getImage();",
"BufferedImage getImage();",
"BufferedImage getImage();",
"public double getImag() {return this.imag;}",
"public BufferedImage getImage() {\n\t\t return img;\n\t}",
"public BufferedImage getImage() {\n/* 81 */ return this.bufImg;\n/* */ }",
"public BufferedImage getImage() {\n\t\tTelaInterna ti = ( TelaInterna )contentPane.getSelectedFrame();\n\t\tBufferedImage img;\n\t\timg = ti.getImage();\n\t\treturn img;\n\t}",
"@Override\n\tpublic Image getImage() {\n\t\treturn image;\n\t}",
"public BufferedImage getImage() {\t\r\n\t\treturn this.image;\t\t\t\r\n\t}",
"public ColorImage getImagem(){\n\t\treturn copiaFoto(this.fotografia);\n\t}",
"public PImage getImg() {\n \treturn img;\n }",
"public String getImage()\n {\n return image;\n }",
"public Image getImagen() {\n\t\tRectangle rootFigureBounds = this.getBounds();\n\t\tGC figureCanvasGC = new GC(this.canvas);\n\n\t\tImage image = new Image(this.canvas.getDisplay(), rootFigureBounds.width,\n\t\t\t\trootFigureBounds.height);\n\t\tGC imageGC = new GC(image);\n\n\t\timageGC.setBackground(figureCanvasGC.getBackground());\n\t\timageGC.setForeground(figureCanvasGC.getForeground());\n\t\timageGC.setFont(figureCanvasGC.getFont());\n\t\timageGC.setLineStyle(figureCanvasGC.getLineStyle());\n\t\timageGC.setLineWidth(figureCanvasGC.getLineWidth());\n\t\t// imageGC.setXORMode(figureCanvasGC.getXORMode());\n\n\t\tGraphics imgGraphics = new SWTGraphics(imageGC);\n\t\tthis.paint(imgGraphics);\n\n\t\treturn image;\n\t}",
"public Coloca_imagen(){\n \n \n }",
"public Graphics getImageGraphics() {\n\t\treturn image.getGraphics();\n\t}",
"PImage getImage() {\n return _img;\n }",
"public String getStaticPicture();",
"public Image getPic() {\n return pic;\n }",
"public BufferedImage getImage() {\n return image;\n }",
"public ImageIcon getImage()\n {\n return image;\n }",
"public Texture getImage(){\n\t\treturn images[0];\t\t\n\t}",
"public Bitmap getImage(){\n return images[currentFrame];\n }",
"public BufferedImage getImage()\n \t{\n \t\ttry\n \t\t{\n \t\t\tif(bi==null)\n \t\t\t{\n \t\t\t\tint\n \t\t\t\t\tiWidth=(int)(getInteger(PROPERTY_WIDTH)*getQuestion().getZoom()),\n \t\t\t\t\tiHeight=(int)(getInteger(PROPERTY_HEIGHT)*getQuestion().getZoom());\n \n \t\t\t\t// Create image\n \t\t\t\tbi=new BufferedImage(iWidth,iHeight,BufferedImage.TYPE_INT_RGB);\n \n \t\t\t\t// Fill to background\n \t\t\t\tGraphics g=bi.getGraphics();\n \t\t\t\tg.setColor(getBackground());\n \t\t\t\tg.fillRect(0,0,iWidth,iHeight);\n \t\t\t}\n \t\t\treturn bi;\n \t\t}\n \t\tcatch(OmDeveloperException ode)\n \t\t{\n \t\t\tthrow new OmUnexpectedException(ode);\n \t\t}\n \t}",
"public ImageIcon getImage();",
"public String getImg(){\n return img;\n }",
"public String getImg_0() {\n return img_0;\n }",
"public String getImage() {\n return image;\n }",
"@Override\n\tImageIcon getImage() {\n\t\treturn img;\n\t}",
"public String getImg() {\n return img;\n }",
"public String getImg() {\n return img;\n }",
"public String getImg() {\n return img;\n }",
"Picture colourComponentImage() throws Exception;",
"public PImage getImage() {\n return this.image;\n }",
"public double getIm() {\r\n return im;\r\n }",
"@Override\n public String GetImagePart() {\n return \"coal\";\n }",
"public Image getImage() {\r\n\t\treturn GDAssemblerUI.getImage(GDAssemblerUI.IMAGE_GD);\r\n\t}",
"public String getImage() {\n return this.Image;\n }",
"public String getImage() {\n return image;\n }",
"public String getImage() {\n return image;\n }",
"public String getImage() {\n return image;\n }",
"public String getImage() {\n return image;\n }",
"public ImageIcon getImage(){\n\t\treturn this.image;\n\t}",
"public ImageIcon getCardPicture()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************** Start getCardPicture Method *****************/\n\n // Return card picture\n return picture;\n\n }",
"public ImageIcon getFoto(){\r\n return (ImageIcon)beneficiario[5];\r\n }",
"public String getImage() {\n\t\treturn image;\n\t}",
"public String getImage() {\n\t\treturn image;\n\t}",
"@Override\n\tpublic final Image getImage() {\n\t\treturn this.getSprite().getImage();\n\t}",
"public final ImageProcessor getImage() {\r\n return image;\r\n }",
"public BufferedImage getImage() {\n\t\treturn this.image;\n\t}",
"Picture binaryComponentImage() throws Exception;",
"public double getIm() {\n return im;\n }",
"com.google.protobuf.ByteString getPicture();",
"public Image getImage() {\n MimsChartPanel mcp = getChartPanel();\n if (mcp == null) {\n return null;\n }\n BufferedImage img = mcp.getChart().createBufferedImage(mcp.getWidth(), mcp.getHeight());\n if (img == null) {\n return null;\n }\n return img;\n }",
"public String getaImg() {\n return aImg;\n }",
"public String getPicture() {\r\n return picture;\r\n }",
"public Label getPic(){\n //try {//getPic is only called if isPic is true, so side1 would contain picture path\n /*BufferedImage unsized = ImageIO.read(new File(side1));\n BufferedImage resized = resizeImage(unsized,275,250, unsized.getType());\n frontPic.setIcon(new ImageIcon(resized));*/\n\n\t\t\tImage image = new Image(new File(side1).toURI().toString());\n\t\t\tImageView iv = new ImageView(image);\n\t\t\tLabel imageLabel = new Label(\"Image\");\n\t\t\timageLabel.setGraphic(iv);\n\t\t\treturn imageLabel;\n /*} catch (IOException ex) {\n System.out.println(\"Trouble reading from the file: \" + ex.getMessage());\n }\n return frontPic;*/\n }",
"public ImageIcon getImageIcon() {\n return animacion.getImagen();\n }",
"public ImageIcon image() {\n return image;\n }",
"public String getPic() {\n return pic;\n }",
"public String getPic() {\n return pic;\n }",
"public abstract Image getImage();",
"public abstract Image getImage();",
"public Bitmap getImage() {\n return image;\n }",
"public Image getImage() {\r\n return image;\r\n }",
"public Picture picture() {\n return pic;\n }",
"public BufferedImage getPlan()\n { \n return imgPlan;\n }",
"public Image getImage()\n {\n if (fill instanceof ImageFill)\n {\n return ((ImageFill) fill).getImage();\n }\n else\n {\n return null;\n }\n }",
"private PlanarImage getImage() {\n PlanarImage img = roiImage;\n if (img == null) {\n synchronized (this) {\n img = roiImage;\n if (img == null) {\n roiImage = img = roi.getAsImage();\n }\n }\n }\n return img;\n }",
"public Image getImage() {\n return image;\n }",
"public BufferedImage getDati()\n { \n return imgDati;\n }",
"public Image getImage() {\n return image;\n }",
"public Image getImage() {\n\t\treturn image;\r\n\t}",
"@Override\n\tpublic BufferedImage getImage() {\n\t\tif (cimg == null)\n\t\t\ttry {\n\t\t\t\tcimg = ImageIO.read(WizardRpgXpVxLicenePage.class.getResource(\"licence.jpg\"));\n\t\t\t} catch (Throwable t) {\n\t\t\t\tYEx.info(\"Can not load Image \" + getImgName() + \" for wizard\", t);\n\t\t\t}\n\t\treturn cimg;\n\t}",
"protected DraggableImage getPanelPathImage() {\n\treturn pathImage;\n }",
"public Drawable getImage(){\n\t\treturn mImage;\n\t}",
"public BufferedImage getImage()\r\n\t{\r\n\t\treturn mImageBuffer;\r\n\t}",
"public Image getImage() {\r\n\t\treturn image;\r\n\t}",
"public GraphicalImage getGImg() { return gimg; }",
"public ImageComponent fetchImageComponent(String filename)\n throws IOException\n {\n ImageComponent ret_val = (ImageComponent)componentMap.get(filename);\n \n if(ret_val == null)\n {\n ret_val = load2DImage(filename);\n componentMap.put(filename, ret_val);\n }\n \n return ret_val;\n }",
"public Picture pic() {\n return pic;\n }",
"public ImageInfo getImage() {\n return image;\n }",
"public String getImage() {\n\t\treturn null;\n\t}",
"public ImageIcon getImage() {\n\t\treturn this.image;\n\t}",
"public Image getInstanceImage() {\r\n return this.image;\r\n }",
"public Image getImage() {\n\t\treturn image;\n\t}"
]
| [
"0.6948323",
"0.6865293",
"0.68631023",
"0.68549526",
"0.68424386",
"0.6838729",
"0.67394817",
"0.67086464",
"0.6705469",
"0.6625476",
"0.6619396",
"0.6618936",
"0.65329003",
"0.65300786",
"0.65300786",
"0.65300786",
"0.6528974",
"0.6528974",
"0.6528974",
"0.65281755",
"0.6527683",
"0.651884",
"0.65187246",
"0.6514555",
"0.6505789",
"0.65039366",
"0.650211",
"0.6496483",
"0.6489208",
"0.64820176",
"0.6476385",
"0.64610916",
"0.6460812",
"0.646015",
"0.64461035",
"0.6443473",
"0.6426451",
"0.6423141",
"0.6409919",
"0.6401182",
"0.6399188",
"0.6384596",
"0.63841885",
"0.6383633",
"0.6381981",
"0.6381981",
"0.6381981",
"0.6377996",
"0.63764536",
"0.6369783",
"0.6368029",
"0.6363628",
"0.6360677",
"0.6348814",
"0.6348814",
"0.6348814",
"0.6348814",
"0.63381606",
"0.6318738",
"0.6317661",
"0.6314921",
"0.6314921",
"0.631358",
"0.6312299",
"0.6309668",
"0.6309338",
"0.6307106",
"0.6306701",
"0.6284038",
"0.6281165",
"0.6276022",
"0.6275315",
"0.62745523",
"0.62644786",
"0.62560374",
"0.62560374",
"0.62457925",
"0.62457925",
"0.623131",
"0.621394",
"0.6192424",
"0.61882126",
"0.61857265",
"0.6168426",
"0.61597323",
"0.61590344",
"0.61569107",
"0.6153331",
"0.61521196",
"0.6151602",
"0.6150901",
"0.61439914",
"0.6141887",
"0.61406314",
"0.6136294",
"0.61311466",
"0.6116517",
"0.61103994",
"0.61029905",
"0.60981613",
"0.6084714"
]
| 0.0 | -1 |
Metodo que retorna el atributo de input1. | public int getInput1() {
return input1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getInput1() {\n return input1;\n }",
"public String getInput2() {\n return input2;\n }",
"public int getInput2() {\n return input2;\n }",
"public String getAttr1() {\n return attr1;\n }",
"public String getAttr1() {\n return attr1;\n }",
"public void setInput1(final String input1) {\n this.input1 = input1;\n }",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public String getInput3() {\n return input3;\n }",
"public String getAttribute1() {\n return attribute1;\n }",
"public int input1(){\n int Input1 = Integer.parseInt(numerator1.getText());\n return Input1;\n }",
"INPUT createINPUT();",
"Input getObjetivo();",
"public String getUser1()\n {\n return userInput1;\n }",
"public String getAttribute1()\n {\n return (String)getAttributeInternal(ATTRIBUTE1);\n }",
"Input createInput();",
"public String getInputPath2() {\n\t\treturn inputPath2;\n\t}",
"public String getAttr2() {\n return attr2;\n }",
"public String getAttr2() {\n return attr2;\n }",
"public String getUser2()\n {\n return userInput2;\n }",
"@Override\n\tpublic java.lang.String getField1() {\n\t\treturn _second.getField1();\n\t}",
"public String getAttribute1() {\n return (String)getAttributeInternal(ATTRIBUTE1);\n }",
"public String getAttribute1() {\n return (String)getAttributeInternal(ATTRIBUTE1);\n }",
"public String getAttribute1() {\n return (String)getAttributeInternal(ATTRIBUTE1);\n }",
"public String getAttribute1() {\n return (String)getAttributeInternal(ATTRIBUTE1);\n }",
"public String getAttribute1() {\n return (String)getAttributeInternal(ATTRIBUTE1);\n }",
"public void setInput2(int input2) {\n this.input2 = input2;\n }",
"public String getField1(){\n return field1;\n }",
"public String getExtra1() {\n return extra1;\n }",
"public java.lang.Integer getAttributes1() {\r\n return attributes1;\r\n }",
"public String getAttribute1() {\n return (String) getAttributeInternal(ATTRIBUTE1);\n }",
"com.google.cloud.documentai.v1beta2.InputConfig getInputConfig();",
"public void setInput2(final String input2) {\n this.input2 = input2;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"Inputs getInputs();",
"public String getIntAttribute1() {\n return (String) getAttributeInternal(INTATTRIBUTE1);\n }",
"String getInput();",
"InputValueDefinition createInputValueDefinition();",
"InputsType getInputs();",
"R extractRawInputs(I input);",
"public String getAttribute2() {\n return attribute2;\n }",
"public IInputType getPrimaryInputType();",
"public String getInput() {\n return input;\n }",
"public String getInputName(){\n \treturn model.getName();\n }",
"Pair<String, String> getAdditionalAttribute();",
"public Object entryToObject(TupleInput ti) {\n BaseTuple bt = new BaseTuple(r);\n\n for(int i = 0; i < r.getNumberOfAttributes(); i++) {\n if(r.getAttributeType(i) == Globals.INTEGER) {\n bt.setAttributeValueByPosition(i, new Integer(ti.readInt()));\n } else {\n assert r.getAttributeType(i) == Globals.STRING;\n bt.setAttributeValueByPosition(i, ti.readString());\n }\n }\n\n return bt;\n }",
"private int scanOneAttribute(char[] input,\n int offset,\n int end,\n int[] lineNr)\n throws XMLParseException {\n String key;\n String value;\n\n key = this.scanIdentifier(input, offset, end);\n\n if (key == null) {\n throw this.syntaxError(\"an attribute key\", lineNr[0]);\n }\n\n offset = this.skipWhitespace(input, offset + key.length(), end, lineNr);\n\n if (this.ignoreCase) {\n key = key.toUpperCase();\n }\n\n if (input[offset] != '=') {\n throw this.valueMissingForAttribute(key, lineNr[0]);\n }\n\n offset = this.skipWhitespace(input, offset + 1, end, lineNr);\n\n value = this.scanString(input, offset, end, lineNr);\n\n if (value == null) {\n throw this.syntaxError(\"an attribute value\", lineNr[0]);\n }\n\n if ((value.charAt(0) == '\"') || (value.charAt(0) == '\\'')) {\n value = value.substring(1, (value.length() - 1));\n offset += 2;\n }\n\n this.attributes.put(key, this.decodeString(value, lineNr[0]));\n return offset + value.length();\n }",
"Input getInputs();",
"public abstract Object getInput ();",
"public String getOriginalInput() {\n return this.input;\n }",
"public void setAttr1(String attr1) {\n this.attr1 = attr1;\n }",
"public void setAttr1(String attr1) {\n this.attr1 = attr1;\n }",
"public Integer getInt1() {\n\t\treturn int1;\n\t}",
"public String[] getInputNominalValues(){\r\n\t\treturn nominalValues[0];\r\n\t}",
"public int getOfYourChoiceInput() {\n return ofYourChoiceInput;\n }",
"public String inputName() {\n String name = editTextName.getText().toString();\n return name;\n }",
"public Integer getInputNum() {\r\n return inputNum;\r\n }",
"public static Input getInput() {\r\n return input;\r\n }",
"public int getAtt(){ \r\n return att;\r\n }",
"public String getInputInfo (int index) {\n\t\tswitch (index) {\n\t\t\tcase 0: return \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><D2K> <Info common=\\\"population\\\"> <Text>input population, with ranked and unranked individuals. </Text> </Info></D2K>\";\n\t\t\tdefault: return \"No such input\";\n\t\t}\n\t}",
"@Override final protected Object[] getInputDefaults() { return this.InputDefaults; }",
"InputPin getSecond();",
"public String getAttr3() {\n return attr3;\n }",
"public String getAttr3() {\n return attr3;\n }",
"public Person getPersonInput() {\n\t\treturn this.personInput;\n\t}",
"private String getAttrValue(Object name) {\n\t return (String)this.mAtts.get(name);//.toString();\n\t}",
"Attribute getAttribute();",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Specify the input format.\")\n @JsonProperty(JSON_PROPERTY_INPUT)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public InputEnum getInput() {\n return input;\n }",
"java.lang.String getField1331();",
"@Override\n\tpublic int getField1() {\n\t\treturn -1;\n\t}",
"public void setInput(String input) { this.input = input; }",
"public String getInputor() {\r\n\t\treturn inputor;\r\n\t}",
"com.google.cloud.dialogflow.v2.InputConfig getInputConfig();",
"public String inputSpecialized() {\n String specialized = editTextSpecial.getText().toString();\n return specialized;\n }",
"public String getExtra2() {\n return extra2;\n }",
"public void setInput(String input);",
"public String getMainNodeInput(MainNode node) {\n return node.input;\n }",
"public String arg1() {\r\n return command.split(\"\\\\s+\")[1];\r\n }",
"public String arg1() {\n CommandType type = this.commandType();\n if (type == CommandType.C_ARITHMETIC) {\n return instructionChunks[0];\n }\n return instructionChunks[1];\n }",
"@Override\n\tpublic java.lang.String getField1() {\n\t\treturn _employee.getField1();\n\t}",
"public long getField1() {\n return field1_;\n }",
"public String getLine1() {\n return line1;\n }",
"public String getLine1() {\n return line1;\n }",
"protected Object getInitialInput() {\n return this;\n }",
"public Input getInput() {\n return this.input;\n }",
"java.lang.String getField1168();",
"public void setInputPath2(String inputPath2) {\n\t\tthis.inputPath2 = inputPath2;\n\t}",
"String attributeToGetter(String name);",
"java.lang.String getField1161();",
"public String getAttribute2()\n {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public final EObject ruleGetInput() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_1=null;\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:6406:2: ( (otherlv_0= Get_input ( (otherlv_1= RULE_ID ) ) ) )\n // InternalRMParser.g:6407:2: (otherlv_0= Get_input ( (otherlv_1= RULE_ID ) ) )\n {\n // InternalRMParser.g:6407:2: (otherlv_0= Get_input ( (otherlv_1= RULE_ID ) ) )\n // InternalRMParser.g:6408:3: otherlv_0= Get_input ( (otherlv_1= RULE_ID ) )\n {\n otherlv_0=(Token)match(input,Get_input,FOLLOW_5); \n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getGetInputAccess().getGet_inputKeyword_0());\n \t\t\n // InternalRMParser.g:6412:3: ( (otherlv_1= RULE_ID ) )\n // InternalRMParser.g:6413:4: (otherlv_1= RULE_ID )\n {\n // InternalRMParser.g:6413:4: (otherlv_1= RULE_ID )\n // InternalRMParser.g:6414:5: otherlv_1= RULE_ID\n {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getGetInputRule());\n \t\t\t\t\t}\n \t\t\t\t\n otherlv_1=(Token)match(input,RULE_ID,FOLLOW_2); \n\n \t\t\t\t\tnewLeafNode(otherlv_1, grammarAccess.getGetInputAccess().getInputEParameterDefinitionCrossReference_1_0());\n \t\t\t\t\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public String getInputNominalValues(int pos){\r\n\t\treturn nominalValues[0][pos];\r\n\t}",
"public long getField1() {\n return field1_;\n }",
"public TInputParameterElements getTInputParameterAccess() {\n\t\treturn pTInputParameter;\n\t}",
"java.lang.String getField1120();",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput getDummyInput();",
"public Integer getIntegerAttribute();",
"public int getData1() {\n return data1_;\n }",
"public int getData1() {\n return data1_;\n }",
"public String getAttr6() {\n return attr6;\n }",
"public String getInput() {\n return this.input.substring(this.index);\n }"
]
| [
"0.71975756",
"0.6727689",
"0.66125536",
"0.6381672",
"0.6381672",
"0.62782854",
"0.6240828",
"0.61063963",
"0.60453796",
"0.60050464",
"0.5881969",
"0.584987",
"0.57733405",
"0.5693626",
"0.5646471",
"0.5640984",
"0.5629907",
"0.5629907",
"0.5597703",
"0.55790967",
"0.55588436",
"0.55588436",
"0.55588436",
"0.55588436",
"0.55588436",
"0.55257815",
"0.5501046",
"0.54940355",
"0.5491455",
"0.54657376",
"0.54349387",
"0.5413217",
"0.53804904",
"0.5361101",
"0.53542864",
"0.5301637",
"0.5289413",
"0.52864987",
"0.52600414",
"0.52537453",
"0.5252972",
"0.52044934",
"0.51924163",
"0.5188896",
"0.5179296",
"0.51678175",
"0.5167265",
"0.5167118",
"0.51653814",
"0.5154632",
"0.5154632",
"0.51196694",
"0.5092406",
"0.5084021",
"0.5081644",
"0.50795346",
"0.5079376",
"0.50767124",
"0.5071785",
"0.5069935",
"0.506366",
"0.50613666",
"0.50613666",
"0.5017375",
"0.5013149",
"0.501195",
"0.5004503",
"0.49993932",
"0.49889436",
"0.49786744",
"0.49785894",
"0.4972378",
"0.49705637",
"0.49664792",
"0.4965964",
"0.49621126",
"0.49592608",
"0.4957773",
"0.49437612",
"0.494249",
"0.4939562",
"0.493233",
"0.49203777",
"0.49181077",
"0.4915016",
"0.4913965",
"0.49130285",
"0.491067",
"0.49029437",
"0.4890867",
"0.48907143",
"0.48876482",
"0.48840246",
"0.48807716",
"0.4880462",
"0.4871916",
"0.48706743",
"0.48706743",
"0.4869813",
"0.4861839"
]
| 0.7187308 | 1 |
Metodo que retorna el atributo de input2. | public int getInput2() {
return input2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getInput2() {\n return input2;\n }",
"public String getAttr2() {\n return attr2;\n }",
"public String getAttr2() {\n return attr2;\n }",
"public void setInput2(final String input2) {\n this.input2 = input2;\n }",
"public String getInput1() {\n return input1;\n }",
"public int getInput1() {\n return input1;\n }",
"public void setInput2(int input2) {\n this.input2 = input2;\n }",
"public String getAttribute2() {\n return attribute2;\n }",
"public String getUser2()\n {\n return userInput2;\n }",
"public String getInputPath2() {\n\t\treturn inputPath2;\n\t}",
"public String getAttribute2()\n {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public String getExtra2() {\n return extra2;\n }",
"public String getAttribute2() {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public String getAttribute2() {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public String getAttribute2() {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public String getAttribute2() {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public String getAttribute2() {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public String getInput3() {\n return input3;\n }",
"public String getAttribute2() {\n return (String) getAttributeInternal(ATTRIBUTE2);\n }",
"public void setInputPath2(String inputPath2) {\n\t\tthis.inputPath2 = inputPath2;\n\t}",
"public String getAttr1() {\n return attr1;\n }",
"public String getAttr1() {\n return attr1;\n }",
"public String getIntAttribute2() {\n return (String) getAttributeInternal(INTATTRIBUTE2);\n }",
"public String getUser1()\n {\n return userInput1;\n }",
"public Object getValue2() { return this.value2; }",
"Pair<String, String> getAdditionalAttribute();",
"public String arg2() {\r\n return command.split(\"\\\\s+\")[2];\r\n }",
"public void setAttr2(String attr2) {\n this.attr2 = attr2;\n }",
"public void setAttr2(String attr2) {\n this.attr2 = attr2;\n }",
"@Override\n\tpublic java.lang.String getField1() {\n\t\treturn _second.getField1();\n\t}",
"Input getObjetivo();",
"public String getAttribute1() {\n return attribute1;\n }",
"public java.lang.String getValue2() {\n return this.value2;\n }",
"INPUT createINPUT();",
"public String getLine2() {\n return line2;\n }",
"@Override\r\n\tpublic vec2 get2(String ponits) {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic boolean getField2() {\n\t\treturn _second.getField2();\n\t}",
"public String getHint2() {\n return this.hint2;\n }",
"public String getLine2() {\n return line2;\n }",
"public IpAddress getIpAddress2Value() throws JNCException {\n IpAddress ipAddress2 = (IpAddress)getValue(\"ip-address2\");\n if (ipAddress2 == null) {\n ipAddress2 = new IpAddress(\"0.0.0.0\"); // default\n }\n return ipAddress2;\n }",
"public String getImg_2() {\n return img_2;\n }",
"public int input1(){\n int Input1 = Integer.parseInt(numerator1.getText());\n return Input1;\n }",
"InputPin getSecond();",
"public String getExtAttribute2() {\n return (String) getAttributeInternal(EXTATTRIBUTE2);\n }",
"public void setInput1(final String input1) {\n this.input1 = input1;\n }",
"public String getAdr2() {\n return adr2;\n }",
"public String getAddr2() {\r\n return addr2;\r\n }",
"public String getOther2() {\n return other2;\n }",
"public String getText2() {\n return text2;\n }",
"public float getField2() {\n return field2_;\n }",
"public String getId2() {\n return id2;\n }",
"public java.lang.String getLine2() {\r\n return line2;\r\n }",
"public int arg2() {\n return Integer.parseInt(instructionChunks[2]);\n }",
"PToP.S2InfoReq getS2InfoReq();",
"public String getObj2 () {\r\n return Obj2; \r\n }",
"public String getValue2();",
"@Override\n\tpublic int getField3() {\n\t\treturn _second.getField3();\n\t}",
"public String getExtra1() {\n return extra1;\n }",
"public int getData2() {\n return data2_;\n }",
"public int getData2() {\n return data2_;\n }",
"public double getOperand2()\r\n\t{\r\n\t\tSystem.out.println(\"enter the operand 2:\");\r\n\t\tdouble op2=sc.nextDouble();\r\n\t\treturn op2;\r\n\t}",
"public java.lang.Integer getParameterType2() {\r\n return parameterType2;\r\n }",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public int getData2() {\n return data2_;\n }",
"public int getData2() {\n return data2_;\n }",
"public String getAddress2() {\r\n return address2;\r\n }",
"public int getNum2() {\r\n\t\t\t\treturn num2_;\r\n\t\t\t}",
"public float getField2() {\n return field2_;\n }",
"public int getX2() {\n\t\treturn x2;\n\t}",
"public String getAddressline2() {\n return addressline2;\n }",
"public String getOndaP2() {\r\n return ondaP2;\r\n }",
"public String getAddress2() {\n\t\treturn address2;\n\t}",
"public int getNum2() {\r\n\t\t\treturn num2_;\r\n\t\t}",
"Input createInput();",
"public IpAddress getIpAddress2Value() throws JNCException {\n return (IpAddress)getValue(\"ip-address2\");\n }",
"public String getField1(){\n return field1;\n }",
"public String getAttribute1()\n {\n return (String)getAttributeInternal(ATTRIBUTE1);\n }",
"float getField2();",
"public int getd2() {\n\t\treturn d2;\n\t}",
"@Nullable\n public final CharSequence getLabel2() {\n return mLabel2;\n }",
"public int getKeyShoot2() {\r\n return Input.Keys.valueOf(getKeyShoot2Name());\r\n }",
"public int getProperty2() {\n return property2_;\n }",
"public Point getP2(){\n return this.p2;\n }",
"public String getAddressLine2() {\n return (String)getAttributeInternal(ADDRESSLINE2);\n }",
"public java.lang.String getNAME2()\n {\n \n return __NAME2;\n }",
"public String getPra2() {\n return pra2;\n }",
"public String getTrait2_j() {\n \t\treturn trait2;\n \t}",
"public String getpasswordinput() {\n return tf2.getText();\n }",
"public String getApellido2() {\r\n\t\treturn apellido2;\r\n\t}",
"PToP.AS2Req getAS2Req();",
"public int getKeyEquip2() {\r\n return Input.Keys.valueOf(getKeyShoot2Name());\r\n }",
"public String getAttr3() {\n return attr3;\n }",
"public String getAttr3() {\n return attr3;\n }",
"public java.lang.String getC2()\n {\n return this.c2;\n }",
"public String getSrcAddress2() {\r\n return (String) getAttributeInternal(SRCADDRESS2);\r\n }",
"public String getRadius2()\n\t{\n\t\treturn radius2.getText();\n\t}",
"public double getAmount2() // getAmount2 method start\n\t\t{\n\t\t\treturn Double.parseDouble(amountField2.getText());\n\t\t}",
"public double getAmount2() // getAmount2 method start\n\t\t{\n\t\t\treturn Double.parseDouble(amountField2.getText());\n\t\t}",
"private static Instruction propagateSecondInputPrivacy(VariableCPInstruction inst, ExecutionContext ec){\n\t\treturn propagateInputPrivacy(inst, ec, inst.getInput2(), inst.getOutput());\n\t}",
"@AutoEscape\n\tpublic String getAddress2();"
]
| [
"0.75381446",
"0.67521507",
"0.67521507",
"0.65531147",
"0.6547684",
"0.6481341",
"0.6462556",
"0.63342416",
"0.6294313",
"0.62544703",
"0.6164706",
"0.6051284",
"0.60219294",
"0.60219294",
"0.60219294",
"0.60219294",
"0.60219294",
"0.59913737",
"0.5950473",
"0.58204836",
"0.5779203",
"0.5779203",
"0.5686549",
"0.56434333",
"0.5624413",
"0.55875254",
"0.55718476",
"0.55527425",
"0.55527425",
"0.55317664",
"0.55156815",
"0.54850906",
"0.54756236",
"0.5444746",
"0.54326457",
"0.5422873",
"0.5419506",
"0.54060435",
"0.5401499",
"0.53987944",
"0.53920776",
"0.5380038",
"0.536059",
"0.53380334",
"0.5326256",
"0.5325137",
"0.53148204",
"0.53117794",
"0.52981436",
"0.5285146",
"0.5272541",
"0.5272423",
"0.5256811",
"0.5246752",
"0.5243875",
"0.52435076",
"0.52348787",
"0.5228076",
"0.5227161",
"0.5227161",
"0.5226924",
"0.5216262",
"0.521497",
"0.52129084",
"0.52129084",
"0.5208312",
"0.5192922",
"0.5192158",
"0.51888096",
"0.5188315",
"0.5186344",
"0.51781684",
"0.51756954",
"0.5168934",
"0.51576596",
"0.5155521",
"0.5144344",
"0.51298153",
"0.51060134",
"0.51044255",
"0.51025105",
"0.5094189",
"0.5092395",
"0.5083679",
"0.5082791",
"0.5075694",
"0.50683314",
"0.50571436",
"0.50503576",
"0.50389534",
"0.50375956",
"0.5035135",
"0.5035135",
"0.5034809",
"0.5034438",
"0.5023089",
"0.50218153",
"0.50218153",
"0.5016094",
"0.49814785"
]
| 0.738085 | 1 |
Metodo que le da un valor al atributo de input1. | public void setInput1(int input1) {
this.input1 = input1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getInput1() {\n return input1;\n }",
"public void setInput1(final String input1) {\n this.input1 = input1;\n }",
"public String getInput1() {\n return input1;\n }",
"public int input1(){\n int Input1 = Integer.parseInt(numerator1.getText());\n return Input1;\n }",
"public String getInput2() {\n return input2;\n }",
"public int getInput2() {\n return input2;\n }",
"public void setInput2(int input2) {\n this.input2 = input2;\n }",
"public void setInput2(final String input2) {\n this.input2 = input2;\n }",
"public void setInput(String input);",
"public void setInput(String input) { this.input = input; }",
"public String getUser1()\n {\n return userInput1;\n }",
"public String getInput3() {\n return input3;\n }",
"public void setInput(Input input) {\n this.input = input;\n }",
"public void setInput(String input){\n this.input = input;\n }",
"Input getObjetivo();",
"public String getUser2()\n {\n return userInput2;\n }",
"@Override\n\tpublic void setInput(Input arg0) {\n\n\t}",
"@Override\n\tpublic void setInput(Input arg0) {\n\t\t\n\t}",
"Input createInput();",
"INPUT createINPUT();",
"public void setInput(String input) {\n\t\t\tthis.input = input;\n\t\t}",
"InputValueDefinition createInputValueDefinition();",
"public void Metodo1(String valor1){\r\n\r\n }",
"String getInput();",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public String getAttr1() {\n return attr1;\n }",
"public String getAttr1() {\n return attr1;\n }",
"public void setInput3(final String input3) {\n this.input3 = input3;\n }",
"public void setValue2 (String Value2);",
"public int getOfYourChoiceInput() {\n return ofYourChoiceInput;\n }",
"public InputSlotValue(String name) {\n this.name = name;\n }",
"public void userInput() {\r\n System.out.println(\"You want to convert from:\");\r\n this.fromUnit = in.nextLine();\r\n System.out.print(\"to: \");\r\n this.toUnit = in.nextLine();\r\n System.out.print(\"The value is \");\r\n this.value = in.nextDouble();\r\n }",
"public abstract Object getInput ();",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public String getValue2();",
"public java.lang.String getValue1() {\n return this.value1;\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Specify the input format.\")\n @JsonProperty(JSON_PROPERTY_INPUT)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public InputEnum getInput() {\n return input;\n }",
"public void setInputPath2(String inputPath2) {\n\t\tthis.inputPath2 = inputPath2;\n\t}",
"public String getInput() {\n return input;\n }",
"public abstract void inputChange( int value );",
"public Integer getInputNum() {\r\n return inputNum;\r\n }",
"public abstract void input();",
"@Override\n public void input() {\n super.input();\n Scanner sc = new Scanner(System.in);\n System.out.printf(\"Nhập số trang sách giáo khoa: \");\n amountPage = Integer.valueOf(sc.nextLine());\n System.out.printf(\"Nhập tình trạng sách giáo khoa: \");\n status = sc.nextLine();\n System.out.printf(\"Nhập số lượng mượn: \");\n amountBorrow= Integer.valueOf(sc.nextLine());\n }",
"public double getOperand1()\r\n\t{\r\n\t\tSystem.out.println(\"enter the operand 1:\");\r\n\t\tdouble op1=sc.nextDouble();\r\n\t\treturn op1;\r\n\t}",
"private void setInputParams(InputCommand input) throws InvalidCommand {\n if (input.getParams().length < 2) throw new InvalidCommand(\"Please enter car registration no. followed by color\");\n try {\n carRegNo = input.getParams()[0].toUpperCase();\n carColor = input.getParams()[1].toUpperCase();\n } catch (NumberFormatException e) {\n throw new InvalidCommand(\"Something went wrong.\\nMake sure the command is of the format: 'park KA-01-HH-9999 White'\");\n }\n }",
"InputPin getSecond();",
"TravelLength ControlInput(TravelLength input);",
"public String getInputPath2() {\n\t\treturn inputPath2;\n\t}",
"protected abstract void getInput();",
"public Value(String inputValue) {\n this.inputValue = inputValue;\n }",
"public String getAttribute1() {\n return attribute1;\n }",
"public void setInput(boolean input) {\n this.input = input;\n }",
"public void setInput(Input param) {\r\n localInputTracker = param != null;\r\n\r\n this.localInput = param;\r\n }",
"public double getAmount1() // getAmount1 method start\n\t\t{\n\t\t\treturn Double.parseDouble(amountField1.getText());\n\t\t}",
"public double getAmount1() // getAmount1 method start\n\t\t{\n\t\t\treturn Double.parseDouble(amountField1.getText());\n\t\t}",
"public void setInputNum(Integer inputNum) {\r\n this.inputNum = inputNum;\r\n }",
"public interface InputParam extends Parameter {\r\n\r\n /* ***************************************************\r\n * Property http://www.semanticweb.org/rami#isEquivalent\r\n */\r\n \r\n /**\r\n * Gets all property values for the isEquivalent property.<p>\r\n * \r\n * @returns a collection of values for the isEquivalent property.\r\n */\r\n Collection<? extends Noun> getIsEquivalent();\r\n\r\n /**\r\n * Checks if the class has a isEquivalent property value.<p>\r\n * \r\n * @return true if there is a isEquivalent property value.\r\n */\r\n boolean hasIsEquivalent();\r\n\r\n /**\r\n * Adds a isEquivalent property value.<p>\r\n * \r\n * @param newIsEquivalent the isEquivalent property value to be added\r\n */\r\n void addIsEquivalent(Noun newIsEquivalent);\r\n\r\n /**\r\n * Removes a isEquivalent property value.<p>\r\n * \r\n * @param oldIsEquivalent the isEquivalent property value to be removed.\r\n */\r\n void removeIsEquivalent(Noun oldIsEquivalent);\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.semanticweb.org/rami#isInputTo\r\n */\r\n \r\n /**\r\n * Gets all property values for the isInputTo property.<p>\r\n * \r\n * @returns a collection of values for the isInputTo property.\r\n */\r\n Collection<? extends MethodCall> getIsInputTo();\r\n\r\n /**\r\n * Checks if the class has a isInputTo property value.<p>\r\n * \r\n * @return true if there is a isInputTo property value.\r\n */\r\n boolean hasIsInputTo();\r\n\r\n /**\r\n * Adds a isInputTo property value.<p>\r\n * \r\n * @param newIsInputTo the isInputTo property value to be added\r\n */\r\n void addIsInputTo(MethodCall newIsInputTo);\r\n\r\n /**\r\n * Removes a isInputTo property value.<p>\r\n * \r\n * @param oldIsInputTo the isInputTo property value to be removed.\r\n */\r\n void removeIsInputTo(MethodCall oldIsInputTo);\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.semanticweb.org/rami#Label\r\n */\r\n \r\n /**\r\n * Gets all property values for the Label property.<p>\r\n * \r\n * @returns a collection of values for the Label property.\r\n */\r\n Collection<? extends Object> getLabel();\r\n\r\n /**\r\n * Checks if the class has a Label property value.<p>\r\n * \r\n * @return true if there is a Label property value.\r\n */\r\n boolean hasLabel();\r\n\r\n /**\r\n * Adds a Label property value.<p>\r\n * \r\n * @param newLabel the Label property value to be added\r\n */\r\n void addLabel(Object newLabel);\r\n\r\n /**\r\n * Removes a Label property value.<p>\r\n * \r\n * @param oldLabel the Label property value to be removed.\r\n */\r\n void removeLabel(Object oldLabel);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Common interfaces\r\n */\r\n\r\n OWLNamedIndividual getOwlIndividual();\r\n\r\n OWLOntology getOwlOntology();\r\n\r\n void delete();\r\n\r\n}",
"public String getInputor() {\r\n\t\treturn inputor;\r\n\t}",
"@Override\r\n\tpublic void changeInf1(Scanner input, String path) {\n\t\tSystem.out.println(\"原去处为\"+this.getInfo1());\r\n\t\tSystem.out.println(\"请输入新的信息\");\r\n\t\tthis.setInfo1(input.next());\r\n\t\tSystem.out.println(\"修改完成\");\r\n\t}",
"@Override\n\t\tpublic V setValue(V p1){\n\t\t\treturn p1;\n\t\t}",
"public void setAttr1(String attr1) {\n this.attr1 = attr1;\n }",
"public void setAttr1(String attr1) {\n this.attr1 = attr1;\n }",
"@Test\n\tpublic void input_1_() throws ValueOutOfBoundsException, MalformedNumberException\n\t{\n\t\tassertEquals(1, new RomanArabicConverter(\" 1 \").toArabic());\n\t\tassertEquals(\"I\", new RomanArabicConverter(\" 1 \").toRoman());\n\t}",
"private int getN()\n\t{\n\t\tint numberN = Integer.parseInt(field1.getText()) ;\n\t\treturn numberN;\n\t\t\n\t}",
"public void setInput(String M)\t\n\t{\t//start of setInput method\n\t\tinputMsg = M;\n\t}",
"public String inputName() {\n String name = editTextName.getText().toString();\n return name;\n }",
"public static void main(String[] args) {\n\t\t TextInput input = new NumericInput();\n\t\t input.add('1');\n\t\t input.add('a');\n\t\t input.add('0');\n\t\t System.out.println(input.getValue());\n\n}",
"public interface ParameterInput extends Input {\n\t\n\t/**\n\t * Returns the metadata of this parameter.\n\t * @return ParameterMetadata\tmetadata\n\t */\n\tpublic ParameterMetadata getMetadata();\n\t\n\t/**\n\t * Returns the parameter value of an option.\n\t * \n\t * @return Object option parameter value\n\t */\n\tpublic Object getValue();\n\t\n\t/**\n\t * Returns the File parameter value of an option.\n\t * If option's parameter type does not match with the\n\t * return type the value returned is null.\n\t * \n\t * @return File file value\n\t */\n\tpublic File getFileValue();\n\t\n\t/**\n\t * Returns the directory parameter value of an option.\n\t * If option's parameter type does not match with the\n\t * return type the value returned is null.\n\t * \n\t * @return File a directory file\n\t */\t\n\tpublic File getDirectoryValue();\n\n\t/**\n\t * Returns the String parameter value of an option.\n\t * If option's parameter type does not match with the\n\t * return type the value returned is null.\n\t * \n\t * @return String string value\n\t */\n\tpublic String getStringValue();\n\t\n\t/**\n\t * Returns the Number parameter value of an option.\n\t * If option's parameter type does not match with the\n\t * return type the value returned is null.\n\t * \n\t * @return Number value\n\t */\n\tpublic Number getNumberValue();\n\t\n}",
"public void setUserinput(String userinput){\n String[] inputs = userinput.split(\" \");\n if(inputs.length > 1){\n this.userinput_var = inputs[1];\n }\n this.userinput_command = inputs[0];\n }",
"public static String getInput(String arg1, String arg2, String arg3)\n\t{\n\t\tString input;\n\t\tdo\n\t\t{\n\t\t\tSystem.out.println(\"Select: \");\n\t\t\tSystem.out.println(\"1. \" + arg1);\n\t\t\tSystem.out.println(\"2. \" + arg2);\n\t\t\tSystem.out.println(\"3. \" + arg3);\n\t\t\tinput = scn.nextLine();\n\t\t} while(!(input.equals(\"1\") || input.equals(\"2\") || input.equals(\"3\")));\n\t\treturn input;\n\t}",
"void setInput(com.indosat.eai.catalist.standardInputOutput.DummyInputType input);",
"public String getField1(){\n return field1;\n }",
"public Object getInputValue(FlowUnit u, FlowExec exec, String arg) throws Exception\n\t\t{\n\t\tfor(FlowConn c:conns)\n\t\t\tif(c.toUnit==u && c.toArg.equals(arg))\n\t\t\t\t{\n\t\t\t\tMap<String,Object> lastOutput=exec.getLastOutput(c.fromUnit);\n\t\t\t\treturn lastOutput.get(c.fromArg);\n\t\t\t\t}\n\t\tthrow new Exception(\"Input not connected - \"+arg);\n\t\t}",
"public static Input getInput() {\r\n return input;\r\n }",
"@Column(name = \"INPUT\", length = 1000)\n/* */ @Order(2)\n/* 66 */ public String getInput() { return this.input; }",
"private static String checkInputParamType(InputParam inputParam) {\r\n\t\tString type = inputParam.getType();\r\n\t\tString value = null;\r\n\t\tswitch (type) {\r\n\t\tcase BPConstant.STRING:\r\n\t\t\tvalue = inputParam.getInputParamvalue().getStringValue();\r\n\t\t\tbreak;\r\n\t\tcase BPConstant.BOOLEAN:\r\n\t\t\tvalue = inputParam.getInputParamvalue().getBooleanValue();\r\n\t\t\tbreak;\r\n\t\tcase BPConstant.DATE_TIME:\r\n\t\t\tvalue = inputParam.getInputParamvalue().getDateValue();\r\n\t\t\tbreak;\r\n\t\tcase BPConstant.NUMBER:\r\n\t\t\tvalue = inputParam.getInputParamvalue().getIntValue();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tvalue = BPConstant.EMPTY_STRING;\r\n\t\t}\r\n\t\treturn value;\r\n\t}",
"public void setValue3(String value3) { this.value3 = value3; }",
"private void getK(){\r\n if(txtK.getText() != \"\"){\r\n interpretador.setK(Integer.parseInt(txtK.getText()));\r\n in.setK(Integer.parseInt(txtK.getText()));\r\n }\r\n }",
"public numero(numero input)\n {\n input.copy(this);\n }",
"public String getInputNominalValues(int pos){\r\n\t\treturn nominalValues[0][pos];\r\n\t}",
"public double getParameterValue (Assignment input) ;",
"static int setCon(String input){\n if (input.equals(\"little\")||input.equals(\"1\")) return 1;\n if (input.equals(\"average\")||input.equals(\"2\"))return 2;\n if (input.equals(\"lot\") || input.equals(\"3\")) return 3;\n if (input.equals(\"manual\") || input.equals(\"4\")) return 4;\n throw new RuntimeException(\n \"Illigal second paramter on command line, use : <little,average,lot>\");\n }",
"java.lang.String getNum1();",
"public int getInputNominalValuesInt(int pos){\r\n\t\treturn intNominalValues[0][pos];\r\n\t}",
"public int getInput(final String label, final int type)\n\t throws OperationCancelledException, OperationFailedException {\n\tString title;\n\tint minVal, maxVal;\n\tswitch (type) {\n\tcase CHANNEL_NUMBER_INPUT:\n\t title = tr(\"Enter DMX Channel Number\");\n\t minVal = 1;\n\t maxVal = 512;\n\t break;\n\tcase CHANNEL_VALUE_INPUT:\n\t title = tr(\"Enter DMX Channel Value\");\n\t minVal = 0;\n\t maxVal = 255;\n\t break;\n\tdefault:\n\t throw new OperationFailedException(\"Invalid input type requested.\");\n\t}\n\tfinal Integer returned = QInputDialog.getInteger(Main.getInstance(),\n\t\ttitle, label, minVal, minVal, maxVal);\n\ttry {\n\t if (Validator.validate(returned.intValue(), type)) {\n\t\treturn returned.intValue();\n\t } else {\n\t\tthrow new OperationCancelledException(\n\t\t\t\"Operation cancelled by user\");\n\t }\n\t} catch (NullPointerException npe) { \n\t // No value returned\n\t throw new OperationCancelledException(\"Operation cancelled by user\");\n\t}\n }",
"@Override\n public Value64 read() {\n int s = input0.read().intValue();\n int t = input1.read().intValue();\n long d = 0;\n switch (mduOp.read().byteValue()) {\n case AluOp.Multiply:\n d = s * t;\n break;\n case AluOp.Divide:\n d = s / t;\n break;\n }\n return new Value64(d);\n }",
"public String getInput()\t\n\t{\t//start of getInput method\n\t\treturn inputMsg;\n\t}",
"ListeningFuture<Boolean> setInput(String input);",
"public void setA1(int a1)\n {\n this.a1 = a1;\n }",
"Inputs getInputs();",
"public String inputSpecialized() {\n String specialized = editTextSpecial.getText().toString();\n return specialized;\n }",
"@Override\n\tpublic int update(Utente input) throws Exception {\n\t\treturn 0;\n\t}",
"public Object getValue2() { return this.value2; }",
"public void setGivenNum(double input) {\n givenNum = input;\n }",
"int getMove1Value();",
"public abstract void setInput(boolean value);",
"@Override\n\tpublic java.lang.String getField1() {\n\t\treturn _second.getField1();\n\t}",
"@Override\n\tpublic void input() {\n\t\t\n\t}",
"public HTMLInputElement getElementValor() { return this.$element_Valor; }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();"
]
| [
"0.7400656",
"0.7359631",
"0.73301864",
"0.68328035",
"0.66168135",
"0.660611",
"0.6545903",
"0.6212271",
"0.61757874",
"0.6120428",
"0.6065748",
"0.6031427",
"0.59643066",
"0.594905",
"0.5806244",
"0.57884055",
"0.57501423",
"0.5696265",
"0.56531924",
"0.56266457",
"0.56151575",
"0.5564879",
"0.5538381",
"0.55360276",
"0.55010915",
"0.5498687",
"0.5498687",
"0.54552364",
"0.5452337",
"0.54438496",
"0.5390943",
"0.5376808",
"0.53704125",
"0.5327421",
"0.531784",
"0.5302656",
"0.5300262",
"0.52925575",
"0.52675235",
"0.5261753",
"0.52541554",
"0.5250013",
"0.52488667",
"0.5234441",
"0.52109873",
"0.52036965",
"0.51876736",
"0.5186319",
"0.5171758",
"0.51464605",
"0.5145254",
"0.51341236",
"0.51330245",
"0.51259583",
"0.51259583",
"0.51175433",
"0.5112575",
"0.511251",
"0.51071864",
"0.5099498",
"0.5099376",
"0.5099376",
"0.50732267",
"0.5072664",
"0.50659734",
"0.50566185",
"0.5053241",
"0.5044749",
"0.50298035",
"0.5027137",
"0.50181764",
"0.50175464",
"0.50116634",
"0.5000466",
"0.49949023",
"0.49936065",
"0.498147",
"0.49808812",
"0.49735937",
"0.49717116",
"0.49708018",
"0.4961832",
"0.49559742",
"0.495509",
"0.49536404",
"0.49504334",
"0.49432567",
"0.4939486",
"0.49384412",
"0.49358505",
"0.49288002",
"0.49284348",
"0.49260965",
"0.49220282",
"0.4916751",
"0.49077415",
"0.49074265",
"0.48931798",
"0.48890963",
"0.48736277"
]
| 0.75052476 | 0 |
Metodo que le da un valor al atributo de input2. | public void setInput2(int input2) {
this.input2 = input2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getInput2() {\n return input2;\n }",
"public int getInput2() {\n return input2;\n }",
"public void setInput2(final String input2) {\n this.input2 = input2;\n }",
"public int getInput1() {\n return input1;\n }",
"public String getInput1() {\n return input1;\n }",
"public String getUser2()\n {\n return userInput2;\n }",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public void setInput1(final String input1) {\n this.input1 = input1;\n }",
"public void setInputPath2(String inputPath2) {\n\t\tthis.inputPath2 = inputPath2;\n\t}",
"public int input1(){\n int Input1 = Integer.parseInt(numerator1.getText());\n return Input1;\n }",
"public String getUser1()\n {\n return userInput1;\n }",
"public String getInput3() {\n return input3;\n }",
"public Object getValue2() { return this.value2; }",
"public String getInputPath2() {\n\t\treturn inputPath2;\n\t}",
"public void setValue2 (String Value2);",
"public String getAttr2() {\n return attr2;\n }",
"public String getAttr2() {\n return attr2;\n }",
"public java.lang.String getValue2() {\n return this.value2;\n }",
"public String getValue2();",
"public double getOperand2()\r\n\t{\r\n\t\tSystem.out.println(\"enter the operand 2:\");\r\n\t\tdouble op2=sc.nextDouble();\r\n\t\treturn op2;\r\n\t}",
"public void setValue2(Object value2) { this.value2 = value2; }",
"InputPin getSecond();",
"public void setInput(String input);",
"Input getObjetivo();",
"public double getAmount2() // getAmount2 method start\n\t\t{\n\t\t\treturn Double.parseDouble(amountField2.getText());\n\t\t}",
"public double getAmount2() // getAmount2 method start\n\t\t{\n\t\t\treturn Double.parseDouble(amountField2.getText());\n\t\t}",
"public String getAttribute2() {\n return attribute2;\n }",
"public String getExtra2() {\n return extra2;\n }",
"public void setInput(String input) { this.input = input; }",
"public void setAttr2(String attr2) {\n this.attr2 = attr2;\n }",
"public void setAttr2(String attr2) {\n this.attr2 = attr2;\n }",
"public void userInput() {\r\n System.out.println(\"You want to convert from:\");\r\n this.fromUnit = in.nextLine();\r\n System.out.print(\"to: \");\r\n this.toUnit = in.nextLine();\r\n System.out.print(\"The value is \");\r\n this.value = in.nextDouble();\r\n }",
"public void setValue2(final java.lang.String value2) {\n this.value2 = value2;\n }",
"public String getOther2() {\n return other2;\n }",
"public void setInput3(final String input3) {\n this.input3 = input3;\n }",
"public void setInput(String input){\n this.input = input;\n }",
"INPUT createINPUT();",
"@Override\n\tpublic boolean getField2() {\n\t\treturn _second.getField2();\n\t}",
"Input createInput();",
"String getInput();",
"public String getAttribute2()\n {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public int getNum2() {\r\n\t\t\t\treturn num2_;\r\n\t\t\t}",
"public void setInput(Input input) {\n this.input = input;\n }",
"public int getNum2() {\r\n\t\t\treturn num2_;\r\n\t\t}",
"public String getHint2() {\n return this.hint2;\n }",
"int getMove2Value();",
"public String getText2() {\n return text2;\n }",
"public void setA2(int a2)\n {\n this.a2 = a2;\n }",
"public String arg2() {\r\n return command.split(\"\\\\s+\")[2];\r\n }",
"public void Metodo1(String valor1){\r\n\r\n }",
"private static Instruction propagateSecondInputPrivacy(VariableCPInstruction inst, ExecutionContext ec){\n\t\treturn propagateInputPrivacy(inst, ec, inst.getInput2(), inst.getOutput());\n\t}",
"public void setExtra2(String extra2) {\n this.extra2 = extra2;\n }",
"public String getIntAttribute2() {\n return (String) getAttributeInternal(INTATTRIBUTE2);\n }",
"public String getLine2() {\n return line2;\n }",
"public int getOfYourChoiceInput() {\n return ofYourChoiceInput;\n }",
"@Override\r\n\tpublic void changeInf2(Scanner input, String path) {\n\t\tSystem.out.println(\"原联系方式为\"+this.getInfo2());\r\n\t\tSystem.out.println(\"请输入新的信息\");\r\n\t\tthis.setInfo2(input.next());\r\n\t\tSystem.out.println(\"修改完成\");\r\n\t}",
"private int getT()\n\t{\n\t\tint numberT = Integer.parseInt(field2.getText()) ;\n\t\treturn numberT;\n\t\t\n\t}",
"public abstract Object getInput ();",
"@Override\n\tpublic void setInput(Input arg0) {\n\n\t}",
"public String getAttribute2() {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public String getAttribute2() {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public String getAttribute2() {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public String getAttribute2() {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"public String getAttribute2() {\n return (String)getAttributeInternal(ATTRIBUTE2);\n }",
"float getField2();",
"private String parseToTwoInteger(int input) {\n\t\treturn input < 10 ? \"0\" + input : \"\" + input;\n\t}",
"@Override\n\tpublic void setInput(Input arg0) {\n\t\t\n\t}",
"public String getpasswordinput() {\n return tf2.getText();\n }",
"public int arg2() {\n return Integer.parseInt(instructionChunks[2]);\n }",
"@java.lang.Override public int getMove2Value() {\n return move2_;\n }",
"public void setImg_2(String img_2) {\n this.img_2 = img_2;\n }",
"public int getData2() {\n return data2_;\n }",
"public int getData2() {\n return data2_;\n }",
"@java.lang.Override public int getMove2Value() {\n return move2_;\n }",
"public String getId2() {\n return id2;\n }",
"public int getP2ValueInInt() {\n\t\treturn P2ValueInInt;\n\t}",
"public String getAttr1() {\n return attr1;\n }",
"public String getAttr1() {\n return attr1;\n }",
"public String getLine2() {\n return line2;\n }",
"InputValueDefinition createInputValueDefinition();",
"@Override\n\tpublic java.lang.String getField1() {\n\t\treturn _second.getField1();\n\t}",
"public int getData2() {\n return data2_;\n }",
"public int getData2() {\n return data2_;\n }",
"SEIntegerVariable getOperand2();",
"public void setObj2 (String value) {\r\n Obj2 = value;\r\n }",
"private int getN()\n\t{\n\t\tint numberN = Integer.parseInt(field1.getText()) ;\n\t\treturn numberN;\n\t\t\n\t}",
"public String getImg_2() {\n return img_2;\n }",
"@Override\n public Value64 read() {\n int s = input0.read().intValue();\n int t = input1.read().intValue();\n long d = 0;\n switch (mduOp.read().byteValue()) {\n case AluOp.Multiply:\n d = s * t;\n break;\n case AluOp.Divide:\n d = s / t;\n break;\n }\n return new Value64(d);\n }",
"public String getAttribute2() {\n return (String) getAttributeInternal(ATTRIBUTE2);\n }",
"godot.wire.Wire.Vector2 getVector2Value();",
"public void setAttribute2(String attribute2) {\n this.attribute2 = attribute2 == null ? null : attribute2.trim();\n }",
"@Override\r\n\tpublic vec2 get2(String ponits) {\n\t\treturn null;\r\n\t}",
"public int getd2() {\n\t\treturn d2;\n\t}",
"@Override\n\tpublic void i2() {\n\t\t\n\t}",
"public void setLine2(String line2) {\n this.line2 = line2;\n }",
"private void getK(){\r\n if(txtK.getText() != \"\"){\r\n interpretador.setK(Integer.parseInt(txtK.getText()));\r\n in.setK(Integer.parseInt(txtK.getText()));\r\n }\r\n }",
"public String getRadius2()\n\t{\n\t\treturn radius2.getText();\n\t}",
"public int getKeyShoot2() {\r\n return Input.Keys.valueOf(getKeyShoot2Name());\r\n }",
"@Override\n public void input() {\n super.input();\n Scanner sc = new Scanner(System.in);\n System.out.printf(\"Nhập số trang sách giáo khoa: \");\n amountPage = Integer.valueOf(sc.nextLine());\n System.out.printf(\"Nhập tình trạng sách giáo khoa: \");\n status = sc.nextLine();\n System.out.printf(\"Nhập số lượng mượn: \");\n amountBorrow= Integer.valueOf(sc.nextLine());\n }",
"@Override\n public void onClick(View v) {\n if(!txtCampo1.getText().toString().equals(\"\")){\n //transformar o valor do campo1 para INTEIRO\n int num1 = Integer.parseInt(txtCampo1.getText().toString());\n int num2 = Integer.parseInt(txtCampo2.getText().toString());\n\n //String.valueOf(numero aqui) = transformar um número em String\n int resultado;\n int[] numeros = {num1, num2};\n resultado = Tools.somarInteiros(numeros);\n\n lblTexto.setText(String.valueOf(resultado));\n\n Tools.exibirMensagem(context,\"Resultado = \" + resultado);\n }\n }"
]
| [
"0.7575633",
"0.75192153",
"0.74649185",
"0.6755586",
"0.6743385",
"0.66186005",
"0.64568037",
"0.6389697",
"0.63140726",
"0.62128973",
"0.6020778",
"0.5968423",
"0.5961389",
"0.59296584",
"0.5899466",
"0.5849596",
"0.5849596",
"0.5822913",
"0.5758967",
"0.57237285",
"0.5637891",
"0.55981743",
"0.5514028",
"0.54889107",
"0.5472162",
"0.5472162",
"0.5440044",
"0.54175794",
"0.54152346",
"0.5410735",
"0.5410735",
"0.52955574",
"0.52910185",
"0.5255025",
"0.5247792",
"0.5246434",
"0.5216543",
"0.52012265",
"0.51892287",
"0.518911",
"0.5184698",
"0.5170456",
"0.5169807",
"0.5156691",
"0.51439327",
"0.51347214",
"0.5129505",
"0.5117441",
"0.5116462",
"0.5114387",
"0.5084685",
"0.507028",
"0.50668705",
"0.5057412",
"0.5054777",
"0.5052366",
"0.5051802",
"0.50504136",
"0.50386465",
"0.50384325",
"0.50384325",
"0.50384325",
"0.50384325",
"0.50384325",
"0.5037028",
"0.50337017",
"0.503006",
"0.5029339",
"0.50282484",
"0.5027062",
"0.50154686",
"0.50144315",
"0.50144315",
"0.5009609",
"0.5008298",
"0.500824",
"0.50064737",
"0.50064737",
"0.50041956",
"0.49950668",
"0.49851158",
"0.49829644",
"0.49829644",
"0.49800405",
"0.49783093",
"0.49774876",
"0.4973017",
"0.4971065",
"0.49705115",
"0.49572006",
"0.49561778",
"0.4953477",
"0.49462098",
"0.49451604",
"0.4941611",
"0.4939355",
"0.49380514",
"0.49377137",
"0.49358702",
"0.49350998"
]
| 0.7584492 | 0 |
Metodo para obtener el componente enlazado en el input 2. | public Componente getEntrada2() {
return Entrada2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override public Object getComponente(String componente){\n return getBlindaje(componente);\n }",
"public String getCoda2Component() {\n return coda2Component;\n }",
"Component getComponent() {\n/* 224 */ return this.component;\n/* */ }",
"public final int component1() {\n return 0;\n }",
"public String getComponent() {\n return this.component;\n }",
"@org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }",
"Component createComponent();",
"Component createComponent();",
"public Componente getEntrada1() {\n return Entrada1;\n }",
"public String getComponent() {\r\n\t\treturn component;\r\n\t}",
"@Override\n\tpublic Component getComponent() {\n\t\treturn p;\n\t}",
"public Component getComponent() {\n\treturn component;\n}",
"@Override\n public abstract String getComponentType();",
"@Override\n\tpublic ElementView getComponent() {\n\t\treturn jc;\n\t}",
"public Componente(Image image, Componente entrada1, Componente entrada2,String name) {\n Image = image;\n Entrada1=entrada1;\n Entrada2=entrada2;\n Name=name;\n Output=2;\n ID=IDt;\n IDt++;\n input=false;\n input1=2;\n input2=2;\n }",
"protected Node getComponentNode() {\n return componentNode;\n }",
"protected abstract Object[] getComponents();",
"@Override\n public Component getComponent() {\n if (component == null) {\n component = new PubMLSTVisualPanel2();\n }\n component.setPreferredSize(new java.awt.Dimension(480,340));\n return component;\n }",
"@Override\n\tpublic Component getComponent() {\n\t\treturn this;\n\t}",
"public ComponenteCosto getComponenteCosto()\r\n/* 68: */ {\r\n/* 69: 91 */ return this.componenteCosto;\r\n/* 70: */ }",
"protected final Component getComponent()\n\t{\n\t\treturn component;\n\t}",
"public Component getComponent() {\n return component;\n }",
"JComponent getRenderComponent();",
"private void customizeComponents(Component c, int i1) {\r\n\r\n\t\t/**\r\n\t\t * cName is name of component without index\r\n\t\t */\r\n\t\tint a = 1;\r\n\t\t/**\r\n\t\t * to get correct cName depending on index\r\n\t\t */\r\n\t\tfor (int i = 0; i < c.getName().length(); i++) {\r\n\t\t\ttry {\r\n\t\t\t\ta = Integer.parseInt(c.getName().substring(i));\r\n\t\t\t\ta = c.getName().substring(i).length();\r\n\t\t\t\tbreak;\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString cName = c.getName().substring(0, c.getName().length() - a);\r\n\r\n\t\tswitch (cName) {\r\n\t\tcase \"lblImageSimulation\": {\r\n\t\t\t((JLabel) c).setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageCup\": {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"txfCup\": {\r\n\t\t\t((JTextField) c).setOpaque(false);\r\n\t\t\tc.setForeground(Color.gray);\r\n\t\t\tc.setFont(new Font(c.getFont().getName(), Font.BOLD, 36));\r\n\t\t\ttxfsCup[i1] = (JTextField) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"txfCupVolume\": {\r\n\t\t\ttxfsCupVolume[i1] = (JTextField) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblDisplayName\": {\r\n\t\t\t((JLabel) c).setBorder(\r\n\t\t\t\t\tnew CompoundBorder(new EtchedBorder(EtchedBorder.RAISED, null, null), new EmptyBorder(0, 2, 0, 0)));\r\n\t\t\tc.setForeground(Color.darkGray);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"txfDisplayCurrentVolume\": {\r\n\t\t\t((JTextField) c).setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));\r\n\t\t\t((JTextField) c).setOpaque(true);\r\n\t\t\tc.setBackground(new Color(30, 200, 225));\r\n\t\t\tFont dig7_S16 = dig7.deriveFont(Font.BOLD, 16);\r\n\t\t\tGraphicsEnvironment.getLocalGraphicsEnvironment().registerFont(dig7_S16);\r\n\t\t\tc.setFont(dig7_S16);\r\n\t\t\ttxfsDisplayCurrentVolume[i1] = (JTextField) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageCD\": {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblCDBadge\": {\r\n\t\t\tc.setForeground(Color.lightGray);\r\n\t\t\tc.setFont(dig7);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"txfWaitTime\": {\r\n\t\t\t((JTextField) c).setOpaque(true);\r\n\t\t\tc.setBackground(new Color(140, 200, 255));\r\n\t\t\tc.setFont(new Font(c.getFont().getName(), Font.PLAIN, 8));\r\n\t\t\ttxfsWaitTime[i1] = (JTextField) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"pgbVolume\": {\r\n\t\t\t((JProgressBar) c).setMinimum(0);\r\n\t\t\t((JProgressBar) c).setMaximum(MAXVOLUMEDISPENSER);\r\n\t\t\t((JProgressBar) c).setValue((int) MAXVOLUMEDISPENSER / 2);\r\n\t\t\tc.setForeground(new Color(140, 200, 255));\r\n\t\t\tc.setBackground(new Color(80, 80, 80));\r\n\t\t\t((JProgressBar) c).setBorderPainted(false);\r\n\t\t\tpgbsVolume[i1] = (JProgressBar) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"btnPause\": {\r\n\t\t\tc.setBackground(new Color(90, 210, 165));\r\n\t\t\tc.setFont(new Font(c.getFont().getName(), Font.PLAIN, 8));\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageBoard\": {\r\n\t\t\tlblsAbout[0] = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageAuthor\": {\r\n\t\t\tc.setVisible(false);\r\n\t\t\tlblsAbout[1] = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageSizeOfCups\": {\r\n\t\t\tc.setVisible(false);\r\n\t\t\tlblsAbout[2] = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageNumberOfCoffeeDispensers\": {\r\n\t\t\tc.setVisible(false);\r\n\t\t\tlblsAbout[3] = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImagePause\": {\r\n\t\t\tc.setVisible(false);\r\n\t\t\tlblsAbout[4] = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblPauseInfo\": {\r\n\t\t\tc.setForeground(Color.gray);\r\n\t\t\tc.setFont(new Font(c.getFont().getName(), Font.BOLD, 36));\r\n\t\t\t((JLabel) c).setText(\"\");\r\n\t\t\tlblPauseInfo = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tdefault: {\r\n\t\t\tSystem.out.println(\"unexpected event in customizeComponents\" + c.getName());\r\n\t\t}\r\n\t\t}\r\n\t}",
"String constructComponentName() {\n return base + nameCounter++;\n }",
"public JComponent getWrappedComponent()\n {\n return field;\n }",
"public String componentName(int index) {\n\treturn(comp[index]);\n }",
"ComponentParameterInstance createComponentParameterInstance();",
"@Override\n public AttributeDescriptor.ComponentType getComponentType(AttributeDescriptor.Operator operator)\n {\n DemoAttributeDescriptor demoAttrDesc = (DemoAttributeDescriptor) getAttribute();\n boolean isMultiSelectOper = demoAttrDesc.hasVariableOperands(operator);\n if (demoAttrDesc.isLOV())\n {\n if (isMultiSelectOper)\n {\n // always return selectOneChoice for multiSelect enabled operators\n return ComponentType.selectManyChoice;\n }\n else\n {\n // For certain operators the default component type is used, otherwise the base component\n // type is used (based on the datatype)\n if (demoAttrDesc.useDefaultComponentType(operator))\n {\n AttributeDescriptor.ComponentType compType = demoAttrDesc.getComponentType();\n \n //try to simulate the current model driven query's behaviour and return \n //inputText for all operators except equals and non equals\n if(compType.equals(AttributeDescriptor.ComponentType.selectOneChoice))\n {\n if(operator != null && (DemoPageDef.OperatorDef.EQUALS.getLabel().equals(operator.getLabel()) || \n DemoPageDef.OperatorDef.NOT_EQUALS.getLabel().equals(operator.getLabel())))\n {\n return compType;\n }\n else\n {\n return ComponentType.inputText;\n }\n }\n }\n else\n {\n // based on the type of the attribute \n String typeName = demoAttrDesc.getType().getName();\n if (typeName.equals(\"java.lang.Number\"))\n return ComponentType.inputNumberSpinbox;\n else if (typeName.equals(\"java.util.Date\"))\n return ComponentType.inputDate;\n else\n return ComponentType.inputText;\n }\n }\n }\n \n // Return default componentType\n return demoAttrDesc.getComponentType();\n }",
"private void createComponentBox() {\r\n\t\tthis.componentBox = new Vector<String>();\r\n\t\tthis.componentBox.add(\"Sword\");\r\n\t\tthis.componentBox.add(\"Two-handed Sword\");\r\n\t\tthis.componentBox.add(\"Staff\");\r\n\t\tthis.componentBox.add(\"Axe\");\r\n\t\tthis.componentBox.add(\"Hammer\");\r\n\t\tthis.componentBox.add(\"Bow\");\r\n\t\tthis.componentBox.add(\"Crossbow\");\r\n\t\tthis.componentBox.add(\"Wand\");\r\n\t\tthis.componentBox.add(\"Spear\");\r\n\t\tthis.componentBox.add(\"Bottle\");\r\n\t}",
"public Entity getComponent() {\n return component;\n }",
"public JComponent getComponent();",
"public abstract Component getComponentByName(String name);",
"JComponent getImpl();",
"public String getInput2() {\n return input2;\n }",
"public <S> ComponentInstance<S> getComponentInstance();",
"ComponentBodyType getComponentInfo();",
"@org.jetbrains.annotations.Nullable()\n public final java.lang.String component3() {\n return null;\n }",
"@Override\n public AbstractProcess getComponent(String name)\n {\n return components.get(name);\n }",
"@Override\n\tpublic Component getComponent() {\n\t\treturn toolbox;\n\t}",
"public void referenciaComponentes() {\n campoModeloCelular = findViewById(R.id.CampoModeloCelular);\n campoNumeroChip1 = findViewById(R.id.radioButtonNumChip1);\n campoNumeroChip2 = findViewById(R.id.radioButtonNumChip2);\n numeroDoChip1 = findViewById(R.id.EditTextNumChip1);\n numeroDoChip2 = findViewById(R.id.EditTextNumChip2);\n IMEI1 = findViewById(R.id.campoIMEI1);\n IMEI2 = findViewById(R.id.campoIMEI2);\n\n // iniciando alguns componentes invisiveis\n IMEI2.setVisibility(View.GONE);\n numeroDoChip2.setVisibility(View.GONE);\n }",
"public Component getComponent(String name) {\n Optional<Component> component = elements.getComponent(name);\n\n if(component.isPresent()) {\n return component.get();\n } else {\n Assert.fail(\"Missing component \" + name);\n return null;\n }\n\n }",
"String componentTypeName();",
"private String getComponentValue(JComponent component)\r\n {\r\n\t if (component instanceof JTextField)\r\n\t {\r\n\t\t JTextField text = (JTextField)component;\r\n\t\t return text.getText();\r\n\t }\r\n\t else if (component instanceof JCheckBox)\r\n\t {\r\n\t\t JCheckBox checkBox = (JCheckBox)component;\r\n\t \t boolean value = checkBox.isSelected();\r\n\t \t return (value) ? \"true\" : \"false\";\r\n\t }\r\n\t else if (component instanceof JComboBox)\r\n\t {\r\n\t\t @SuppressWarnings(\"unchecked\")\r\n\t\t JComboBox<String> comboBox = (JComboBox<String>)component;\r\n\t\t \r\n\t\t String value = (String)comboBox.getSelectedItem();\r\n\t\t if (value == null) return \"\";\r\n\t\t if (value.equals(fields[0])) return \"\";\r\n\t\t if (value.length()>2) return value.toLowerCase();\r\n\t\t return value;\r\n\t }\r\n\t return \"\";\r\n }",
"ComponentsType createComponentsType();",
"protected Component generateComp(String compName) {\n\t\treturn null;\n\t}",
"public PizzaTodopizzaAbstracta obtenerComponente(){\n\t\treturn componente;\n\t}",
"public String getCodaComponent() {\n return codaComponent;\n }",
"@Override\n public JComponent getComponent () {\n return this;\n }",
"private org.gwtbootstrap3.client.ui.Container get_f_Container2() {\n return build_f_Container2();\n }",
"public JawbComponent getMainComponent () {\n return null;\n }",
"Optional<Sketch> component(int i);",
"@Override\n public SelectCurriculumVisualPanel getComponent() {\n if (component == null) {\n component = new SelectCurriculumVisualPanel();\n component.manager.addPropertyChangeListener(this);\n }\n return component;\n }",
"BaseComponent getComponentName();",
"public java.lang.Number getComponent1AsNumber() {\n\t\treturn SwiftFormatUtils.getNumber(getComponent(1));\n\t}",
"public abstract JComponent getComponent();",
"Object getComponent(WebElement element);",
"private InputPanel createInputComponent(String id, final FeedbackPanel feedback) {\n InputPanel component = createTypedInputComponent(id);\n\n final FormComponent formComponent = component.getComponent();\n System.out.println(\">>>>>>>>>>>>>>>>>>>>>>>> \" + count);\n formComponent.add(new SimpleAttributeModifier(\"size\", \"42\"));\n formComponent.add(new AjaxFormComponentUpdatingBehavior(\"onBlur\") {\n\n @Override\n protected void onUpdate(AjaxRequestTarget target) {\n target.add(formComponent);\n target.add(feedback);\n }\n\n @Override\n protected void onError(AjaxRequestTarget target, RuntimeException e) {\n target.add(formComponent);\n target.add(feedback);\n\n super.onError(target, e);\n }\n });\n \n count++;\n return component;\n }",
"ComponentType createComponentType();",
"String getComponentName();",
"String getComponentName();",
"public int getComponentID() {\n return COMPONENT_ID;\n }",
"private Component createComponent(XmlNode node, String id) {\n\n Component comp = null;\n String tag = node.getTag();\n\n if (tag.equals(TAG_PANEL)) {\n comp = layoutContainer(new JPanel(), node, node.getChildren());\n } else if (tag.equals(TAG_BORDER)) {\n comp = layoutBorder(node, node.getChildren());\n } else if (tag.equals(TAG_TEXTINPUT)) {\n int cols = node.getAttribute(ATTR_COLS, -1);\n int rows = node.getAttribute(ATTR_ROWS, -1);\n String value = node.getAttribute(ATTR_VALUE, \"\");\n\n JTextComponent textComp;\n if (rows > 1) {\n if (cols < 0) {\n cols = 30;\n }\n textComp = new JTextArea(value, rows, cols);\n } else {\n if (cols == -1) {\n textComp = new JTextField(value);\n } else {\n textComp = new JTextField(value, cols);\n }\n ((JTextField) textComp).addActionListener(this);\n }\n comp = textComp;\n String action = node.getAttribute(ATTR_ACTION, (String) null);\n if (action != null) {\n componentToAction.put(textComp, action);\n }\n } else if (tag.equals(TAG_MENUITEM) || tag.equals(TAG_CBMENUITEM)) {\n String actionTemplate = null;\n JMenuItem mi;\n String label = node.getAttribute(ATTR_LABEL, \"\");\n String action = node.getAttribute(ATTR_ACTION);\n String value = node.getAttribute(ATTR_VALUE);\n String key = node.getAttribute(ATTR_KEY);\n if ((action == null) && (actionTemplate != null)\n && (value != null)) {\n action = GuiUtils.replace(actionTemplate, \"%value%\", value);\n }\n if ((key != null) && !key.startsWith(\"group:\")) {\n label = label + \" \" + key;\n }\n\n if (node.getTag().equals(TAG_CBMENUITEM)) {\n boolean initValue = node.getAttribute(ATTR_VALUE, true);\n JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(label,\n initValue);\n String group = node.getAttribute(ATTR_GROUP, (String) null);\n addToGroup(group, cbmi);\n mi = cbmi;\n if (action != null) {\n Hashtable actions = new Hashtable();\n actions.put(ATTR_ACTION, action);\n actions.put(ATTR_VALUE, new Boolean(initValue));\n componentToAction.put(cbmi, actions);\n cbmi.addItemListener(this);\n if ((group == null) || initValue) {\n itemStateChanged(new ItemEvent(cbmi, 0, cbmi,\n ItemEvent.ITEM_STATE_CHANGED));\n }\n }\n\n if (key != null) {\n if (key.startsWith(\"group:\")) {\n if (group != null) {\n key = key.substring(6);\n keyToComponent.put(key.toLowerCase(), group);\n }\n } else {\n keyToComponent.put(key.toLowerCase(), mi);\n }\n }\n } else {\n mi = new JMenuItem(label);\n if (action != null) {\n mi.setActionCommand(action);\n mi.addActionListener(this);\n if (key != null) {\n keyToComponent.put(key.toLowerCase(), mi);\n }\n }\n }\n if (id != null) {\n idToMenuItem.put(id, mi);\n }\n comp = mi;\n } else if (tag.equals(TAG_MENU)) {\n Vector children = node.getChildren();\n JMenu menu = new JMenu(node.getAttribute(ATTR_LABEL, \"\"));\n comp = menu;\n for (int i = 0; i < children.size(); i++) {\n XmlNode childElement = (XmlNode) children.get(i);\n if (childElement.getTag().equals(TAG_SEPARATOR)) {\n menu.addSeparator();\n\n continue;\n }\n Component childComponent = xmlToUi(childElement);\n if (childComponent == null) {\n continue;\n }\n menu.add(childComponent);\n }\n } else if (tag.equals(TAG_MENUBAR)) {\n Vector children = node.getChildren();\n JMenuBar menuBar = new JMenuBar();\n comp = menuBar;\n for (int i = 0; i < children.size(); i++) {\n XmlNode childElement = (XmlNode) children.get(i);\n Component childComponent = xmlToUi(childElement);\n if (childComponent == null) {\n continue;\n }\n menuBar.add(childComponent);\n }\n } else if (tag.equals(TAG_SPLITPANE)) {\n Vector xmlChildren = node.getChildren();\n if (xmlChildren.size() != 2) {\n throw new IllegalArgumentException(\n \"splitpane tag needs to have 2 children \" + node);\n }\n XmlNode leftNode = getReffedNode((XmlNode) xmlChildren.get(0));\n XmlNode rightNode = getReffedNode((XmlNode) xmlChildren.get(1));\n Component leftComponent = xmlToUi(leftNode);\n Component rightComponent = xmlToUi(rightNode);\n boolean continuous = node.getAttribute(ATTR_CONTINUOUS, true);\n int orientation = findValue(node.getAttribute(ATTR_ORIENTATION,\n (String) null), SPLITPANE_NAMES,\n SPLITPANE_VALUES);\n\n JSplitPane split = new JSplitPane(orientation, continuous,\n leftComponent, rightComponent);\n int divider = node.getAttribute(ATTR_DIVIDER, -1);\n if (divider != -1) {\n split.setDividerLocation(divider);\n }\n split.setOneTouchExpandable(\n node.getAttribute(ATTR_ONETOUCHEXPANDABLE, true));\n double resizeweight = node.getAttribute(ATTR_RESIZEWEIGHT, -1.0);\n if (resizeweight != -1.0) {\n split.setResizeWeight(resizeweight);\n }\n comp = split;\n } else if (tag.equals(TAG_LABEL)) {\n String label = node.getAttribute(ATTR_LABEL, \"\");\n comp = new JLabel(label, getAlign(node));\n } else if (tag.equals(TAG_IMAGE)) {\n comp = makeImageButton(node, null, null);\n } else if (tag.equals(TAG_SHAPEPANEL)) {\n comp = new ShapePanel(this, node);\n } else if (tag.equals(TAG_BUTTON)) {\n JButton b = new JButton(node.getAttribute(ATTR_LABEL, \"\"));\n b.setActionCommand(node.getAttribute(ATTR_ACTION, \"No action\"));\n b.addActionListener(this);\n comp = b;\n } else if (tag.equals(TAG_CHOICE)) {\n Choice b = new java.awt.Choice();\n String action = node.getAttribute(ATTR_ACTION,\n (String) null);\n int selected = node.getAttribute(ATTR_SELECTED, 0);\n Hashtable actions = new Hashtable();\n for (int i = 0; i < node.size(); i++) {\n XmlNode child = getReffedNode(node.get(i));\n if ( !child.getTag().equals(TAG_ITEM)) {\n throw new IllegalArgumentException(\"Bad choice item:\"\n + child);\n }\n b.add(child.getAttribute(ATTR_LABEL, \"\"));\n String value = child.getAttribute(ATTR_VALUE, (String) null);\n if (value != null) {\n actions.put(ATTR_VALUE + i, value);\n }\n String subAction = child.getAttribute(ATTR_ACTION,\n (String) null);\n if (subAction != null) {\n actions.put(ATTR_ACTION + i, subAction);\n }\n }\n comp = b;\n if (action != null) {\n actions.put(ATTR_ACTION, action);\n componentToAction.put(b, actions);\n b.select(selected);\n b.addItemListener(this);\n itemStateChanged(new ItemEvent(b, 0, b,\n ItemEvent.ITEM_STATE_CHANGED));\n }\n } else if (tag.equals(TAG_CHECKBOX)) {\n JCheckBox b = new JCheckBox(node.getAttribute(ATTR_LABEL, \"\"),\n node.getAttribute(ATTR_VALUE, false));\n String action = node.getAttribute(ATTR_ACTION, (String) null);\n comp = b;\n if (action != null) {\n componentToAction.put(comp, action);\n b.addItemListener(this);\n itemStateChanged(new ItemEvent(b, 0, b,\n ItemEvent.ITEM_STATE_CHANGED));\n }\n } else {\n comp = new JLabel(\"Unknown tag:\" + tag);\n System.err.println(\"Unknown tag:\" + node);\n }\n\n return comp;\n\n }",
"private void createComponents(String label) {\n itsCombo = createComboBox();\n JScrollPane scroll = new JScrollPane(itsCombo);\n scroll.setPreferredSize(new Dimension(WIDTH, HEIGHT));\n\n LabeledComponent c = new LabeledComponent(\"Symbol\", itsCombo);\n itsComp = c;\n }",
"Input getObjetivo();",
"String constructComponentName() {\n synchronized (Button.class) {\n return base + nameCounter++;\n }\n }",
"protected ComponentModel getComponentModel()\n {\n return componentModel;\n }",
"private Component getPassword() {\n\t\tif (password == null) {\r\n\t\t\tpassword = new JFormattedTextField();\r\n\t\t\tpassword.setText(\"user1\");\r\n\t\t}\r\n\t\treturn password;\r\n\t}",
"private void initcomponent() {\n\r\n\t}",
"public JComponent toSwingComponent();",
"public void setCoda2Component(String coda2Component) {\n this.coda2Component = coda2Component;\n }",
"public interface PIComponent {\n\t\n\t\n\t/**\n\t * returns the current height of the component.\n\t * @return the components height\n\t */\n\tpublic float getHeight();\n\t\n\t\n\t/**\n\t * returns the current width of the component.\n\t * @return the components width\n\t */\n\tpublic float getWidth();\n\t\n\t\n\t/**\n\t * Resizes the component so that it has width width and height height. \n\t * @param width the new width of the component\n \t * @param height the new height of the component\n\t */\n\tpublic void setSize(float width, float height);\n\t\n\t\n\t/**\n\t * Returns the current x coordinate of the components origin.\n\t * @return the current x coordinate of the components origin\n\t */\n\tpublic float getX();\n\t\n\t\n\t/**\n\t * Returns the current y coordinate of the components origin.\n\t * @return the current y coordinate of the components origin\n\t */\n\tpublic float getY();\n\t\n\t\n\t/**\n\t * sets the location of the component\n\t * @param x the x value\n\t * @param y the y value\n\t */\n\tpublic void setLocation(float x, float y);\n\t\n\n\t/**\n\t * checks if the components contains x and y for the sake of e.g. mouse processing. \n\t * @param x the x coordinate of the point\n\t * @param y the y coordinate of the point\n\t * @return true if the component contains x and y\n\t */\n\tpublic boolean contains(float x, float y);\n\t\n\t\n\t/**\n\t * returns the component's unique id.\n\t * @return the component's unique id. \n\t */\n\tpublic UUID getComponentId();\n\t\n\t\n\t/**\n\t * to draw the component onto the canvas\n\t */\n\tpublic void draw();\n\n}",
"private String getCampo3() {\n String campo = this.campoLivre.substring(15);\n System.out.println(\"campo3 \" + campo);\n return boleto.getDigitoCampo(campo);\n }",
"public void setComponent(String componentName1) {\n this.component = componentName1;\n }",
"public StatefullComponent getField(String name) {\n\t\treturn null;\r\n\t}",
"public JComponent getComponent() {\n return itsComp;\n }",
"public Control getControl()\n {\n return composite;\n }",
"@Override\r\n\tprotected Component[] createToggledComponents() throws ThinklabException {\r\n\t\tHbox classel = new Hbox();\r\n\r\n\t\tclassel.setWidth(\"100%\");\r\n\t\t\r\n\t\tWindow wc = new Window();\r\n\t\twc.setWidth(\"100%\");\r\n\t\twc.setBorder(\"normal\");\r\n\t\t\r\n\t\tclassel.appendChild(new Label(\"restrict type to \"));\r\n\t\tclassel.appendChild(new ObjectClassSelector(conceptID, indentLevel));\r\n\t\t\r\n\t\t/* TODO we must track the recursion level and insert an \"indent\" component if > 0 */\r\n\t\t\r\n\t\tInstanceSelector subc = new InstanceSelector(indentLevel);\r\n\t\tsubc.setConcept(conceptID);\r\n\t\tsubc.setWidth(\"100%\");\r\n\t\tobjComponent = subc;\r\n\t\t\r\n\t\tVbox amo = new Vbox(); amo.setWidth(\"100%\");\r\n\t\tHbox uff = new Hbox(); uff.setWidth(\"100%\");\r\n\t\r\n\t\tamo.appendChild(classel);\r\n\t\tamo.appendChild(subc);\r\n\t\twc.appendChild(amo);\r\n\t\t\r\n\t\tif (indentLevel > 0) {\r\n\t\t\tSeparator sep = new Separator(\"vertical\");\r\n\t\t\tsep.setWidth((30*indentLevel) + \"px\");\r\n\t\t\tuff.appendChild(sep);\r\n\t\t}\r\n\t\tuff.appendChild(wc);\r\n\t\t\r\n\t\tComponent[] c = new Component[1];\r\n\t\tc[0] = uff;\r\n\t\t\r\n\t\treturn c;\r\n\t\t\r\n\t}",
"public int getInput2() {\n return input2;\n }",
"public Component getComponent(String path)\r\n {\r\n Class<? extends Component> componentClass = components.get(path);\r\n if (componentClass == null)\r\n {\r\n return null;\r\n }\r\n Constructor<?>[] constructors = componentClass.getConstructors();\r\n for (Constructor<?> constructor : constructors)\r\n {\r\n if ((constructor.getParameterTypes().length == 1) \r\n && (constructor.getParameterTypes()[0] == Component.class))\r\n {\r\n Component instance;\r\n try\r\n {\r\n instance = (Component) constructor.newInstance(new Object[] {null});\r\n } catch (InstantiationException | IllegalAccessException\r\n | IllegalArgumentException | InvocationTargetException e)\r\n {\r\n throw new RuntimeException(e);\r\n }\r\n postConstruct(instance);\r\n return instance;\r\n }\r\n }\r\n throw new IllegalStateException(\"Component of class \" + componentClass.getName() \r\n + \" has no constructor with a single Component parameter\");\r\n }",
"@SuppressWarnings(\"unchecked\")\n public <T extends Component> T getComponent() {\n try {\n return (T) component;\n } catch (ClassCastException ex) {\n getLogger().log(Level.SEVERE,\n \"Component code/design type mismatch\", ex);\n }\n return null;\n }",
"public int getNumberOfComponents();",
"private JTextField getJTextField2()\n\t{\n\t\tif ( jTextField2 == null )\n\t\t{\n\t\t\tjTextField2 = new JTextField();\n\t\t\tjTextField2.setBounds(new Rectangle(23, 85, 107, 19));\n\t\t}\n\t\treturn jTextField2;\n\t}",
"public Class<?> getComponentType();",
"public int components() {\n return numOfComponents;\n }",
"@Override\n public FormFieldComponent getEditorComponent() {\n return (FormFieldComponent)editor;\n }",
"public JComponent getInputFormatAccessory();",
"public Component load(){\n\t\treturn this;\n\t}",
"public Complemento getC() {\n return C;\n }",
"public AppComponent component(){\n return mComponent;\n }",
"public void createComponents(JComponent panel) {\r\n\t\t// Array display\r\n\t\tpanel.setLayout(new FlowLayout());\r\n\t\tpanel1.setLayout(new BorderLayout());\r\n\t\tcanvas.addMouseListener(aml);\r\n\t\tcanvas.addMouseMotionListener(aml);\r\n\t\tpanel1.add(canvas);\r\n\t\tpanel1.add(instr, BorderLayout.NORTH);\r\n\t\t\r\n\t\tpanel.add(panel1);\r\n\r\n\t\t// Controls\r\n\t\tpanel2.setLayout(new GridLayout(5, 2));\t\r\n\t\t\r\n\t\tJButton createArrayButton = new JButton(\"Create Customized Array\");\r\n\t\tpanel2.add(createArrayButton);\r\n\t\tcreateArrayButton.addActionListener(new createArrayListener());\r\n\r\n\t\tJButton changeValueButton = new JButton(\"Change Element Value\");\r\n\t\tpanel2.add(changeValueButton);\r\n\t\tchangeValueButton.addActionListener(new changeValueListener());\r\n\r\n\t\tJButton accessButton = new JButton(\"Access Element\");\r\n\t\tpanel2.add(accessButton);\r\n\t\taccessButton.addActionListener(new accessListener());\r\n\t\t\r\n\t\tJButton findButton = new JButton(\"Search Element\");\r\n\t\tpanel2.add(findButton);\r\n\t\tfindButton.addActionListener(new findListener());\r\n\t\t\r\n\t\tJButton clearButton = new JButton(\"Clear Previous Content\");\r\n\t\tpanel2.add(clearButton);\r\n\t\tclearButton.addActionListener(new ClearListener());\t\r\n\t\t\r\n\t\tpanel.add(panel2);\t\r\n\t}",
"public CadastroComplemento() {\n initComponents();\n \n }",
"public String toString()\n/* */ {\n/* 210 */ return \"[array type, component type: \" + this._componentType + \"]\";\n/* */ }",
"private void addComponents() {\n\t\t\n\t\t// prima riga di lettere\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tadd(letterLabel(i));\n\t\t\t\n\t\t/* la scacchiera ha l'oringine 0,0 in basso a sinistra\n\t\t * mentre la griglia si riempie di elementi dall'alto\n\t\t * percio' il for delle x (j) cresce mentre popoliamo le celle (bottoni)\n\t\t * mentre il for delle y (i) decresce man mano che passiamo di riga in riga */\n\t\tfor (int i = 7; i >= 0; i--)\n\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\tif (j == 0 || j == 9)\n\t\t\t\t\tadd(numberLabel(i + 1));\n\t\t\t\telse\n\t\t\t\t\tadd(buttons[j - 1][i]);\n\t\t\t}\n\t\t\n\t\t// ultima riga (uguale alla prima)\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tadd(letterLabel(i));\n\t}",
"DsmlComponent createDsmlComponent();",
"public JFormattedTextField getEditComponent() {\r\n\t\tif(m_editComponent==null) {\r\n\t\t\t// create\r\n\t\t\tm_editComponent = createDefaultComponent(true,m_documentListener);\r\n\t\t\t//m_editComponent.getDocument().addDocumentListener(m_documentListener);\r\n\t\t}\r\n\t\treturn m_editComponent;\r\n\t}",
"public void testGetComponent() {\n System.out.println(\"getComponent\"); // NOI18N\n \n document.getTransactionManager().writeAccess(new Runnable() {\n public void run() {\n DesignComponent comp = document.createComponent(FirstCD.TYPEID_CLASS);\n DesignComponent result = PropertyValue.createComponentReference(comp).getComponent();\n DesignComponent expResult = comp;\n \n assertEquals(expResult,result);\n }\n });\n \n }",
"public JPanel getRepresentacionGrafica();",
"private void inicComponent() {\n\n\t\tprogres = (LinearLayout) findViewById(R.id.linearLayoutProgres);\n\t\t\n\t\tbuttonKategorije = (Button) findViewById(R.id.buttonKategorije);\n\t\t\n\t}",
"public String getInput1() {\n return input1;\n }"
]
| [
"0.67288923",
"0.66998607",
"0.6524375",
"0.6423778",
"0.6097187",
"0.6061862",
"0.5979805",
"0.5979805",
"0.59502816",
"0.591346",
"0.5893973",
"0.5866774",
"0.569974",
"0.56995064",
"0.5689245",
"0.5656258",
"0.56484646",
"0.56116945",
"0.5591255",
"0.558524",
"0.55487955",
"0.55465746",
"0.55054533",
"0.5490113",
"0.54827476",
"0.5467871",
"0.5463868",
"0.5458188",
"0.54371214",
"0.5430063",
"0.54189986",
"0.54000133",
"0.53994435",
"0.53943413",
"0.53761864",
"0.53738517",
"0.5373259",
"0.5370097",
"0.53588474",
"0.5342069",
"0.5338914",
"0.5330395",
"0.532923",
"0.5300597",
"0.5297953",
"0.52962905",
"0.52892625",
"0.5288903",
"0.5287263",
"0.5277924",
"0.52769804",
"0.5276757",
"0.52746403",
"0.5273525",
"0.5268438",
"0.52633464",
"0.5261805",
"0.5252101",
"0.523057",
"0.5217261",
"0.5217261",
"0.51996475",
"0.5191113",
"0.51901954",
"0.51896757",
"0.51854014",
"0.51797754",
"0.5177238",
"0.5172733",
"0.51688373",
"0.51467025",
"0.51402956",
"0.51346666",
"0.51254725",
"0.511513",
"0.5108893",
"0.51065814",
"0.5105623",
"0.5102315",
"0.510229",
"0.5096313",
"0.509512",
"0.5095033",
"0.50940984",
"0.5085191",
"0.5085072",
"0.5084067",
"0.5073517",
"0.50731105",
"0.50713867",
"0.5054336",
"0.5045888",
"0.5045154",
"0.5037815",
"0.5037356",
"0.5032072",
"0.5029891",
"0.502532",
"0.5024302",
"0.50126636"
]
| 0.61096305 | 4 |
Metodo para obtener el componente enlazado en el input 1. | public Componente getEntrada1() {
return Entrada1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final int component1() {\n return 0;\n }",
"@Override public Object getComponente(String componente){\n return getBlindaje(componente);\n }",
"Component getComponent() {\n/* 224 */ return this.component;\n/* */ }",
"public String getComponent() {\n return this.component;\n }",
"Component createComponent();",
"Component createComponent();",
"public Component getComponent() {\n\treturn component;\n}",
"public String getComponent() {\r\n\t\treturn component;\r\n\t}",
"@Override\n\tpublic Component getComponent() {\n\t\treturn p;\n\t}",
"public String getCoda2Component() {\n return coda2Component;\n }",
"@Override\n\tpublic ElementView getComponent() {\n\t\treturn jc;\n\t}",
"public Component getComponent() {\n return component;\n }",
"public java.lang.Number getComponent1AsNumber() {\n\t\treturn SwiftFormatUtils.getNumber(getComponent(1));\n\t}",
"@Override\n\tpublic Component getComponent() {\n\t\treturn this;\n\t}",
"String constructComponentName() {\n return base + nameCounter++;\n }",
"public JawbComponent getMainComponent () {\n return null;\n }",
"Optional<Sketch> component(int i);",
"@Override\n public abstract String getComponentType();",
"private InputPanel createInputComponent(String id, final FeedbackPanel feedback) {\n InputPanel component = createTypedInputComponent(id);\n\n final FormComponent formComponent = component.getComponent();\n System.out.println(\">>>>>>>>>>>>>>>>>>>>>>>> \" + count);\n formComponent.add(new SimpleAttributeModifier(\"size\", \"42\"));\n formComponent.add(new AjaxFormComponentUpdatingBehavior(\"onBlur\") {\n\n @Override\n protected void onUpdate(AjaxRequestTarget target) {\n target.add(formComponent);\n target.add(feedback);\n }\n\n @Override\n protected void onError(AjaxRequestTarget target, RuntimeException e) {\n target.add(formComponent);\n target.add(feedback);\n\n super.onError(target, e);\n }\n });\n \n count++;\n return component;\n }",
"protected final Component getComponent()\n\t{\n\t\treturn component;\n\t}",
"protected abstract Object[] getComponents();",
"public abstract Component getComponentByName(String name);",
"JComponent getRenderComponent();",
"protected Node getComponentNode() {\n return componentNode;\n }",
"@Override\n public Component getComponent() {\n if (component == null) {\n component = new PubMLSTVisualPanel2();\n }\n component.setPreferredSize(new java.awt.Dimension(480,340));\n return component;\n }",
"public C startComponent() {\n return startComponent(null);\n }",
"private void customizeComponents(Component c, int i1) {\r\n\r\n\t\t/**\r\n\t\t * cName is name of component without index\r\n\t\t */\r\n\t\tint a = 1;\r\n\t\t/**\r\n\t\t * to get correct cName depending on index\r\n\t\t */\r\n\t\tfor (int i = 0; i < c.getName().length(); i++) {\r\n\t\t\ttry {\r\n\t\t\t\ta = Integer.parseInt(c.getName().substring(i));\r\n\t\t\t\ta = c.getName().substring(i).length();\r\n\t\t\t\tbreak;\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString cName = c.getName().substring(0, c.getName().length() - a);\r\n\r\n\t\tswitch (cName) {\r\n\t\tcase \"lblImageSimulation\": {\r\n\t\t\t((JLabel) c).setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageCup\": {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"txfCup\": {\r\n\t\t\t((JTextField) c).setOpaque(false);\r\n\t\t\tc.setForeground(Color.gray);\r\n\t\t\tc.setFont(new Font(c.getFont().getName(), Font.BOLD, 36));\r\n\t\t\ttxfsCup[i1] = (JTextField) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"txfCupVolume\": {\r\n\t\t\ttxfsCupVolume[i1] = (JTextField) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblDisplayName\": {\r\n\t\t\t((JLabel) c).setBorder(\r\n\t\t\t\t\tnew CompoundBorder(new EtchedBorder(EtchedBorder.RAISED, null, null), new EmptyBorder(0, 2, 0, 0)));\r\n\t\t\tc.setForeground(Color.darkGray);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"txfDisplayCurrentVolume\": {\r\n\t\t\t((JTextField) c).setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));\r\n\t\t\t((JTextField) c).setOpaque(true);\r\n\t\t\tc.setBackground(new Color(30, 200, 225));\r\n\t\t\tFont dig7_S16 = dig7.deriveFont(Font.BOLD, 16);\r\n\t\t\tGraphicsEnvironment.getLocalGraphicsEnvironment().registerFont(dig7_S16);\r\n\t\t\tc.setFont(dig7_S16);\r\n\t\t\ttxfsDisplayCurrentVolume[i1] = (JTextField) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageCD\": {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblCDBadge\": {\r\n\t\t\tc.setForeground(Color.lightGray);\r\n\t\t\tc.setFont(dig7);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"txfWaitTime\": {\r\n\t\t\t((JTextField) c).setOpaque(true);\r\n\t\t\tc.setBackground(new Color(140, 200, 255));\r\n\t\t\tc.setFont(new Font(c.getFont().getName(), Font.PLAIN, 8));\r\n\t\t\ttxfsWaitTime[i1] = (JTextField) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"pgbVolume\": {\r\n\t\t\t((JProgressBar) c).setMinimum(0);\r\n\t\t\t((JProgressBar) c).setMaximum(MAXVOLUMEDISPENSER);\r\n\t\t\t((JProgressBar) c).setValue((int) MAXVOLUMEDISPENSER / 2);\r\n\t\t\tc.setForeground(new Color(140, 200, 255));\r\n\t\t\tc.setBackground(new Color(80, 80, 80));\r\n\t\t\t((JProgressBar) c).setBorderPainted(false);\r\n\t\t\tpgbsVolume[i1] = (JProgressBar) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"btnPause\": {\r\n\t\t\tc.setBackground(new Color(90, 210, 165));\r\n\t\t\tc.setFont(new Font(c.getFont().getName(), Font.PLAIN, 8));\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageBoard\": {\r\n\t\t\tlblsAbout[0] = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageAuthor\": {\r\n\t\t\tc.setVisible(false);\r\n\t\t\tlblsAbout[1] = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageSizeOfCups\": {\r\n\t\t\tc.setVisible(false);\r\n\t\t\tlblsAbout[2] = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageNumberOfCoffeeDispensers\": {\r\n\t\t\tc.setVisible(false);\r\n\t\t\tlblsAbout[3] = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImagePause\": {\r\n\t\t\tc.setVisible(false);\r\n\t\t\tlblsAbout[4] = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblPauseInfo\": {\r\n\t\t\tc.setForeground(Color.gray);\r\n\t\t\tc.setFont(new Font(c.getFont().getName(), Font.BOLD, 36));\r\n\t\t\t((JLabel) c).setText(\"\");\r\n\t\t\tlblPauseInfo = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tdefault: {\r\n\t\t\tSystem.out.println(\"unexpected event in customizeComponents\" + c.getName());\r\n\t\t}\r\n\t\t}\r\n\t}",
"public JComponent getComponent();",
"public Entity getComponent() {\n return component;\n }",
"public void setComponent(String componentName1) {\n this.component = componentName1;\n }",
"@Override\n public AbstractProcess getComponent(String name)\n {\n return components.get(name);\n }",
"public ComponenteCosto getComponenteCosto()\r\n/* 68: */ {\r\n/* 69: 91 */ return this.componenteCosto;\r\n/* 70: */ }",
"public Componente(Image image, Componente entrada1, Componente entrada2,String name) {\n Image = image;\n Entrada1=entrada1;\n Entrada2=entrada2;\n Name=name;\n Output=2;\n ID=IDt;\n IDt++;\n input=false;\n input1=2;\n input2=2;\n }",
"public String componentName(int index) {\n\treturn(comp[index]);\n }",
"private void initcomponent() {\n\r\n\t}",
"ComponentParameterInstance createComponentParameterInstance();",
"String constructComponentName() {\n synchronized (Button.class) {\n return base + nameCounter++;\n }\n }",
"public String getCodaComponent() {\n return codaComponent;\n }",
"public Component getComponent(String name) {\n Optional<Component> component = elements.getComponent(name);\n\n if(component.isPresent()) {\n return component.get();\n } else {\n Assert.fail(\"Missing component \" + name);\n return null;\n }\n\n }",
"protected Component generateComp(String compName) {\n\t\treturn null;\n\t}",
"public PizzaTodopizzaAbstracta obtenerComponente(){\n\t\treturn componente;\n\t}",
"private void inicComponent() {\n\n\t\tprogres = (LinearLayout) findViewById(R.id.linearLayoutProgres);\n\t\t\n\t\tbuttonKategorije = (Button) findViewById(R.id.buttonKategorije);\n\t\t\n\t}",
"@Override\n public SelectCurriculumVisualPanel getComponent() {\n if (component == null) {\n component = new SelectCurriculumVisualPanel();\n component.manager.addPropertyChangeListener(this);\n }\n return component;\n }",
"JComponent getImpl();",
"public Componente getEntrada2() {\n return Entrada2;\n }",
"@Override\n public JComponent getComponent () {\n return this;\n }",
"public int getComponentID() {\n return COMPONENT_ID;\n }",
"public JComponent getWrappedComponent()\n {\n return field;\n }",
"private void createComponentBox() {\r\n\t\tthis.componentBox = new Vector<String>();\r\n\t\tthis.componentBox.add(\"Sword\");\r\n\t\tthis.componentBox.add(\"Two-handed Sword\");\r\n\t\tthis.componentBox.add(\"Staff\");\r\n\t\tthis.componentBox.add(\"Axe\");\r\n\t\tthis.componentBox.add(\"Hammer\");\r\n\t\tthis.componentBox.add(\"Bow\");\r\n\t\tthis.componentBox.add(\"Crossbow\");\r\n\t\tthis.componentBox.add(\"Wand\");\r\n\t\tthis.componentBox.add(\"Spear\");\r\n\t\tthis.componentBox.add(\"Bottle\");\r\n\t}",
"Builder setComponent(String component);",
"public <S> ComponentInstance<S> getComponentInstance();",
"public Control getControl()\n {\n return composite;\n }",
"public void referenciaComponentes() {\n campoModeloCelular = findViewById(R.id.CampoModeloCelular);\n campoNumeroChip1 = findViewById(R.id.radioButtonNumChip1);\n campoNumeroChip2 = findViewById(R.id.radioButtonNumChip2);\n numeroDoChip1 = findViewById(R.id.EditTextNumChip1);\n numeroDoChip2 = findViewById(R.id.EditTextNumChip2);\n IMEI1 = findViewById(R.id.campoIMEI1);\n IMEI2 = findViewById(R.id.campoIMEI2);\n\n // iniciando alguns componentes invisiveis\n IMEI2.setVisibility(View.GONE);\n numeroDoChip2.setVisibility(View.GONE);\n }",
"Object getComponent(WebElement element);",
"String componentTypeName();",
"ComponentType createComponentType();",
"public abstract JComponent getComponent();",
"public JPanel getPanel1() {\n return panel1;\n }",
"public interface PIComponent {\n\t\n\t\n\t/**\n\t * returns the current height of the component.\n\t * @return the components height\n\t */\n\tpublic float getHeight();\n\t\n\t\n\t/**\n\t * returns the current width of the component.\n\t * @return the components width\n\t */\n\tpublic float getWidth();\n\t\n\t\n\t/**\n\t * Resizes the component so that it has width width and height height. \n\t * @param width the new width of the component\n \t * @param height the new height of the component\n\t */\n\tpublic void setSize(float width, float height);\n\t\n\t\n\t/**\n\t * Returns the current x coordinate of the components origin.\n\t * @return the current x coordinate of the components origin\n\t */\n\tpublic float getX();\n\t\n\t\n\t/**\n\t * Returns the current y coordinate of the components origin.\n\t * @return the current y coordinate of the components origin\n\t */\n\tpublic float getY();\n\t\n\t\n\t/**\n\t * sets the location of the component\n\t * @param x the x value\n\t * @param y the y value\n\t */\n\tpublic void setLocation(float x, float y);\n\t\n\n\t/**\n\t * checks if the components contains x and y for the sake of e.g. mouse processing. \n\t * @param x the x coordinate of the point\n\t * @param y the y coordinate of the point\n\t * @return true if the component contains x and y\n\t */\n\tpublic boolean contains(float x, float y);\n\t\n\t\n\t/**\n\t * returns the component's unique id.\n\t * @return the component's unique id. \n\t */\n\tpublic UUID getComponentId();\n\t\n\t\n\t/**\n\t * to draw the component onto the canvas\n\t */\n\tpublic void draw();\n\n}",
"public JComponent getComponent() {\n return itsComp;\n }",
"public Component prepare(){\n\t\treturn this;\n\t}",
"String getComponentName();",
"String getComponentName();",
"public Component load(){\n\t\treturn this;\n\t}",
"public CadastroComplemento() {\n initComponents();\n \n }",
"@Override\n\tpublic Component getComponent() {\n\t\treturn toolbox;\n\t}",
"protected ComponentModel getComponentModel()\n {\n return componentModel;\n }",
"@Override\r\n\tpublic TypeWrapper getComponentType() {\n\t\treturn null;\r\n\t}",
"public AppComponent component(){\n return mComponent;\n }",
"BaseComponent getComponentName();",
"private void createComponents(String label) {\n itsCombo = createComboBox();\n JScrollPane scroll = new JScrollPane(itsCombo);\n scroll.setPreferredSize(new Dimension(WIDTH, HEIGHT));\n\n LabeledComponent c = new LabeledComponent(\"Symbol\", itsCombo);\n itsComp = c;\n }",
"public Component getSelf(ExecutionCtrl exec);",
"ComponentsType createComponentsType();",
"public int mainComponent() {\n\t\treturn resizable ? MAIN_COMPONENT_RESIZABLE : MAIN_COMPONENT_FIXED; // interfaces\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// with\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// resizing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// on\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 7\n\t}",
"private String getComponentValue(JComponent component)\r\n {\r\n\t if (component instanceof JTextField)\r\n\t {\r\n\t\t JTextField text = (JTextField)component;\r\n\t\t return text.getText();\r\n\t }\r\n\t else if (component instanceof JCheckBox)\r\n\t {\r\n\t\t JCheckBox checkBox = (JCheckBox)component;\r\n\t \t boolean value = checkBox.isSelected();\r\n\t \t return (value) ? \"true\" : \"false\";\r\n\t }\r\n\t else if (component instanceof JComboBox)\r\n\t {\r\n\t\t @SuppressWarnings(\"unchecked\")\r\n\t\t JComboBox<String> comboBox = (JComboBox<String>)component;\r\n\t\t \r\n\t\t String value = (String)comboBox.getSelectedItem();\r\n\t\t if (value == null) return \"\";\r\n\t\t if (value.equals(fields[0])) return \"\";\r\n\t\t if (value.length()>2) return value.toLowerCase();\r\n\t\t return value;\r\n\t }\r\n\t return \"\";\r\n }",
"public int components() {\n return numOfComponents;\n }",
"Input getObjetivo();",
"@SuppressWarnings(\"unchecked\")\n private void create() {\n components.clear();\n\n if (content != null) {\n content.clearChildren();\n }\n else {\n content = new Container();\n content.setInsets(INSETS);\n }\n\n GuiComponent guiComponent = (GuiComponent) getReflectedItem().getValue();\n\n // let the user choose which type of backgroundComponent they want.\n Label label = content.addChild(new Label(\"Type\"), 0, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n Container backgroundTypeContainer = content.addChild(new Container(), 0, 1);\n\n ColorRGBA oldColor = BackgroundUtils.getBackgroundColor(guiComponent);\n\n Button colorOnlyBgButton = backgroundTypeContainer.addChild(new Button(\"Color Only\"), 0, 0);\n colorOnlyBgButton.addClickCommands(source -> {\n if (!(guiComponent instanceof QuadBackgroundComponent)) {\n setValue(new QuadBackgroundComponent(oldColor));\n create();\n }\n });\n\n Button colorAndImageBgButton = backgroundTypeContainer.addChild(new Button(\"Color and Image\"), 0, 1);\n colorAndImageBgButton.addClickCommands(source -> {\n if (!(guiComponent instanceof TbtQuadBackgroundComponent)) {\n setValue(BackgroundComponents.gradient(oldColor));\n create();\n }\n });\n\n if (guiComponent instanceof QuadBackgroundComponent) {\n\n try {\n\n Method getter = QuadBackgroundComponent.class.getDeclaredMethod(\"getColor\");\n Method setter = QuadBackgroundComponent.class.getDeclaredMethod(\"setColor\", ColorRGBA.class);\n\n label = content.addChild(new Label(\"Color\"), 1, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(guiComponent, getter, setter);\n content.addChild(bgColorComponent.getPanel(), 1, 1);\n components.add(bgColorComponent);\n\n // margin\n getter = QuadBackgroundComponent.class.getDeclaredMethod(\"getMargin\");\n setter = QuadBackgroundComponent.class.getDeclaredMethod(\"setMargin\", Vector2f.class);\n\n label = content.addChild(new Label(\"Margin\"), 2, 0);\n Vector2fComponent marginComponent = new Vector2fComponent(guiComponent, getter, setter);\n content.addChild(marginComponent.getPanel(), 2, 1);\n components.add(marginComponent);\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n }\n else if (guiComponent instanceof TbtQuadBackgroundComponent) {\n\n TbtQuadBackgroundComponent backgroundComponent = (TbtQuadBackgroundComponent) guiComponent;\n\n try {\n Method getter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"getColor\");\n Method setter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"setColor\", ColorRGBA.class);\n\n label = content.addChild(new Label(\"Color\"), 1, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(guiComponent, getter, setter);\n content.addChild(bgColorComponent.getPanel(), 1, 1);\n components.add(bgColorComponent);\n\n label = content.addChild(new Label(\"Image\"), 2, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n Button browseImageButton = content.addChild(new Button(\"Select Background Image...\"), 2, 1);\n browseImageButton.setTextVAlignment(VAlignment.Center);\n browseImageButton.addClickCommands(source -> {\n\n JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\n jfc.setDialogTitle(\"Select a Background Image...\");\n jfc.setMultiSelectionEnabled(false);\n jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n jfc.setAcceptAllFileFilterUsed(false);\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"PNG Images\", \"png\");\n jfc.addChoosableFileFilter(filter);\n int returnValue = jfc.showOpenDialog(null);\n\n if (returnValue == JFileChooser.APPROVE_OPTION) {\n\n File file = jfc.getSelectedFile();\n\n\n try {\n\n byte[] imageData = Files.readAllBytes(file.toPath());\n byte[] stringData = Base64.getEncoder().encode(imageData);\n\n String imageString = new String(stringData);\n\n // PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n // panelBackground.setBase64Image(imageString);\n\n Texture texture = new TextureUtils().fromBase64(imageString);\n\n backgroundComponent.setTexture(texture);\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n });\n\n // margin\n getter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"getMargin\");\n setter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"setMargin\", Vector2f.class);\n\n label = content.addChild(new Label(\"Margin\"), 3, 0);\n Vector2fComponent marginComponent = new Vector2fComponent(guiComponent, getter, setter);\n content.addChild(marginComponent.getPanel(), 3, 1);\n components.add(marginComponent);\n\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n }\n\n//\n// this.content = new RollupPanel(\"\", contentContainer, null);\n// this.content.setOpen(false);\n//\n// // background Image\n// Container bgImageContainer = contentContainer.addChild(new Container(new SpringGridLayout(Axis.Y, Axis.X, FillMode.Last, FillMode.Last)), 0, 0);\n// Label bgImageLabel = bgImageContainer.addChild(new Label(\"Background Image\"), 0, 0);\n// bgImageLabel.setTextVAlignment(VAlignment.Center);\n// bgImageLabel.setInsets(new Insets3f(0.0F, 2.0F, 0.0F, 5.0F));\n// Button browseImageButton = bgImageContainer.addChild(new Button(\"Browse...\"), 0, 1);\n// Button removeImageButton = bgImageContainer.addChild(new Button(\"Remove\"), 0, 2);\n// bgImageContainer.addChild(new Container(), 0, 3);\n//\n// browseImageButton.addClickCommands(source -> {\n//\n// JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\n// jfc.setDialogTitle(\"Select a Background Image...\");\n// jfc.setMultiSelectionEnabled(false);\n// jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n// jfc.setAcceptAllFileFilterUsed(false);\n// FileNameExtensionFilter filter = new FileNameExtensionFilter(\"PNG Images\", \"png\");\n// jfc.addChoosableFileFilter(filter);\n// int returnValue = jfc.showOpenDialog(null);\n//\n// if (returnValue == JFileChooser.APPROVE_OPTION) {\n//\n// File file = jfc.getSelectedFile();\n//\n// try {\n// byte[] imageData = Files.readAllBytes(file.toPath());\n// byte[] stringData = Base64.getEncoder().encode(imageData);\n//\n// String imageString = new String(stringData);\n//\n// PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n// panelBackground.setBase64Image(imageString);\n//\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// }\n//\n// });\n//\n// removeImageButton.addClickCommands(source -> {\n// PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n// panelBackground.setBase64Image(\"\");\n// });\n//\n//\n// try {\n//\n// // color\n// Method get = PanelBackground.class.getMethod(\"getColor\");\n// Method set = PanelBackground.class.getMethod(\"setColor\", ColorRGBA.class);\n//\n// ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(getReflectedProperty().getValue(), get, set);\n// bgColorComponent.setPropertyName(\"Color\");\n// contentContainer.addChild(bgColorComponent.getPanel());\n// components.add(bgColorComponent);\n//\n// // insetTop\n// get = PanelBackground.class.getMethod(\"getInsetTop\");\n// set = PanelBackground.class.getMethod(\"setInsetTop\", int.class);\n//\n// IntComponent insetTopComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetTopComponent.setPropertyName(\"Inset Top\");\n// contentContainer.addChild(insetTopComponent.getPanel());\n// components.add(insetTopComponent);\n//\n// // insetLeft\n// get = PanelBackground.class.getMethod(\"getInsetLeft\");\n// set = PanelBackground.class.getMethod(\"setInsetLeft\", int.class);\n//\n// IntComponent insetLeftComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetLeftComponent.setPropertyName(\"Inset Left\");\n// contentContainer.addChild(insetLeftComponent.getPanel());\n// components.add(insetLeftComponent);\n//\n// // insetBottom\n// get = PanelBackground.class.getMethod(\"getInsetBottom\");\n// set = PanelBackground.class.getMethod(\"setInsetBottom\", int.class);\n//\n// IntComponent insetBottomComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetBottomComponent.setPropertyName(\"Inset Bottom\");\n// contentContainer.addChild(insetBottomComponent.getPanel());\n// components.add(insetBottomComponent);\n//\n// // insetRight\n// get = PanelBackground.class.getMethod(\"getInsetRight\");\n// set = PanelBackground.class.getMethod(\"setInsetRight\", int.class);\n//\n// IntComponent insetRightComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetRightComponent.setPropertyName(\"Inset Right\");\n// contentContainer.addChild(insetRightComponent.getPanel());\n// components.add(insetRightComponent);\n//\n// // zOffset\n// get = PanelBackground.class.getMethod(\"getzOffset\");\n// set = PanelBackground.class.getMethod(\"setzOffset\", float.class);\n//\n// FloatComponent zOffsetComponent = new FloatComponent(getReflectedProperty().getValue(), get, set);\n// zOffsetComponent.setPropertyName(\"Z-Offset\");\n// contentContainer.addChild(zOffsetComponent.getPanel());\n// components.add(zOffsetComponent);\n//\n// } catch (NoSuchMethodException e) {\n// e.printStackTrace();\n// }\n\n\n }",
"@Override\n public AttributeDescriptor.ComponentType getComponentType(AttributeDescriptor.Operator operator)\n {\n DemoAttributeDescriptor demoAttrDesc = (DemoAttributeDescriptor) getAttribute();\n boolean isMultiSelectOper = demoAttrDesc.hasVariableOperands(operator);\n if (demoAttrDesc.isLOV())\n {\n if (isMultiSelectOper)\n {\n // always return selectOneChoice for multiSelect enabled operators\n return ComponentType.selectManyChoice;\n }\n else\n {\n // For certain operators the default component type is used, otherwise the base component\n // type is used (based on the datatype)\n if (demoAttrDesc.useDefaultComponentType(operator))\n {\n AttributeDescriptor.ComponentType compType = demoAttrDesc.getComponentType();\n \n //try to simulate the current model driven query's behaviour and return \n //inputText for all operators except equals and non equals\n if(compType.equals(AttributeDescriptor.ComponentType.selectOneChoice))\n {\n if(operator != null && (DemoPageDef.OperatorDef.EQUALS.getLabel().equals(operator.getLabel()) || \n DemoPageDef.OperatorDef.NOT_EQUALS.getLabel().equals(operator.getLabel())))\n {\n return compType;\n }\n else\n {\n return ComponentType.inputText;\n }\n }\n }\n else\n {\n // based on the type of the attribute \n String typeName = demoAttrDesc.getType().getName();\n if (typeName.equals(\"java.lang.Number\"))\n return ComponentType.inputNumberSpinbox;\n else if (typeName.equals(\"java.util.Date\"))\n return ComponentType.inputDate;\n else\n return ComponentType.inputText;\n }\n }\n }\n \n // Return default componentType\n return demoAttrDesc.getComponentType();\n }",
"public int getNumberOfComponents();",
"public Class<?> getComponentType();",
"public Complemento getC() {\n return C;\n }",
"private void inicializarComponentes() {\n\n\n comenzar = new JButton(devolverImagenButton(\"comenzar\", \"png\", 300, 300));\n comenzar.setRolloverIcon(devolverImagenButton(\"comenzar1\", \"png\", 300, 300));\n comenzar.setBackground(Color.WHITE);\n comenzar.setBorder(null);\n comenzar.setActionCommand(\"COMENZAR\");\n comenzar.setBounds(335, 450, 240, 100);\n add(comenzar);\n\n l1 = new JLabel();\n devolverImagenLabel(\"Bienvenido\", \"gif\", 900, 700, l1);\n l1.setBounds(0, 0, 900, 700);\n add(l1);\n\n }",
"ComponentBodyType getComponentInfo();",
"public StatefullComponent getField(String name) {\n\t\treturn null;\r\n\t}",
"private void colocaComponentes() {\r\n\t\tJLabel lblId = new JLabel(\"Id\");\r\n\t\tlblId.setBounds(10, 11, 46, 14);\r\n\t\tadd(lblId);\r\n\t\t\r\n\t\tJLabel lblApellido = new JLabel(\"1er Apellido\");\r\n\t\tlblApellido.setBounds(168, 11, 131, 14);\r\n\t\tadd(lblApellido);\r\n\t\t\r\n\t\ttextId = new JTextField();\r\n\t\ttextId.setBounds(10, 36, 86, 20);\r\n\t\tadd(textId);\r\n\t\ttextId.setColumns(10);\r\n\t\t\r\n\t\ttextApellido = new JTextField();\r\n\t\ttextApellido.setBounds(168, 36, 118, 20);\r\n\t\tadd(textApellido);\r\n\t\ttextApellido.setColumns(10);\r\n\t\t\r\n\t\tbtnComprobar = new JButton(\"Comprobar\");\r\n\t\tbtnComprobar.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tconsultaDatos();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnComprobar.setBounds(10, 83, 362, 23);\r\n\t\tadd(btnComprobar);\r\n\t\t\r\n\t\ttextMensaje = new JTextField();\r\n\t\ttextMensaje.setEditable(false);\r\n\t\ttextMensaje.setBounds(10, 117, 362, 20);\r\n\t\tadd(textMensaje);\r\n\t\ttextMensaje.setColumns(10);\r\n\t\t\r\n\t\tbtnAtras = new JButton(\"Atras\");\r\n\t\tbtnAtras.setBounds(10, 254, 89, 23);\r\n\t\tadd(btnAtras);\r\n\t\tbtnAtras.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tcambiaPanelAnterior();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"protected String getComponentName() {\n return (component == null) ? \"*No Name*\" : component.toString();\n }",
"public String getInput1() {\n return input1;\n }",
"private Component createComponent(XmlNode node, String id) {\n\n Component comp = null;\n String tag = node.getTag();\n\n if (tag.equals(TAG_PANEL)) {\n comp = layoutContainer(new JPanel(), node, node.getChildren());\n } else if (tag.equals(TAG_BORDER)) {\n comp = layoutBorder(node, node.getChildren());\n } else if (tag.equals(TAG_TEXTINPUT)) {\n int cols = node.getAttribute(ATTR_COLS, -1);\n int rows = node.getAttribute(ATTR_ROWS, -1);\n String value = node.getAttribute(ATTR_VALUE, \"\");\n\n JTextComponent textComp;\n if (rows > 1) {\n if (cols < 0) {\n cols = 30;\n }\n textComp = new JTextArea(value, rows, cols);\n } else {\n if (cols == -1) {\n textComp = new JTextField(value);\n } else {\n textComp = new JTextField(value, cols);\n }\n ((JTextField) textComp).addActionListener(this);\n }\n comp = textComp;\n String action = node.getAttribute(ATTR_ACTION, (String) null);\n if (action != null) {\n componentToAction.put(textComp, action);\n }\n } else if (tag.equals(TAG_MENUITEM) || tag.equals(TAG_CBMENUITEM)) {\n String actionTemplate = null;\n JMenuItem mi;\n String label = node.getAttribute(ATTR_LABEL, \"\");\n String action = node.getAttribute(ATTR_ACTION);\n String value = node.getAttribute(ATTR_VALUE);\n String key = node.getAttribute(ATTR_KEY);\n if ((action == null) && (actionTemplate != null)\n && (value != null)) {\n action = GuiUtils.replace(actionTemplate, \"%value%\", value);\n }\n if ((key != null) && !key.startsWith(\"group:\")) {\n label = label + \" \" + key;\n }\n\n if (node.getTag().equals(TAG_CBMENUITEM)) {\n boolean initValue = node.getAttribute(ATTR_VALUE, true);\n JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(label,\n initValue);\n String group = node.getAttribute(ATTR_GROUP, (String) null);\n addToGroup(group, cbmi);\n mi = cbmi;\n if (action != null) {\n Hashtable actions = new Hashtable();\n actions.put(ATTR_ACTION, action);\n actions.put(ATTR_VALUE, new Boolean(initValue));\n componentToAction.put(cbmi, actions);\n cbmi.addItemListener(this);\n if ((group == null) || initValue) {\n itemStateChanged(new ItemEvent(cbmi, 0, cbmi,\n ItemEvent.ITEM_STATE_CHANGED));\n }\n }\n\n if (key != null) {\n if (key.startsWith(\"group:\")) {\n if (group != null) {\n key = key.substring(6);\n keyToComponent.put(key.toLowerCase(), group);\n }\n } else {\n keyToComponent.put(key.toLowerCase(), mi);\n }\n }\n } else {\n mi = new JMenuItem(label);\n if (action != null) {\n mi.setActionCommand(action);\n mi.addActionListener(this);\n if (key != null) {\n keyToComponent.put(key.toLowerCase(), mi);\n }\n }\n }\n if (id != null) {\n idToMenuItem.put(id, mi);\n }\n comp = mi;\n } else if (tag.equals(TAG_MENU)) {\n Vector children = node.getChildren();\n JMenu menu = new JMenu(node.getAttribute(ATTR_LABEL, \"\"));\n comp = menu;\n for (int i = 0; i < children.size(); i++) {\n XmlNode childElement = (XmlNode) children.get(i);\n if (childElement.getTag().equals(TAG_SEPARATOR)) {\n menu.addSeparator();\n\n continue;\n }\n Component childComponent = xmlToUi(childElement);\n if (childComponent == null) {\n continue;\n }\n menu.add(childComponent);\n }\n } else if (tag.equals(TAG_MENUBAR)) {\n Vector children = node.getChildren();\n JMenuBar menuBar = new JMenuBar();\n comp = menuBar;\n for (int i = 0; i < children.size(); i++) {\n XmlNode childElement = (XmlNode) children.get(i);\n Component childComponent = xmlToUi(childElement);\n if (childComponent == null) {\n continue;\n }\n menuBar.add(childComponent);\n }\n } else if (tag.equals(TAG_SPLITPANE)) {\n Vector xmlChildren = node.getChildren();\n if (xmlChildren.size() != 2) {\n throw new IllegalArgumentException(\n \"splitpane tag needs to have 2 children \" + node);\n }\n XmlNode leftNode = getReffedNode((XmlNode) xmlChildren.get(0));\n XmlNode rightNode = getReffedNode((XmlNode) xmlChildren.get(1));\n Component leftComponent = xmlToUi(leftNode);\n Component rightComponent = xmlToUi(rightNode);\n boolean continuous = node.getAttribute(ATTR_CONTINUOUS, true);\n int orientation = findValue(node.getAttribute(ATTR_ORIENTATION,\n (String) null), SPLITPANE_NAMES,\n SPLITPANE_VALUES);\n\n JSplitPane split = new JSplitPane(orientation, continuous,\n leftComponent, rightComponent);\n int divider = node.getAttribute(ATTR_DIVIDER, -1);\n if (divider != -1) {\n split.setDividerLocation(divider);\n }\n split.setOneTouchExpandable(\n node.getAttribute(ATTR_ONETOUCHEXPANDABLE, true));\n double resizeweight = node.getAttribute(ATTR_RESIZEWEIGHT, -1.0);\n if (resizeweight != -1.0) {\n split.setResizeWeight(resizeweight);\n }\n comp = split;\n } else if (tag.equals(TAG_LABEL)) {\n String label = node.getAttribute(ATTR_LABEL, \"\");\n comp = new JLabel(label, getAlign(node));\n } else if (tag.equals(TAG_IMAGE)) {\n comp = makeImageButton(node, null, null);\n } else if (tag.equals(TAG_SHAPEPANEL)) {\n comp = new ShapePanel(this, node);\n } else if (tag.equals(TAG_BUTTON)) {\n JButton b = new JButton(node.getAttribute(ATTR_LABEL, \"\"));\n b.setActionCommand(node.getAttribute(ATTR_ACTION, \"No action\"));\n b.addActionListener(this);\n comp = b;\n } else if (tag.equals(TAG_CHOICE)) {\n Choice b = new java.awt.Choice();\n String action = node.getAttribute(ATTR_ACTION,\n (String) null);\n int selected = node.getAttribute(ATTR_SELECTED, 0);\n Hashtable actions = new Hashtable();\n for (int i = 0; i < node.size(); i++) {\n XmlNode child = getReffedNode(node.get(i));\n if ( !child.getTag().equals(TAG_ITEM)) {\n throw new IllegalArgumentException(\"Bad choice item:\"\n + child);\n }\n b.add(child.getAttribute(ATTR_LABEL, \"\"));\n String value = child.getAttribute(ATTR_VALUE, (String) null);\n if (value != null) {\n actions.put(ATTR_VALUE + i, value);\n }\n String subAction = child.getAttribute(ATTR_ACTION,\n (String) null);\n if (subAction != null) {\n actions.put(ATTR_ACTION + i, subAction);\n }\n }\n comp = b;\n if (action != null) {\n actions.put(ATTR_ACTION, action);\n componentToAction.put(b, actions);\n b.select(selected);\n b.addItemListener(this);\n itemStateChanged(new ItemEvent(b, 0, b,\n ItemEvent.ITEM_STATE_CHANGED));\n }\n } else if (tag.equals(TAG_CHECKBOX)) {\n JCheckBox b = new JCheckBox(node.getAttribute(ATTR_LABEL, \"\"),\n node.getAttribute(ATTR_VALUE, false));\n String action = node.getAttribute(ATTR_ACTION, (String) null);\n comp = b;\n if (action != null) {\n componentToAction.put(comp, action);\n b.addItemListener(this);\n itemStateChanged(new ItemEvent(b, 0, b,\n ItemEvent.ITEM_STATE_CHANGED));\n }\n } else {\n comp = new JLabel(\"Unknown tag:\" + tag);\n System.err.println(\"Unknown tag:\" + node);\n }\n\n return comp;\n\n }",
"@Override\r\n\tprotected Component[] createToggledComponents() throws ThinklabException {\r\n\t\tHbox classel = new Hbox();\r\n\r\n\t\tclassel.setWidth(\"100%\");\r\n\t\t\r\n\t\tWindow wc = new Window();\r\n\t\twc.setWidth(\"100%\");\r\n\t\twc.setBorder(\"normal\");\r\n\t\t\r\n\t\tclassel.appendChild(new Label(\"restrict type to \"));\r\n\t\tclassel.appendChild(new ObjectClassSelector(conceptID, indentLevel));\r\n\t\t\r\n\t\t/* TODO we must track the recursion level and insert an \"indent\" component if > 0 */\r\n\t\t\r\n\t\tInstanceSelector subc = new InstanceSelector(indentLevel);\r\n\t\tsubc.setConcept(conceptID);\r\n\t\tsubc.setWidth(\"100%\");\r\n\t\tobjComponent = subc;\r\n\t\t\r\n\t\tVbox amo = new Vbox(); amo.setWidth(\"100%\");\r\n\t\tHbox uff = new Hbox(); uff.setWidth(\"100%\");\r\n\t\r\n\t\tamo.appendChild(classel);\r\n\t\tamo.appendChild(subc);\r\n\t\twc.appendChild(amo);\r\n\t\t\r\n\t\tif (indentLevel > 0) {\r\n\t\t\tSeparator sep = new Separator(\"vertical\");\r\n\t\t\tsep.setWidth((30*indentLevel) + \"px\");\r\n\t\t\tuff.appendChild(sep);\r\n\t\t}\r\n\t\tuff.appendChild(wc);\r\n\t\t\r\n\t\tComponent[] c = new Component[1];\r\n\t\tc[0] = uff;\r\n\t\t\r\n\t\treturn c;\r\n\t\t\r\n\t}",
"public JPanel getRepresentacionGrafica();",
"ISModifyComponent createISModifyComponent();",
"private void addComponents() {\n\t\t\n\t\t// prima riga di lettere\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tadd(letterLabel(i));\n\t\t\t\n\t\t/* la scacchiera ha l'oringine 0,0 in basso a sinistra\n\t\t * mentre la griglia si riempie di elementi dall'alto\n\t\t * percio' il for delle x (j) cresce mentre popoliamo le celle (bottoni)\n\t\t * mentre il for delle y (i) decresce man mano che passiamo di riga in riga */\n\t\tfor (int i = 7; i >= 0; i--)\n\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\tif (j == 0 || j == 9)\n\t\t\t\t\tadd(numberLabel(i + 1));\n\t\t\t\telse\n\t\t\t\t\tadd(buttons[j - 1][i]);\n\t\t\t}\n\t\t\n\t\t// ultima riga (uguale alla prima)\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tadd(letterLabel(i));\n\t}",
"private JComponent buildName() {\n name = new JTextField();\n name.setText(group.getName());\n return name;\n }",
"public JLabel getjLabel1() {\n return jLabel1;\n }",
"@SuppressWarnings(\"unchecked\")\n public <T extends Component> T getComponent() {\n try {\n return (T) component;\n } catch (ClassCastException ex) {\n getLogger().log(Level.SEVERE,\n \"Component code/design type mismatch\", ex);\n }\n return null;\n }",
"public void testGetComponent() {\n System.out.println(\"getComponent\"); // NOI18N\n \n document.getTransactionManager().writeAccess(new Runnable() {\n public void run() {\n DesignComponent comp = document.createComponent(FirstCD.TYPEID_CLASS);\n DesignComponent result = PropertyValue.createComponentReference(comp).getComponent();\n DesignComponent expResult = comp;\n \n assertEquals(expResult,result);\n }\n });\n \n }",
"ComponentAgent getFirstChild();",
"public Component getComponent(String path)\r\n {\r\n Class<? extends Component> componentClass = components.get(path);\r\n if (componentClass == null)\r\n {\r\n return null;\r\n }\r\n Constructor<?>[] constructors = componentClass.getConstructors();\r\n for (Constructor<?> constructor : constructors)\r\n {\r\n if ((constructor.getParameterTypes().length == 1) \r\n && (constructor.getParameterTypes()[0] == Component.class))\r\n {\r\n Component instance;\r\n try\r\n {\r\n instance = (Component) constructor.newInstance(new Object[] {null});\r\n } catch (InstantiationException | IllegalAccessException\r\n | IllegalArgumentException | InvocationTargetException e)\r\n {\r\n throw new RuntimeException(e);\r\n }\r\n postConstruct(instance);\r\n return instance;\r\n }\r\n }\r\n throw new IllegalStateException(\"Component of class \" + componentClass.getName() \r\n + \" has no constructor with a single Component parameter\");\r\n }",
"public Component() {\n\t\tlocation = new Point(0, 0);\n\t\tsize = new Dimension(100, 80);\n\t\tproperties = new LinkedHashMap<>();\n\t\tsubJobContainer= new LinkedHashMap<>();\n\t\tleftPortCount = 0;\n\t\trightPortCount = 0;\n\t\tbottomPortCount = 0;\n\t\tinputLinksHash = new Hashtable<String, ArrayList<Link>>();\n\n\t\tinputLinks = new ArrayList<Link>();\n\t\toutputLinksHash = new Hashtable<String, ArrayList<Link>>();\n\t\toutputLinks = new ArrayList<Link>();\n\t\tinputportTerminals = new ArrayList<String>();\n\t\toutputPortTerminals = new ArrayList<String>();\n\t\twatcherTerminals = new HashMap();\n\t\tnewInstance = true;\n\t\tvalidityStatus = ValidityStatus.WARN.name();\n\t\tcomponentName = DynamicClassProcessor.INSTANCE.getClazzName(this\n\t\t\t\t.getClass());\n\n\t\tcomponentLabel = new ComponentLabel(componentName);\n\t\tcomponentLabelMargin = 16;\n\n\t\tprefix = XMLConfigUtil.INSTANCE.getComponent(componentName)\n\t\t\t\t.getDefaultNamePrefix();\n\t\t\n\t\tdefaultPrefix=XMLConfigUtil.INSTANCE.getComponent(componentName)\n\t\t\t\t.getDefaultNamePrefix();\n\t\tinitPortSettings();\n\t\ttoolTipErrorMessages = new LinkedHashMap<>();\n\t\tstatus = ComponentExecutionStatus.BLANK;\n\t}"
]
| [
"0.69080216",
"0.65737903",
"0.65251714",
"0.6111951",
"0.60826576",
"0.60826576",
"0.59878665",
"0.59592104",
"0.5946021",
"0.5932717",
"0.5842894",
"0.5710091",
"0.57095945",
"0.56859493",
"0.56643325",
"0.56385845",
"0.56298316",
"0.55990875",
"0.5596201",
"0.5589752",
"0.5584353",
"0.55737567",
"0.55719453",
"0.55515224",
"0.5551498",
"0.55490047",
"0.552341",
"0.5503",
"0.5501062",
"0.5500155",
"0.54959106",
"0.5473526",
"0.5473336",
"0.54620045",
"0.54619336",
"0.5460999",
"0.5456354",
"0.54503804",
"0.5449255",
"0.5439732",
"0.5435178",
"0.5432989",
"0.5413598",
"0.54047596",
"0.54021555",
"0.5401138",
"0.53899366",
"0.53465337",
"0.5334919",
"0.5328385",
"0.53172106",
"0.53145164",
"0.53065693",
"0.5303897",
"0.52954483",
"0.5294455",
"0.5294173",
"0.5289869",
"0.5284512",
"0.5283959",
"0.5280442",
"0.5269614",
"0.5269614",
"0.52590203",
"0.5241988",
"0.52408314",
"0.52406687",
"0.52401966",
"0.5238681",
"0.5237307",
"0.52359605",
"0.523561",
"0.5233321",
"0.5224476",
"0.52197576",
"0.52179474",
"0.5214584",
"0.5213648",
"0.5203618",
"0.51763535",
"0.51606876",
"0.5157692",
"0.51529455",
"0.5143088",
"0.51328",
"0.51281065",
"0.512606",
"0.5118624",
"0.5110915",
"0.5108704",
"0.51084113",
"0.5103257",
"0.5091891",
"0.50917834",
"0.50875247",
"0.50774354",
"0.50767297",
"0.5076575",
"0.50714916",
"0.5070166"
]
| 0.60589004 | 6 |
Metodo que retorna el atributo input. | public boolean isInput() {
return input;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Attributes getAttributes();",
"Input getObjetivo();",
"Attribute getAttribute();",
"String getAttribute();",
"java.lang.String getAttribute();",
"Pair<String, String> getAdditionalAttribute();",
"String attributeToGetter(String name);",
"public String getattribut() \n\t{\n\t\treturn attribut;\n\t}",
"IAttributes getAttributes();",
"private String getAttrValue(Object name) {\n\t return (String)this.mAtts.get(name);//.toString();\n\t}",
"public String getStringAttribute();",
"INPUT createINPUT();",
"public Object attribute(String name) {\n return Classes.getFieldValue(this, name);\n }",
"String getAttributeStringValue(Object attr);",
"private int scanOneAttribute(char[] input,\n int offset,\n int end,\n int[] lineNr)\n throws XMLParseException {\n String key;\n String value;\n\n key = this.scanIdentifier(input, offset, end);\n\n if (key == null) {\n throw this.syntaxError(\"an attribute key\", lineNr[0]);\n }\n\n offset = this.skipWhitespace(input, offset + key.length(), end, lineNr);\n\n if (this.ignoreCase) {\n key = key.toUpperCase();\n }\n\n if (input[offset] != '=') {\n throw this.valueMissingForAttribute(key, lineNr[0]);\n }\n\n offset = this.skipWhitespace(input, offset + 1, end, lineNr);\n\n value = this.scanString(input, offset, end, lineNr);\n\n if (value == null) {\n throw this.syntaxError(\"an attribute value\", lineNr[0]);\n }\n\n if ((value.charAt(0) == '\"') || (value.charAt(0) == '\\'')) {\n value = value.substring(1, (value.length() - 1));\n offset += 2;\n }\n\n this.attributes.put(key, this.decodeString(value, lineNr[0]));\n return offset + value.length();\n }",
"@NonNull\n String getNecessaryAttribute();",
"public String getAttr() {\n return attr;\n }",
"Map<String, String> getAttributes();",
"public final Object getAttribute(String attribute) {\r\n\t\tfor (String key:annotations.keySet()) {\r\n\t\t\tAnnotationDefinition defn = annotations.get(key);\r\n\t\t\tif (defn.getParams() != null && defn.getParams().containsKey(attribute))\r\n\t\t\t\treturn defn.getParams().get(attribute);\t\t\t\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}",
"String getControllingAttributeName();",
"Map<String, Object> getAttributes();",
"Map<String, Object> getAttributes();",
"Map<String, Object> getAttributes();",
"Attribute createAttribute();",
"Attribute createAttribute();",
"Object getAttribute(int attribute);",
"protected Object findInRequest(final HttpServletRequest request, final String attributName) {\r\n\r\n Object attr = request.getParameter(attributName);\r\n if (attr == null) {\r\n attr = request.getAttribute(attributName);\r\n }\r\n return attr;\r\n }",
"private String getAttributeValue(String type, Seeding seed){\n \tif (type.equals(\"vegetable\"))\n \t\treturn seed.vegetable;\n \telse if (type.equals(\"unit\"))\n \t\treturn seed.unit;\n \telse \n \t\tthrow new RuntimeException(\"valueList.getAttributeValue-ERROR: type not allowed: \" + type);\n }",
"public org.omg.uml.foundation.core.Attribute getAttribute();",
"private void getTextFromInput() {\n firstName = firstNameField.getText();\n lastName = lastNameField.getText();\n age = ageField.getText();\n email = emailField.getText().toLowerCase();\n }",
"public String getAttributeName() {\n/* 85 */ return this.attributeName;\n/* */ }",
"String getAttributeName(Object attr);",
"Input createInput();",
"protected Object findInRequest(final ServletRequest request, final String attributName) {\r\n\r\n Object attr = request.getParameter(attributName);\r\n if (attr == null) {\r\n attr = request.getAttribute(attributName);\r\n }\r\n return attr;\r\n }",
"Atributo createAtributo();",
"protected String getAttribute(String chave) throws AtributosException {\r\n\t\tif (tag == null) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\tString attributeValue = tag.getAttributeValue(chave);\r\n\r\n\t\tif (attributeValue == null || attributeValue.trim().equals(\"\")) {\r\n\t\t\tattributeValue = getDefaultValue(chave);\r\n\t\t}\r\n\r\n\t\treturn attributeValue;\r\n\t}",
"public String getMetodoObtemSqlite(AtributoEntidade atributo) {\n\t\treturn getMetodoObtemSqlite(atributo.getTipo());\n\t}",
"default Attribute getAttribute(AttributeName attributeName) {return (Attribute) attributeName;}",
"public abstract ImportAttributes getAttributes();",
"String getField();",
"private String getCustomAttributes() {\n StringBuilder sb = new StringBuilder();\n\n customAttribute.forEach((key, value) -> {\n sb.append(key).append(\"='\").append(value).append(\"' \");\n });\n\n return sb.toString().trim();\n }",
"public abstract Map<String, Object> getAttributes();",
"Object getAttribute(String name);",
"Object getAttribute(String name);",
"Object getAttribute(String name);",
"public HashMap<String, String> GetRawAttributes();",
"private String getAttributeValue() {\n\t\tString attributes = \"\";\r\n\t\tfor(int i=0;i< JTable1.getRowCount();i++ ) {\r\n\t\t\tString attributename = ((String) JTable1.getValueAt(i, 0)).trim();\r\n\t\t\tString attributeValue = ((String) JTable1.getValueAt(i, 1)).trim();\r\n\t\t\t//attributeValue.trim();\r\n\t\t\tif(attributeValue != null && attributeValue.length() > 0)\r\n\t\t\tattributes = attributes.trim() + attributename+ \"=\" + attributeValue + \";\";\r\n\t\t\t\r\n\t\t}\r\n\t\tif(attributes.trim().length() > 0)\r\n\t\treturn attributes.substring(0, attributes.length()-1);\r\n\t\treturn attributes;\r\n\t}",
"String getExtra();",
"InputValueDefinition createInputValueDefinition();",
"public AttributeInfo getAttributeInfo() {\r\n\r\n String newAttrName = this.nameTextField.getText();\r\n\r\n if (newAttrName == null || newAttrName.length() == 0) {\r\n newAttrName = \"NEW_ATTRIBUTE\";\r\n }\r\n\r\n AttributeInfo attrInfo = new AttributeInfo((AttributeType) this.typeDropDown.getSelectedItem(), newAttrName);\r\n\r\n if (this.needDefaultValue) {\r\n attrInfo.setNullValue(this.getDefaultValue());\r\n }\r\n\r\n return attrInfo;\r\n }",
"public int getAtt(){ \r\n return att;\r\n }",
"public String inputSpecialized() {\n String specialized = editTextSpecial.getText().toString();\n return specialized;\n }",
"com.google.cloud.documentai.v1beta2.InputConfig getInputConfig();",
"public Object getAttribute(String name);",
"@Override\r\n protected void parseAttributes()\r\n {\n\r\n }",
"public abstract Map getAttributes();",
"public String getAttribute(String name);",
"public Object getProperty(String attName);",
"public Map<String, Object> getAttrs();",
"public Object entryToObject(TupleInput ti) {\n BaseTuple bt = new BaseTuple(r);\n\n for(int i = 0; i < r.getNumberOfAttributes(); i++) {\n if(r.getAttributeType(i) == Globals.INTEGER) {\n bt.setAttributeValueByPosition(i, new Integer(ti.readInt()));\n } else {\n assert r.getAttributeType(i) == Globals.STRING;\n bt.setAttributeValueByPosition(i, ti.readString());\n }\n }\n\n return bt;\n }",
"private void getCustomAttributes(AttributeSet attrs)\r\n {\r\n String labelText;\r\n TypedArray a = getContext().obtainStyledAttributes( attrs, R.styleable.Label );\r\n labelText = a.getString(R.styleable.Label_label_text);\r\n labelSize = a.getInt(R.styleable.Label_label_size, 10);\r\n a.recycle(); \r\n \r\n if (labelText != null) setLabel(labelText);\r\n else setLabel(\"\");\r\n \r\n }",
"public StructuredData getStructuredDataAttribute();",
"public String getAttribute(String name)\n\tthrows SdpParseException {\n\tif (name != null) {\n\t for (int i = 0; i < this.attributeFields.size(); i++) {\n\t\tAttributeField af = (AttributeField)\n\t\t this.attributeFields.elementAt(i);\n\t\tif (name.equals(af.getAttribute().getName())) \n\t\t return (String) af.getAttribute().getValue();\n\t }\n\t return null; \n\t} else throw new NullPointerException(\"null arg!\");\n }",
"public Integer getIntegerAttribute();",
"public String inputName() {\n String name = editTextName.getText().toString();\n return name;\n }",
"public String getValue() {\n return super.getAttributeValue();\n }",
"private String nextAttribValue()\n {\n if (empty())\n return null;\n\n String result = nextQuotedString();\n if (result != null)\n return result;\n return nextIdentifier();\n }",
"String attributeToSetter(String name);",
"@Override\r\n\tpublic String getAttribute() {\n\t\treturn null;\r\n\t}",
"String booleanAttributeToGetter(String arg0);",
"public abstract String[] getRequiredAttributeNames();",
"public String[] getRelevantAttributes();",
"private String loadAttributeName() {\n return parseMapField().getKey();\n }",
"public GenericAttribute getAttribute () {\n return attribute;\n }",
"@Override final protected Object[] getInputDefaults() { return this.InputDefaults; }",
"RakudoObject get_attribute(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name);",
"public String attribute() {\n return this.attribute;\n }",
"public String getReadWriteAttribute();",
"String getInput();",
"private Hashtable getRequestedAttributes() {\n\tif (fRequestedAttributes == null) {\n\t fRequestedAttributes = new Hashtable(7, (float)0.9);\n fRequestedAttributes.put(TextAttribute.TRANSFORM,\n\t\t\t\t IDENT_TX_ATTRIBUTE);\n fRequestedAttributes.put(TextAttribute.FAMILY, name);\n fRequestedAttributes.put(TextAttribute.SIZE, new Float(size));\n\t fRequestedAttributes.put(TextAttribute.WEIGHT,\n\t\t\t\t (style & BOLD) != 0 ? \n\t\t\t\t TextAttribute.WEIGHT_BOLD :\n\t\t\t\t TextAttribute.WEIGHT_REGULAR);\n\t fRequestedAttributes.put(TextAttribute.POSTURE,\n\t\t\t\t (style & ITALIC) != 0 ? \n\t\t\t\t TextAttribute.POSTURE_OBLIQUE :\n\t\t\t\t TextAttribute.POSTURE_REGULAR);\n fRequestedAttributes.put(TextAttribute.SUPERSCRIPT,\n new Integer(superscript));\n fRequestedAttributes.put(TextAttribute.WIDTH,\n new Float(width));\n\t}\n\treturn fRequestedAttributes;\n }",
"java.lang.String getField1702();",
"final private com.org.multigear.mginterface.engine.Configuration.Attr getAttr(final String name) {\r\n\t\tfor(final Attr attr : mAttributes) {\r\n\t\t\tif(attr.Name.equals(name))\r\n\t\t\t\treturn attr;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"default IEmfAttribute<?, V> getOriginalAttribute() {\n\n\t\treturn this;\n\t}",
"java.lang.String getField1848();",
"java.lang.String getField1382();",
"public AttribInfo(){\n m_deprecated = false;\n m_hidden = false;\n m_multipleSelection = false;\n m_attributeValues = null;\n m_attributeValueMap = null;\n m_description = null;\n m_labelName = null;\n m_defaultValue = null;\n m_propertyMapKeyName = null;\n m_mapComponentClassName = null;\n m_preferredType = null;\n }",
"public Map<String, String> getAttributes();",
"public String getInputName(){\n \treturn model.getName();\n }",
"private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}",
"protected String getAnnotationAttributeValue(\r\n\t\t\tIClassElementCodeGenConfig argCodeGenConfig,\r\n\t\t\tString argAnnotationName, String argAttributeName) {\r\n\t\tString result = EMPTY;\r\n\t\tif (!argCodeGenConfig.getAnnotations().isEmpty()) {\r\n\t\t\tfor (AnnotationConfig annotation : argCodeGenConfig\r\n\t\t\t\t\t.getAnnotations()) {\r\n\t\t\t\tif (argAnnotationName.equals(annotation.getName())) {\r\n\t\t\t\t\tresult = annotation.getAttribute(argAttributeName);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public Map<String, Object> getAttributes();",
"public Map<String, Object> getAttributes();",
"public String getValue(String name) {\n/* 192 */ Attr attr = (Attr)this.m_attrs.getNamedItem(name);\n/* 193 */ return (null != attr) ? attr.getValue() : null;\n/* */ }",
"public abstract String toFORMParam();",
"public XmlNsForm getAttributeFormDefault();",
"java.lang.String getField1182();",
"public String getInput() {\n return input;\n }",
"java.lang.String getField1048();",
"java.lang.String getField1120();",
"public String getInputPriceBy() {\n return (String)getAttributeInternal(INPUTPRICEBY);\n }",
"@Override\n protected void readAttributes(XMLStreamReader in)\n throws XMLStreamException {\n super.readAttributes(in);\n \n setName(in.getAttributeValue(null, \"name\"));\n \n owner = getFreeColGameObject(in, \"owner\", Player.class);\n \n tile = getFreeColGameObject(in, \"tile\", Tile.class);\n \n // @compat 0.9.x\n String typeStr = in.getAttributeValue(null, \"settlementType\");\n SettlementType settlementType;\n if (typeStr == null) {\n String capital = in.getAttributeValue(null, \"isCapital\");\n settlementType = owner.getNationType()\n .getSettlementType(\"true\".equals(capital));\n // end compatibility code\n } else {\n settlementType = owner.getNationType().getSettlementType(typeStr);\n }\n setType(settlementType);\n }"
]
| [
"0.63299173",
"0.6279621",
"0.6184549",
"0.61257255",
"0.6083126",
"0.59060913",
"0.5852017",
"0.58509666",
"0.5809546",
"0.5798827",
"0.5741381",
"0.56340796",
"0.5598461",
"0.55897176",
"0.5537575",
"0.55210865",
"0.5519919",
"0.549343",
"0.5491667",
"0.5491375",
"0.5489003",
"0.5489003",
"0.5489003",
"0.54856277",
"0.54856277",
"0.54748327",
"0.54745066",
"0.5474071",
"0.54726136",
"0.54698426",
"0.5457269",
"0.5452352",
"0.545205",
"0.5450261",
"0.5442981",
"0.5440635",
"0.54200524",
"0.5409765",
"0.53987217",
"0.5398694",
"0.5397754",
"0.5395292",
"0.5390874",
"0.5390874",
"0.5390874",
"0.539034",
"0.5365008",
"0.5364665",
"0.53585356",
"0.5351915",
"0.5351717",
"0.5339338",
"0.53221226",
"0.53147256",
"0.5313123",
"0.5289563",
"0.5279836",
"0.52680343",
"0.52602446",
"0.52371633",
"0.5234483",
"0.5233005",
"0.52280545",
"0.5224923",
"0.51982206",
"0.5197596",
"0.5196165",
"0.5195477",
"0.51949835",
"0.51938325",
"0.5188185",
"0.51849204",
"0.5184236",
"0.51825386",
"0.5176617",
"0.5175886",
"0.5175338",
"0.51722383",
"0.5169262",
"0.5163934",
"0.51620704",
"0.51484334",
"0.5147279",
"0.51448053",
"0.5142397",
"0.51383436",
"0.51349735",
"0.51339006",
"0.5133339",
"0.51321846",
"0.5122954",
"0.5122954",
"0.5120781",
"0.5117166",
"0.51151454",
"0.5111494",
"0.5107027",
"0.5105408",
"0.51022214",
"0.50969666",
"0.50944424"
]
| 0.0 | -1 |
Metodo que sobreescribe el valor de input. | public void setInput(boolean input) {
this.input = input;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void userInput() {\r\n System.out.println(\"You want to convert from:\");\r\n this.fromUnit = in.nextLine();\r\n System.out.print(\"to: \");\r\n this.toUnit = in.nextLine();\r\n System.out.print(\"The value is \");\r\n this.value = in.nextDouble();\r\n }",
"protected void saveInput() {\r\n value = valueText.getText();\r\n }",
"public void setInput(String input) { this.input = input; }",
"public void setInput(String input);",
"String getInput();",
"public Value(String inputValue) {\n this.inputValue = inputValue;\n }",
"public PromptValue getValue()\n {\n return value;\n }",
"public void setInput(String input){\n this.input = input;\n }",
"public String getInput() {\n return input;\n }",
"public String getInput()\t\n\t{\t//start of getInput method\n\t\treturn inputMsg;\n\t}",
"private String getAndClrInput(){\n\t\tString theReturn = userInput.getText();\n\t\tuserInput.setText(\"\");\n\t\treturn theReturn;\n\t}",
"public void setInput(Input input) {\n this.input = input;\n }",
"public HTMLInputElement getElementValor() { return this.$element_Valor; }",
"@Override\n public T getData() {\n Scanner scanner = new Scanner(System.in);\n return (T) scanner.next();\n }",
"@Override\n public void input() {\n super.input();\n Scanner sc = new Scanner(System.in);\n System.out.printf(\"Nhập số trang sách giáo khoa: \");\n amountPage = Integer.valueOf(sc.nextLine());\n System.out.printf(\"Nhập tình trạng sách giáo khoa: \");\n status = sc.nextLine();\n System.out.printf(\"Nhập số lượng mượn: \");\n amountBorrow= Integer.valueOf(sc.nextLine());\n }",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"public String input() throws Exception {\r\n\t\treturn INPUT;\r\n\t}",
"public static void main(String[] args) {\n\t\t TextInput input = new NumericInput();\n\t\t input.add('1');\n\t\t input.add('a');\n\t\t input.add('0');\n\t\t System.out.println(input.getValue());\n\n}",
"@Override\n\tpublic void input() {\n\t\t\n\t}",
"@Override\n public int getValue() {\n return Integer.parseInt(gValue.getText());\n }",
"public abstract Object getInput ();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"public abstract void input();",
"@SuppressWarnings(\"unchecked\")\n\tpublic <E> E getInputValue(FlowUnit u, FlowExec exec, String arg, Class<E> cl, boolean canBeNull) throws Exception\n\t\t{\n\t\tObject o=getInputValue(u, exec, arg);\n\t\tif(canBeNull && o==null)\n\t\t\treturn null;\n\t\telse\n\t\t\t{\n\t\t\tif(cl.isInstance(o)) //False if o is null\n\t\t\t\treturn (E)o;\n\t\t\telse\n\t\t\t\tthrow new BadTypeFlowException(\"Unsupported type, input value \"+arg);\n\t\t\t}\n\t\t\t\n\t\t}",
"public void takeUserInput() {\n\t\t\r\n\t}",
"String getVariableInput() {\n return (variableInput.getText());\n }",
"public String getInput() {\r\n return getText();\r\n }",
"@Override\n\tpublic void setInput(Input arg0) {\n\t\t\n\t}",
"protected void handleInput(String input) {}",
"@Override\n\tpublic void setInput(Input arg0) {\n\n\t}",
"@Override\n\tpublic String input() throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String input() throws Exception {\n\t\treturn null;\n\t}",
"@Override\n public String getValue() {\n return value;\n }",
"public void setInput(String input) {\n\t\t\tthis.input = input;\n\t\t}",
"String getTextValue();",
"@Override\r\n\tpublic String getValue() {\n\t\treturn value;\r\n\t}",
"public String readInput() {\n\t\treturn null;\n\t}",
"public void setInput(String M)\t\n\t{\t//start of setInput method\n\t\tinputMsg = M;\n\t}",
"Input getObjetivo();",
"public String getOriginalInput() {\n return this.input;\n }",
"@Override\n\tpublic String getValue() {\n\t\treturn value;\n\t}",
"@Override\n public String getValue() {\n return this.value.toString();\n }",
"protected abstract void getInput();",
"public double getValue() {// modified by JD to issue error dialog\n while (display.getText().equals(\"\")) {\n String UserInput = JOptionPane.showInputDialog\n (\"Please enter the required input value:\");\n display.setText(UserInput);\n }\n return Double.parseDouble(display.getText());\n }",
"String getUserInput();",
"@Override\n\t\t\tpublic String getValue() {\n\t\t\t\treturn value;\n\t\t\t}",
"String getVal();",
"public String getErrorInput() {\n String temp = errorInput;\r\n errorInput = \"false\";\r\n return temp;\r\n }",
"@Override\r\n\tpublic void acceptInput(String input) {\n\t\t\r\n\t}",
"protected SelectionText input() {\n return inputter;\n }",
"public String inputSpecialized() {\n String specialized = editTextSpecial.getText().toString();\n return specialized;\n }",
"public String getInput1() {\n return input1;\n }",
"@Override\n\tpublic String getValue() {\n\t\treturn \"?\";\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public InputSlotValue(String name) {\n this.name = name;\n }",
"String getValueText();",
"public int input1(){\n int Input1 = Integer.parseInt(numerator1.getText());\n return Input1;\n }",
"public Double getInput() {\t\t\t\n\t\t\ttry {\n\t\t\t\t// Restoring label color\n\t\t\t\tlabel.setForeground(Color.BLACK);\n\t\t\t\t// \tCasting to \"Number\" before accessing the doubleValue as Java will throw an exception for instance as 12.0000000000 \"cannot\" be casted to Double (since Long)\n\t\t\t\t // eg java.lang.Long cannot be cast to java.lang.Double\n\t\t\t\treturn new Double(((Number) textField.getValue()).doubleValue());\n\t\t\t} catch (NullPointerException e) {\n\t\t\t\t// marking the label in red\n\t\t\t\tlabel.setForeground(Color.RED);\n\t\t\t\t// return no input\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}",
"@Override\n public String getValue() {\n if (textField != null) {\n return textField.getValue();\n } else {\n return null;\n }// end of if/else cycle\n }",
"public static String getStringInput() {\n Scanner in = new Scanner(System.in);\n return in.next();\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Specify the input format.\")\n @JsonProperty(JSON_PROPERTY_INPUT)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public InputEnum getInput() {\n return input;\n }",
"@Test\n\tpublic void testInputElementWithDefaultValue() {\n\n\t\tvar prompt = openPrompt();\n\t\tassertEquals(PROMPT_INPUT_DEFAULT_VALUE, prompt.getInputElement().getInputValue());\n\t}",
"public String getValue () { return value; }",
"@Override\n\tpublic Value[] getInputValues() {\n\t\treturn null;\n\t}",
"public void processInput() {\n\n\t}",
"@Test\n public void theUserIsPromptedForAnInput() {\n //arrange\n //act\n String returnedValue = Localization.fromPrompter(Prompter.readOnly(expectedValue));\n //assess\n assertEquals(expectedValue, returnedValue);\n }",
"public String getCurrrentInput(){\n\t\treturn this.currentInput;\n\t}",
"public String getInputString() {\n return inputString;\n }",
"private void getInput() {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number\");\r\n\t\tn=scan.nextInt();\r\n\r\n\t}",
"public abstract void inputChange( int value );",
"public String getInputor() {\r\n\t\treturn inputor;\r\n\t}",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"private void getTextFromInput() {\n firstName = firstNameField.getText();\n lastName = lastNameField.getText();\n age = ageField.getText();\n email = emailField.getText().toLowerCase();\n }",
"private Integer getAmount()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"\");\n System.out.print(\"Indtast mængde: \");\n return scanner.nextInt();\n }",
"public String getValue()\r\n\t{\r\n\t\tString value = textField.getText();\r\n\t\treturn value==null || value.length()==0 ? null : value;\r\n\t}",
"public String getValue() { return value; }",
"ListeningFuture<Boolean> setInput(String input);",
"public String getInputUser() {\n return inputUser;\n }",
"String setValue();"
]
| [
"0.682887",
"0.67793256",
"0.66174394",
"0.6408096",
"0.6331107",
"0.6311111",
"0.6265582",
"0.6264121",
"0.621745",
"0.61023265",
"0.609561",
"0.6062222",
"0.6012976",
"0.5987235",
"0.59867287",
"0.5962207",
"0.5962207",
"0.5962207",
"0.5962207",
"0.5962207",
"0.5962207",
"0.5962207",
"0.5962207",
"0.5962207",
"0.5962207",
"0.5930266",
"0.5926783",
"0.59253824",
"0.5921098",
"0.59210306",
"0.59108937",
"0.59108937",
"0.59108937",
"0.59108937",
"0.59108937",
"0.59108937",
"0.5896275",
"0.58881384",
"0.5878171",
"0.5877495",
"0.58768666",
"0.5876728",
"0.58740425",
"0.5845535",
"0.5832756",
"0.5832756",
"0.5825331",
"0.5812685",
"0.5800974",
"0.579313",
"0.57926935",
"0.57748866",
"0.5769009",
"0.57646257",
"0.57537705",
"0.57509756",
"0.5748184",
"0.5734074",
"0.57312983",
"0.573012",
"0.5720295",
"0.5720264",
"0.5718258",
"0.571149",
"0.5671018",
"0.56665653",
"0.565802",
"0.5653145",
"0.56478304",
"0.5639595",
"0.56230724",
"0.56170005",
"0.5612602",
"0.56082845",
"0.5608254",
"0.5604077",
"0.56032664",
"0.5596288",
"0.55938864",
"0.55921733",
"0.55903137",
"0.5588921",
"0.55859584",
"0.5585189",
"0.5584366",
"0.5581246",
"0.5581246",
"0.5581246",
"0.5581246",
"0.5581246",
"0.5581246",
"0.5581246",
"0.5581246",
"0.5581246",
"0.55771846",
"0.5566117",
"0.55633706",
"0.556177",
"0.55586934",
"0.55547595",
"0.5551072"
]
| 0.0 | -1 |
String que representa el tipo de componente que es. | public String getName() {
return Name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String componentTypeName();",
"String getTypeAsString();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"public String toString()\n/* */ {\n/* 210 */ return \"[array type, component type: \" + this._componentType + \"]\";\n/* */ }",
"public String getType() {\n\t\treturn String.valueOf(this.pieceType);\n\t}",
"@Override\n public abstract String getComponentType();",
"public String toString() {\n return type;\n }",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"public String toString() {\n return type.toString();\n }",
"public String getTypeString() {\r\n return Prediction.getTypeString(type);\r\n }",
"private String getType( )\n\t{\n\t\treturn this.getModuleName( ) + \"$\" + this.getSimpleName( ) + \"$\" + this.getSystem( );\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn type;\n\t}",
"@Override\n\t\tpublic String toString()\n\t\t{\n\t\t\treturn type;\n\t\t}",
"public String getType() {\n\t\tCharacter tempType = (char)type;\n\t\treturn tempType.toString();\n\t}",
"public java.lang.String getTipo() {\n java.lang.Object ref = tipo_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n tipo_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String ofType() {\n\t\t return name;\n\t}",
"@Override\n public String toString ()\n {\n return \"type = \" + type;\n }",
"public static String stringType(Obj type) {\n\t\tString str = ObjStr.get(type);\n\t\t\treturn str != null ? str : \"\";\n\t}",
"public String getName() {\n return type.toString();\n }",
"public String type();",
"public String type(){\n\t\treturn type;\n\t}",
"@Override\r\n public String toString() {\r\n return tipo;\r\n }",
"java.lang.String getSubType();",
"@java.lang.Override\n public java.lang.String getTipo() {\n java.lang.Object ref = tipo_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n tipo_ = s;\n return s;\n }\n }",
"public String getType() {\n\t\t\n\t\tif(this instanceof Friend_Connection) {\n\t\t\treturn \"[FRIEND]\";\n\t\t\t\n\t\t}else if(this instanceof Couple_Connection){\n\t\t\treturn \"[COUPLE]\";\n\t\t\n\t\t}else if(this instanceof Parent_Connection) {\n\t\t\treturn \"[RELATIVE]\";\n\t\t\n\t\t}else if(this instanceof Colleagues_Connection) {\n\t\t\treturn \"[COLLEAGUE]\";\n\t\t\n\t\t}else if(this instanceof Classmates_Connection) {\n\t\t\treturn \"[CLASSMATE]\";\n\t\t}else {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t}",
"String typeName();",
"public String getPartString() { return \"Type\"; }",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"protected abstract String getType();",
"public final String type() {\n return type;\n }",
"@Override abstract public String type();",
"public String getType(){\r\n return type;\r\n }",
"public java.lang.String getType() {\n return type;\n }"
]
| [
"0.76602656",
"0.7117175",
"0.6837745",
"0.6837745",
"0.6837745",
"0.6837745",
"0.6837745",
"0.6837745",
"0.6837745",
"0.6837745",
"0.6837745",
"0.6837745",
"0.6837745",
"0.6837745",
"0.6837745",
"0.68280643",
"0.6718574",
"0.66758865",
"0.66265553",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6625164",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6604577",
"0.6540787",
"0.65311885",
"0.65052545",
"0.64913386",
"0.64889574",
"0.6454968",
"0.6403936",
"0.63857794",
"0.63765216",
"0.6363202",
"0.63540703",
"0.6329713",
"0.6321217",
"0.6312245",
"0.63006294",
"0.6295525",
"0.6288915",
"0.62732714",
"0.6266225",
"0.62515295",
"0.62515295",
"0.62515295",
"0.62515295",
"0.62515295",
"0.62515295",
"0.62515295",
"0.62515295",
"0.62515295",
"0.62515295",
"0.62515295",
"0.62515295",
"0.62515295",
"0.6247101",
"0.62396395",
"0.6225624",
"0.62190586",
"0.6203046"
]
| 0.0 | -1 |
Retorna el atributo ID. | public int getID() {
return ID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getAttrId() {\n return attrId;\n }",
"@XmlAttribute\n\tpublic Long getId() {\n\t\treturn id;\n\t}",
"public String getIdAttribute() {\n return idAttribute;\n }",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"public String getId()\r\n {\r\n return getAttribute(\"id\");\r\n }",
"@Override\n\tpublic Attribute getIdAttribute() {\n\t\treturn null;\n\t}",
"java.lang.String getID();",
"public String getATTR_ID() {\n return ATTR_ID;\n }",
"java.lang.String getAoisId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"public Integer getId() {\n return aao.getId();\n }",
"public final String getIdAttribute() {\n return getAttributeValue(\"id\");\n }",
"Short getId();",
"public final int getId() {\n\t\treturn this.accessor.getId();\n\t}",
"@JsonValue\n\tpublic final String fieldId() {\n\t \treturn this.name().replace(\"_\", \".\");\n\t}",
"public Integer getIdAttraction() {\r\n return idAttraction;\r\n }",
"@AutoEscape\n\tpublic String getFieldId();",
"Integer getId();",
"Integer getId();",
"Integer getId();",
"public int getId(){\n if (ID != null) {\n int i = Integer.parseInt(ID);\n return i;\n }\n return 0;\n }",
"public String getId() {\n return (String)getAttributeInternal(ID);\n }",
"public String getId() {\n return (String)getAttributeInternal(ID);\n }",
"String getID();",
"String getID();",
"String getID();",
"String getID();",
"String getId() {\r\n\t\treturn option.getId() + \".\" + field.getName();\r\n\t}",
"Integer getID();",
"Integer getID();",
"@Override\n\tpublic int getID()\n\t{\n\t\treturn Main.creaPersonaggio;\n\t}",
"public String getId();",
"public String getId();",
"public String getId();",
"public String getId();",
"public String getId();",
"public String getId();",
"public String getId();",
"public String getId();",
"public String getId();",
"public String getId();"
]
| [
"0.7080711",
"0.7010405",
"0.700817",
"0.69815546",
"0.69815546",
"0.69815546",
"0.69815546",
"0.69815546",
"0.69815546",
"0.69815546",
"0.69815546",
"0.69815546",
"0.69815546",
"0.69815546",
"0.69815546",
"0.69815546",
"0.69815546",
"0.69815546",
"0.69815546",
"0.69815546",
"0.69815546",
"0.69815546",
"0.68528",
"0.6803262",
"0.67572737",
"0.6707028",
"0.6664706",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.6656247",
"0.66388977",
"0.662427",
"0.6620283",
"0.6615782",
"0.6589006",
"0.6560833",
"0.6525494",
"0.65242624",
"0.65242624",
"0.65242624",
"0.65103745",
"0.64759666",
"0.64759666",
"0.6470056",
"0.6470056",
"0.6470056",
"0.6470056",
"0.6469522",
"0.6448428",
"0.6448428",
"0.64351285",
"0.6421846",
"0.6421846",
"0.6421846",
"0.6421846",
"0.6421846",
"0.6421846",
"0.6421846",
"0.6421846",
"0.6421846",
"0.6421846"
]
| 0.0 | -1 |
Metodo para obtener el valor del output | public int getOutput() {
return Output;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getOutput();",
"String getOutput();",
"public TestOut getOutput() {\n\treturn(output);\n }",
"public String getOutput() {\n myLock.lock();\n try {\n return myOutput.toString();\n }\n finally {\n myLock.unlock();\n }\n }",
"public String getOutput() {\n\t\treturn results.getOutput() ;\n\t}",
"public String getOutputValue() {\n// System.out.println(\"geting output value from connection\");\n// System.out.println(\"out:\" + ncOutput.getName() + \" in:\" + ncInput.getName() );\n return _output.getOutputValue();\n }",
"public String getOutput() {\n return output.toString();\n }",
"public String getOutput() {\n return output;\n }",
"public String getOutputString()\n\t{\n\t\treturn outputString;\n\t}",
"public Output getOutput() {\n\t\treturn output;\n\t}",
"public String getOutput() {\r\n return innerStream.getString();\r\n }",
"public String getText(){\n return this.sOut.toString();\n }",
"public String getLocalOutput(){\r\n\t\treturn this.localOutput;\r\n\t}",
"public abstract Object getOutput ();",
"public void calcOutput()\n\t{\n\t}",
"public java.lang.String getOutput() {\n java.lang.Object ref = output_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n output_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public Integer getActualoutput() {\n return actualoutput;\n }",
"public java.lang.String getOutput() {\n java.lang.Object ref = output_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n output_ = s;\n return s;\n }\n }",
"public String getoutputString() {\r\n\t\treturn outputString;\r\n\t}",
"public String getOutputFlag();",
"public int getOfYourChoiceOutput() {\n return ofYourChoiceOutput;\n }",
"public String getResult() {\n\t\treturn bashCommand.getStdOutString();\n\t}",
"public String getOutValue(){\n return null;\n }",
"public static String getOpResult (){\n \treturn opResult;\n }",
"public InventorySlot getOutput() {\n \t\treturn this.output;\n \t}",
"String diagnosticsOutput();",
"public int cout() {\n\t\treturn sum;\n\t}",
"@Override\r\n\tpublic String getResult() {\n\t\tString res;\r\n\t\ttry {\r\n\t\t\tresult = c.calculate(o.getFirst(), o.getSecond(), o.getOperator());\r\n\t\t\t// System.out.println(\"00\");\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\r\n\t\t\tthrow new RuntimeException();\r\n\t\t}\r\n\r\n\t\tres = String.valueOf(result);\r\n\r\n\t\treturn res;\r\n\t}",
"@Override\n public double getOutput() {\n return this.inputValue;\n }",
"public double printOutput() {\r\n return calculateNetPay();\r\n }",
"public void executeOUT(){\n\t\tint asciiVal = mRegisters[0].getValue();\n\t\tchar toPrint = (char)asciiVal;\n\t\tSystem.out.print(toPrint);\n\t}",
"String getOutputName();",
"public int getCcdOutput() {\n return ccdOutput;\n }",
"public abstract int calculateOutput();",
"public String getResult()\r\n\t{\r\n\t\treturn result;\r\n\t}",
"String getFileOutput();",
"public String getOutput(String name) {\n if (name == null) {\n throw new NullPointerException();\n }\n\n synchronized (TestResult.this) {\n synchronized (this) {\n OutputBuffer b = findOutputBuffer(name);\n return b == null ? null : b.getOutput();\n }\n }\n }",
"public String getOutput() {\n return String.format(\"DCode: %-7.0f \\\"%-9s\\\" \\t - %5.3fmm x %5.3fmm - \\t Area: %6.3fmm² \\t Area Ratio: %5.2f \\t Transfer Effeciency: %2.1f \\t Number of apertures: %-5.0f\"\n , (double) dCode\n , shape\n , x\n , y\n , getArea()\n , getAreaRatio()\n , getTransferEffeciency()\n , (double) numbOfApertures);\n }",
"public String toString() {\r\n\t\treturn result;\r\n\t}",
"public float[] getOutput() {\n\t\t// Put output return code here (and remove \"return null;\")\n \treturn null;\n }",
"public void returnResult() {\n\t\tSystem.out.printf(\"Result of your Numbers are: %d\", result());\n\t}",
"public Output<T> output() {\n return output;\n }",
"public Object getCallOutput() {\n\t\treturn null;\n\t}",
"public int value(){ // no input , some output\n\t\t\tSystem.out.println(\"value method\");\n\n\t\t\tint a = 10;\n\t\t\tint b = 20;\n\t\t\tint c = a+b;\n\t\t\treturn c ;\n\t\t}",
"public String get(){\n\t\tString s = value%13+1+\"\"+suits[value/13]+\" \";\r\n\t\treturn s;\r\n\t}",
"@Override\n public Object getData() {\n return new String(outputData);\n }",
"public String toString() {\n\t\treturn toString(Constants.get_output_precision());\n\t}",
"public String getResult() {\r\n\t\treturn getText(0, commandIndex - commandMode.length());\r\n\t}",
"public String getResultValueText() {\n if (mResultValue == 0) {\n return \"Passed\";\n }\n if (mResultValue == 1) {\n return \"Warning\";\n }\n if (mResultValue == 2) {\n return \"Failed\";\n }\n if (mResultValue == 3) {\n return \"Not executed\";\n }\n\n return \"Unknown\";\n }",
"public String toString(){\n\t\treturn getValue();\n\t}",
"public abstract float cout();",
"public com.google.protobuf.ByteString\n getOutputBytes() {\n java.lang.Object ref = output_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n output_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic String getResult() {\n\t\treturn this.result;\r\n\r\n\t}",
"private String result(int i) {\r\n\t\tswitch(sim40.memory[i]){\r\n\r\n\t\tcase 1: /* print */\r\n\t\t\treturn (\"\"+sim40.memory[Simulator.ACCUMULATOR_ADDRESS]);\r\n\r\n\t\tcase 2: /* printch */\r\n\t\t\treturn (\"\"+(char)sim40.memory[Simulator.ACCUMULATOR_ADDRESS]);\r\n\r\n\t\tcase 3: /* printb */\r\n\t\t\treturn (Integer.toBinaryString(sim40.memory[Simulator.ACCUMULATOR_ADDRESS]));\r\n\t\t}\r\n\r\n\t\treturn \"\";\r\n\t}",
"public StreamResult getOutput() {\n return output;\n }",
"public String toString()\n {\n return getValue(12);\n }",
"OutputPin getResult();",
"OutputPin getResult();",
"private void outputMe() {\n\t\tif (changeCount > 2) changeCount = 4 - (changeCount & 1);\n\t\tif (outputValue) {\n\t\t\tSystem.out.append( trueArray[ changeCount ] );\n\t\t} else {\n\t\t\tSystem.out.append( falseArray[ changeCount ] );\n\t\t}\n\t\tchangeCount = 0;\n\t}",
"Variable getReturn();",
"@Override\r\n\tpublic String showResult() {\n\t\treturn rps.toString();\r\n\t}",
"public String lastOutput() throws IOException {\n stream.flush();\n os.flush();\n return os.asString();\n }",
"public Element getOutput(){\n\t\treturn output;\n\t}",
"public String getValue() {\n\t\t\treturn this.val; // to be replaced by student code\n\t\t}",
"public String toString() {\n return value;\r\n }",
"public java.lang.String getYPrintResult() {\r\n return localYPrintResult;\r\n }",
"public String getResult()\n {\n return result;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"String displayValue();",
"public\t\tString\t\tgetValue()\n\t\t{\n\t\treturn(\"\" + getNormalizedValue());\n\t\t}",
"public String getOutput() throws TavernaException, ProcessException{\n if (outputFile == null){\n return saveOutput();\n }\n try {\n return runner.getOutput();\n } catch (InterruptedException ex) {\n throw new TavernaException (\"Workflow was interrupted.\", ex);\n }\n }",
"@Override\r\n\tpublic String toString() {\n\t\treturn result;\r\n\t}",
"public String getOutputInfo(int index) {\n\t\tswitch (index) {\n\t\t\tcase 0:\n\t\t\t\treturn \"The table containing the population\";\n\t\t\tdefault:\n\t\t\t\treturn \"No such input\";\n\t\t}\n\t}",
"public double getOutput()\n {\n //\n // Read from input device without holding a lock on this object, since this could\n // be a long-running call.\n //\n final double currentInputValue = pidInput.get();\n\n synchronized (this)\n {\n final String funcName = \"getOutput\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n double prevError = currError;\n double currTime = TrcUtil.getCurrentTime();\n double deltaTime = currTime - prevTime;\n prevTime = currTime;\n currInput = currentInputValue;\n currError = setPoint - currInput;\n if (inverted)\n {\n currError = -currError;\n }\n\n if (pidCoefficients.kI != 0.0)\n {\n //\n // Make sure the total error doesn't get wound up too much exceeding maxOutput.\n //\n double potentialGain = (totalError + currError * deltaTime) * pidCoefficients.kI;\n if (potentialGain >= maxOutput)\n {\n totalError = maxOutput / pidCoefficients.kI;\n }\n else if (potentialGain > minOutput)\n {\n totalError += currError * deltaTime;\n }\n else\n {\n totalError = minOutput / pidCoefficients.kI;\n }\n }\n\n pTerm = pidCoefficients.kP * currError;\n iTerm = pidCoefficients.kI * totalError;\n dTerm = deltaTime > 0.0 ? pidCoefficients.kD * (currError - prevError) / deltaTime : 0.0;\n fTerm = pidCoefficients.kF * setPoint;\n double lastOutput = output;\n output = pTerm + iTerm + dTerm + fTerm;\n\n output = TrcUtil.clipRange(output, minOutput, maxOutput);\n\n if (rampRate != null)\n {\n if (prevOutputTime != 0.0)\n {\n double dt = currTime - prevOutputTime;\n double maxChange = rampRate * dt;\n double change = output - lastOutput;\n change = TrcUtil.clipRange(change, -maxChange, maxChange);\n output = lastOutput + change;\n }\n prevOutputTime = currTime;\n }\n\n if (debugTracer != null)\n {\n printPidInfo(debugTracer);\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", output);\n }\n\n return output;\n }\n }",
"@Override\n\tpublic String getResult() {\n\t\treturn result;\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput() {\n if (outputBuilder_ == null) {\n return output_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n } else {\n return outputBuilder_.getMessage();\n }\n }",
"public String printInfo()\r\n {\r\n String info;\r\n \r\n info = \"Inputed number = \" + mark;\r\n \r\n return info;\r\n }",
"public abstract boolean getOutput();",
"public com.google.protobuf.ByteString\n getOutputBytes() {\n java.lang.Object ref = output_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n output_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String value() {\r\n if (counterPart!=null) {\r\n return counterPart.toString();\r\n }\r\n else {\r\n return \"nil\";\r\n }\r\n }",
"public void output() {\n System.out.printf(\"Dien tich: %.2f \\n\", getArea());\n System.out.printf(\"Chu vi: %.2f \\n\", getPeripheral());\n }",
"public String getResult() {\n return result;\n }",
"public String getResult() {\n return result;\n }",
"public String getResult() {\n return result;\n }",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public Float getOutUtilization() {\r\n return outUtilization;\r\n }",
"public java.lang.String get_return(){\n return local_return;\n }",
"public java.lang.String get_return(){\n return local_return;\n }",
"public java.lang.String get_return(){\n return local_return;\n }",
"public java.lang.String get_return(){\n return local_return;\n }",
"public Gauge getLineOutputGauge() {\n return this.lineOutputGauge;\n }",
"public String toString() {\r\n return this.variable;\r\n }",
"private String readResult() throws IOException {\n return reader.readLine();\n }",
"public String getOutputNominalValues(int pos){\r\n\t\treturn nominalValues[1][pos];\r\n\t}",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();"
]
| [
"0.7927441",
"0.7788283",
"0.7591977",
"0.7510022",
"0.7472421",
"0.73761654",
"0.73072505",
"0.7235558",
"0.7064722",
"0.70342696",
"0.69497925",
"0.6944343",
"0.68605614",
"0.68547326",
"0.68528664",
"0.68205756",
"0.68019885",
"0.67823696",
"0.671851",
"0.6714743",
"0.66676074",
"0.6635107",
"0.6623389",
"0.65688634",
"0.6558542",
"0.65363264",
"0.6529588",
"0.65288836",
"0.64978504",
"0.64969003",
"0.6496633",
"0.64645255",
"0.63610536",
"0.63596475",
"0.63473934",
"0.63251287",
"0.6320343",
"0.631206",
"0.63071656",
"0.6303363",
"0.6288416",
"0.62854916",
"0.6270606",
"0.6260735",
"0.6234784",
"0.62274617",
"0.62122446",
"0.62034535",
"0.61737806",
"0.6170443",
"0.6163115",
"0.6159926",
"0.6149189",
"0.61487734",
"0.61479884",
"0.61428255",
"0.61409354",
"0.61409354",
"0.614004",
"0.6131093",
"0.6129593",
"0.61228585",
"0.6121276",
"0.6119197",
"0.61140215",
"0.6101384",
"0.6100359",
"0.609213",
"0.6088077",
"0.6075845",
"0.6073459",
"0.6071315",
"0.6070634",
"0.6059247",
"0.60578275",
"0.60499734",
"0.6045125",
"0.6041552",
"0.60380507",
"0.6036827",
"0.6036112",
"0.60345745",
"0.60345745",
"0.60345745",
"0.6015003",
"0.6012114",
"0.5994069",
"0.5994069",
"0.5994069",
"0.5994069",
"0.5982997",
"0.5978039",
"0.5973742",
"0.59713036",
"0.5967364",
"0.5967364",
"0.5967364",
"0.5967364",
"0.5967364",
"0.5967364"
]
| 0.71972686 | 8 |
Metodo para establecer un valor en el atributo output. | public void setOutput(int output) {
Output = output;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic String toString() {\n\t\treturn getValor();\r\n\t}",
"@Override\r\n\tpublic String getValue() {\r\n\t\t//\r\n\t\treturn this.elementWrapper.getAttribute(this.attribute);\r\n\t}",
"@Override\n public String getValue() {\n return this.value.toString();\n }",
"public String getValue() {\n return super.getAttributeValue();\n }",
"@Override\n public String toString() {\n return String.valueOf(value());\n }",
"@Override\n public String toString() {\n return \"\" + this.value;\n }",
"@Override\n public String getValue() {\n return value;\n }",
"@Override\n\t\t\tpublic String getValue() {\n\t\t\t\treturn value;\n\t\t\t}",
"public abstract String valueAsText();",
"@Override\n public String asText() {\n return value;\n }",
"@Override\n public String toString(){\n return this.getValue();\n }",
"@Override\r\n\tpublic String getValue() {\n\t\treturn value;\r\n\t}",
"@Override\n public String toString(){\n return String.valueOf(value);\n }",
"public String getExtraValue() {\n\t\t\treturn null;\r\n\t\t}",
"public String getExtraValue() {\n\t\t\treturn null;\r\n\t\t}",
"@Override\n public final String toString() {\n return this.value;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn value;\n\t}",
"@Override\n\tpublic String getValue() {\n\t\treturn value;\n\t}",
"public String getValue () { return value; }",
"public String getValue() { return value; }",
"public\t\tString\t\tgetValue()\n\t\t{\n\t\treturn(\"\" + getNormalizedValue());\n\t\t}",
"String getValue()\n {\n return value.toString();\n }",
"@Override\r\n\tpublic String getValue() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getValue() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getValue() {\n\t\treturn null;\r\n\t}",
"private String getAttrValue(Object name) {\n\t return (String)this.mAtts.get(name);//.toString();\n\t}",
"private void printAttribute(PrintWriter out, int inOut, int ct, int type){\r\n\r\n\t\tif (missingValues[inOut][ct]){\r\n\t\t\tout.print(\"<null>\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tswitch(type){\r\n\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\tout.print(nominalValues[inOut][ct]); \r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\tout.print((int)realValues[inOut][ct]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.REAL:\r\n\t\t\t\tout.print(realValues[inOut][ct]);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn value + \"\";\r\n\t}",
"String getVal();",
"public String toString() {\n return value;\r\n }",
"@Override\n\tpublic String toString() {\n\t\treturn rawValue;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn String.format(\"%s:%s\", type, value);\n\t}",
"public String getOutValue(){\n return null;\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn val.toString();\r\n\t}",
"public String toString(){\n\t\treturn getValue();\n\t}",
"public String asText() {\n return getValueAttribute();\n }",
"@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}",
"java.lang.String getValue();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }",
"public String getValue(){\n return this.value;\n }",
"public String getValue() {\n/* 99 */ return this.value;\n/* */ }",
"@Override\r\n public String toString() {\r\n return (value == null) ? \"\" : value;\r\n }",
"public String toString() {\n return value;\n }",
"public String toString()\r\n\t{\r\n\t\treturn \" \" + this.value;\r\n\t}",
"@Override\n public String toString() {\n\n if (this.value == null) {\n return name;\n }\n final int len = this.name.length() + 1 + this.value.length();\n final StringBuilder buffer = new StringBuilder(len);\n buffer.append(this.name);\n buffer.append(\"=\");\n buffer.append(this.value);\n return buffer.toString();\n }",
"@Override\n public String toString() {\n \treturn String.valueOf(val);\n }",
"public java.lang.String getValor();",
"public final XmlTextInfo value ()\r\n {\r\n return _value;\r\n }",
"@Override\n //Method for getting output from String declaration\n //First set of accessor/mutator that returns value as String\n public String toString(){\n return \"[\"+name+\",\"+type+\",\"+value+\"]\";\n }",
"public String getAttribute_value() {\n return attribute_value;\n }",
"@Override\n\tpublic IAttributeValue value() { return value; }",
"@Override\n public String toString() {\n\n if (this.value == null) {\n return name;\n }\n final int len = this.name.length() + 1 + this.value.length();\n final StringBuilder buffer = new StringBuilder(len);\n buffer.append(this.name);\n buffer.append(\"=\");\n buffer.append(this.value);\n return buffer.toString();\n }",
"public abstract java.lang.String getAcma_valor();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String setValue();",
"@Override\n public String toString() {\n return value();\n }",
"public abstract String getValue();",
"public abstract String getValue();",
"public abstract String getValue();",
"String getValueFormatted();",
"@Override\n public String toString(){\n return \"w=\" + value;\n }",
"@Override\n\tpublic String visitValue(ValueContext ctx) {\n\t \n\t\t\n\t return ctx.getChild(0).getText();\n\t\t\n\t\t\n\t}",
"public String getValue() {\n return value;\n }",
"public String toString() {\n\t\treturn String.format(\"%s = %d\",name,value);\n\t}",
"public String getValue()\n {\n return value;\n }",
"protected String exportAttribute(String tag, String value) {\n\t\treturn \" \" + tag + \"=\\\"\" + value + \"\\\"\";\n\t}",
"public final String toString ()\r\n {\r\n return _name + \" = \" + _value;\r\n }",
"public String toString()\n {\n return getValue(12);\n }",
"public String getAttrVal() {\n return attrVal;\n }",
"public String getValue()\n {\n return value;\n }",
"public String getValue()\n {\n return value;\n }",
"public String getValue(){\n\t\treturn _value;\n\t}",
"public final String toString() {\r\n return valor.toString();\r\n }",
"String displayValue();",
"public String value()\n {\n return value;\n }",
"public String getValue(){\n\t\treturn this.value;\n\t}"
]
| [
"0.66108197",
"0.6524551",
"0.64921653",
"0.6471087",
"0.6463488",
"0.64602995",
"0.645958",
"0.6422156",
"0.6422123",
"0.6402911",
"0.63871247",
"0.6368558",
"0.6355588",
"0.63484013",
"0.63484013",
"0.63359445",
"0.6311681",
"0.6301206",
"0.62884456",
"0.6271626",
"0.626354",
"0.62576705",
"0.62557924",
"0.62557924",
"0.62557924",
"0.6254129",
"0.62360096",
"0.6234333",
"0.62314314",
"0.6222602",
"0.62110364",
"0.62054235",
"0.62053335",
"0.61766064",
"0.61693317",
"0.61663496",
"0.6158914",
"0.6158914",
"0.6158914",
"0.6151162",
"0.6151162",
"0.6151162",
"0.6151162",
"0.6151162",
"0.6151162",
"0.6135539",
"0.6135539",
"0.6135539",
"0.6135539",
"0.6135539",
"0.6135539",
"0.6135539",
"0.6135539",
"0.6135539",
"0.612927",
"0.612408",
"0.61077464",
"0.6095008",
"0.6094245",
"0.6085423",
"0.60850453",
"0.60836077",
"0.60825604",
"0.6074213",
"0.6059913",
"0.60583377",
"0.60497147",
"0.60396636",
"0.60380465",
"0.60350114",
"0.60350114",
"0.60350114",
"0.60350114",
"0.60350114",
"0.60350114",
"0.60350114",
"0.60350114",
"0.60350114",
"0.60350114",
"0.60324514",
"0.6030668",
"0.60088503",
"0.60088503",
"0.60088503",
"0.59826034",
"0.59789884",
"0.597152",
"0.59656566",
"0.5965057",
"0.5962261",
"0.5961508",
"0.59554136",
"0.59486765",
"0.5943593",
"0.5940701",
"0.5940701",
"0.59343326",
"0.59327626",
"0.5929774",
"0.5923098",
"0.5921366"
]
| 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.